forked from arahlin/qpoint
-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
34 lines (29 loc) · 786 Bytes
/
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
from setuptools import setup, find_packages, Extension
from extension_helpers import add_openmp_flags_if_available
# extension arguments
src = [
"src/erfa.c",
"src/chealpix.c",
"src/qp_error.c",
"src/qp_iers_bulletin_a.c",
"src/qp_map.c",
"src/qp_params.c",
"src/qp_pixel.c",
"src/qp_pixhash.c",
"src/qpoint.c",
"src/quaternion.c",
"src/sincos.c",
]
extra_args = ["-O3", "-Wall", "-std=c99", "-fPIC"]
ext_qp = Extension("qpoint.libqpoint", src, extra_compile_args=extra_args)
# add openmp support if possible
add_openmp_flags_if_available(ext_qp)
# run setup
setup(
ext_modules=[ext_qp],
packages=find_packages(),
use_scm_version={
"version_scheme": "no-guess-dev",
"write_to": "qpoint/_version.py",
},
)