-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathsetup.py
More file actions
40 lines (33 loc) · 927 Bytes
/
setup.py
File metadata and controls
40 lines (33 loc) · 927 Bytes
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
import glob
from setuptools import Extension, setup
from Cython.Build import cythonize
import numpy as np
common_kw = {
'extra_link_args': ['--verbose'],
'include_dirs': [
'src/passpredict',
'src/passpredict/sgp4',
'src/passpredict/sofa',
np.get_include()
],
'extra_compile_args': ['-O2'],
# define_macros=[("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION")],
}
extensions = [
Extension("passpredict._time",
['src/passpredict/_time.pyx'] + sorted(glob.glob('src/passpredict/sgp4/*.cpp')),
**common_kw,
),
Extension("passpredict._rotations",
['src/passpredict/_rotations.pyx'] + sorted(glob.glob('src/passpredict/sofa/*.c')),
**common_kw,
),
Extension(
'passpredict._solar',
['src/passpredict/_solar.pyx'],
**common_kw
),
]
setup(
ext_modules = cythonize(extensions, language_level=3),
)