-
Notifications
You must be signed in to change notification settings - Fork 32
/
setup.py
49 lines (43 loc) · 1.4 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
import numpy as np
from Cython.Build import cythonize
from Cython.Compiler import Options
from setuptools import Extension, setup
Options.docstrings = True
Options.annotate = False
# package_data values are glob patterns relative to each specific subpackage.
package_data = {
"stcal.ramp_fitting.src": ["*.c"],
}
# Setup C module include directories
include_dirs = [np.get_include()]
# Setup C module macros
define_macros = [("NUMPY", "1")]
# importing these extension modules is tested in `.github/workflows/build.yml`;
# when adding new modules here, make sure to add them to the `test_command` entry there
extensions = [
Extension(
"stcal.ramp_fitting.ols_cas22._ramp",
["src/stcal/ramp_fitting/ols_cas22/_ramp.pyx"],
include_dirs=[np.get_include()],
language="c++",
),
Extension(
"stcal.ramp_fitting.ols_cas22._jump",
["src/stcal/ramp_fitting/ols_cas22/_jump.pyx"],
include_dirs=[np.get_include()],
language="c++",
),
Extension(
"stcal.ramp_fitting.ols_cas22._fit",
["src/stcal/ramp_fitting/ols_cas22/_fit.pyx"],
include_dirs=[np.get_include()],
language="c++",
),
Extension(
"stcal.ramp_fitting.slope_fitter",
["src/stcal/ramp_fitting/src/slope_fitter.c"],
include_dirs=include_dirs,
define_macros=define_macros,
),
]
setup(ext_modules=cythonize(extensions))