-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
58 lines (49 loc) · 1.26 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
from setuptools import setup
from setuptools.extension import Extension
from Cython.Build import cythonize
import numpy
# Extensions' configuration
library_dirs = ["/usr/local/lib"]
extra_compile_args = [
"-ffast-math",
"-march=native",
"-msse2"
]
include_dirs = [
"/usr/local/include",
numpy.get_include()
]
# Extension modules
ext_modules = [
Extension(
name="hplop.core.equations",
sources=["src/hplop/core/equations.pyx"],
libraries=["cspice", "m"],
library_dirs=library_dirs,
extra_compile_args=extra_compile_args
),
Extension(
name="hplop.solver.rkn1210",
sources=["src/hplop/solver/rkn1210.pyx"],
libraries=["m"],
library_dirs=library_dirs,
extra_compile_args=extra_compile_args
),
Extension(
name="hplop.solver.rkn1210_coeffs",
sources=["src/hplop/solver/rkn1210_coeffs.pyx"],
libraries=["m"],
library_dirs=library_dirs,
extra_compile_args=extra_compile_args
),
Extension(
name="hplop.pck.pck",
sources=["src/hplop/pck/*.pyx"],
)
]
# Perform setup
if __name__ == "__main__":
setup(
include_dirs=include_dirs,
ext_modules=cythonize(ext_modules, annotate=True)
)