-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsetup.py
More file actions
40 lines (35 loc) · 1.27 KB
/
Copy pathsetup.py
File metadata and controls
40 lines (35 loc) · 1.27 KB
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 platform
import numpy as np
from Cython.Build import cythonize
from Cython.Compiler import Options
from setuptools import Extension, setup
Options.warning_errors = True
if platform.system() == "Darwin":
ext = Extension("ants/*", sources=["ants/*.pyx"], include_dirs=[np.get_include()])
ext_utils = Extension(
"ants/utils/*", sources=["ants/utils/*.pyx"], include_dirs=[np.get_include()]
)
else:
ext = Extension(
"ants/*",
sources=["ants/*.pyx"],
extra_compile_args=["-fopenmp"],
extra_link_args=["-fopenmp"],
include_dirs=[np.get_include()],
)
ext_utils = Extension(
"ants/utils/*",
sources=["ants/utils/*.pyx"],
extra_compile_args=["-fopenmp"],
extra_link_args=["-fopenmp"],
include_dirs=[np.get_include()],
)
setup(ext_modules=cythonize([ext, ext_utils], language_level="3"))