-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
49 lines (41 loc) · 1.39 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 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"],
),
],
compiler_directives={"language_level": "3", "linetrace": True},
)
except ImportError:
ext_modules = [
Extension("wfpt", ["src/wfpt.cpp"], language="c++"),
Extension("cdfdif_wrapper", ["src/cdfdif_wrapper.c", "src/cdfdif.c"]),
]
setup(
name="hddm-wfpt",
version="0.1.0.rc0",
author="Thomas V. Wiecki, Imri Sofer, Michael J. Frank, Mads Lund Pedersen, Alexander Fengler, Lakshmi Govindarajan, Krishn Bera",
author_email="[email protected]",
url="http://github.com/lncc/hddm-wfpt",
packages=["hddm_wfpt"], # 'hddm.cnn', 'hddm.cnn_models', 'hddm.keras_models',
include_dirs=[np.get_include()],
ext_modules=ext_modules,
)