forked from guaix-ucm/numina
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
79 lines (63 loc) · 2.72 KB
/
setup.py
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
import numpy
from setuptools import setup, Extension
def get_extensions():
numpy_include = numpy.get_include()
extensions = []
np_api_min = ("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION")
extra_compile_args_cpp=["-std=c++17"]
ext1 = Extension('numina.array._combine',
['src/numina/array/src/combinemodule.cc',
'src/numina/array/src/operations.cc',
'src/numina/array/src/nu_combine_methods.cc',
'src/numina/array/src/nu_combine.cc'
],
define_macros=[np_api_min],
extra_compile_args=extra_compile_args_cpp,
include_dirs=[numpy_include])
extensions.append(ext1)
ext3 = Extension('numina.array._nirproc',
['src/numina/array/src/nirproc.pyx'],
define_macros=[np_api_min],
extra_compile_args=extra_compile_args_cpp,
include_dirs=[numpy_include],
language='c++'
)
extensions.append(ext3)
ext4 = Extension('numina.array.trace._traces',
['src/numina/array/trace/traces.pyx',
'src/numina/array/trace/Trace.cpp'],
define_macros=[np_api_min],
extra_compile_args=extra_compile_args_cpp,
include_dirs=[numpy_include],
language='c++')
extensions.append(ext4)
ext5 = Extension('numina.array.trace._extract',
['src/numina/array/trace/extract.pyx'],
define_macros=[np_api_min],
extra_compile_args=extra_compile_args_cpp,
include_dirs=[numpy_include],
language='c++')
extensions.append(ext5)
ext6 = Extension('numina.array.peaks._kernels',
['src/numina/array/peaks/kernels.pyx'],
define_macros=[np_api_min],
language='c')
extensions.append(ext6)
ext7 = Extension('numina.array._bpm',
['src/numina/array/bpm.pyx'],
define_macros=[np_api_min],
extra_compile_args=extra_compile_args_cpp,
include_dirs=[numpy_include],
language='c++')
extensions.append(ext7)
ext8 = Extension('numina.array._clippix',
['src/numina/array/clippix.pyx'],
define_macros=[np_api_min],
include_dirs=[numpy_include],
language='c')
extensions.append(ext8)
return extensions
if __name__ == '__main__':
setup(
ext_modules=get_extensions()
)