-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
80 lines (72 loc) · 3.35 KB
/
setup.py
File metadata and controls
80 lines (72 loc) · 3.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#
# Copyright (c) 2022 Vladislav Tsendrovskii
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3 of the License.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
import os
import numpy as np
from setuptools import setup, Extension
projection = Extension( name="vstarstack.library.projection.projections",
sources=[
"src/vstarstack/library/projection/projections/module.c",
"src/vstarstack/library/projection/projections/lib/perspective.c",
"src/vstarstack/library/projection/projections/lib/orthographic.c",
"src/vstarstack/library/projection/projections/lib/equirectangular.c",
])
movements = Extension( name="vstarstack.library.movement.movements",
sources=[
"src/vstarstack/library/movement/movements/module.c",
"src/vstarstack/library/movement/movements/lib/sphere.c",
"src/vstarstack/library/movement/movements/lib/flat.c",
],
include_dirs=[
"src/vstarstack/library/projection/projections",
np.get_include(),
])
image_wave = Extension(name="vstarstack.library.fine_shift.image_wave",
sources=["src/vstarstack/library/fine_shift/image_wave.c",
"src/vstarstack/library/fine_shift/image_wave_interpolation.c",
"src/vstarstack/library/fine_shift/image_wave_targets.c",
"src/vstarstack/library/fine_shift/image_wave_correlation.c",
"src/vstarstack/library/fine_shift/image_wave_module.c",
"src/vstarstack/library/fine_shift/image_wave_image.c",
], include_dirs=[np.get_include()])
root = os.path.join(os.path.abspath(os.path.dirname(__file__)), "src")
result = [os.path.join(dp, f) for dp, dn, filenames in os.walk(root)
for f in filenames if os.path.splitext(f)[1] == '.py']
result = list(set([os.path.dirname(item[len(root)+1:]) for item in result]))
result = [item.replace("/",".") for item in result if "tests" not in item]
print("Packages: ", result)
packages = result
setup (name = 'vstarstack',
version = '0.1',
author='Vladislav Tsendrovskii',
description = 'Stacking astrophotos',
scripts = ['bin/vstarstack'],
package_dir = {'': 'src'},
packages=packages,
ext_modules = [projection,
movements,
image_wave],
install_requires = [
'numpy',
'astropy',
'rawpy',
'pillow',
'imageio',
'exifread',
'opencv-python',
'scikit-image',
'scipy >= 1.11.0',
'imutils',
'matplotlib',
]
)