forked from brown-ccv/hddm-wfpt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
54 lines (47 loc) · 1.29 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
import platform
from setuptools import setup
from setuptools import Extension
import numpy as np
try:
from Cython.Build import cythonize
if platform.system() == "Darwin":
ext1 = Extension(
"wfpt",
["hddm_wfpt/wfpt.pyx"],
language="c++",
extra_compile_args=["-stdlib=libc++"],
extra_link_args=["-stdlib=libc++", "-mmacosx-version-min=10.9"],
)
else:
ext1 = Extension(
"wfpt",
["hddm_wfpt/wfpt.pyx"],
language="c++",
)
ext_modules = cythonize(
[
ext1,
Extension(
"cdfdif_wrapper",
["hddm_wfpt/cdfdif_wrapper.pyx", "hddm_wfpt/cdfdif.c"],
),
],
build_dir="cython_build",
compiler_directives={"language_level": "3", "linetrace": True},
)
except ImportError:
ext_modules = [
Extension("wfpt", ["cython_build/hddm_wfpt/wfpt.cpp"], language="c++"),
Extension(
"cdfdif_wrapper",
[
"cython_build/hddm_wfpt/cdfdif_wrapper.c",
"cython_build/hddm_wfpt/cdfdif.c",
],
),
]
setup(
packages=["hddm_wfpt"],
include_dirs=[np.get_include()],
ext_modules=ext_modules,
)