-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
50 lines (45 loc) · 1.41 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
import os
from setuptools import setup
import setuptools
from Cython.Build import cythonize
source_dir = 'python_cython_stan_test'
include_dirs = [
source_dir,
os.path.join(source_dir, "lib", "stan", "src"),
os.path.join(source_dir, "lib", "stan", "lib", "stan_math"),
os.path.join(source_dir, "lib", "stan", "lib", "stan_math", "lib", "eigen_3.3.3"),
os.path.join(source_dir, "lib", "stan", "lib", "stan_math", "lib", "boost_1.69.0"),
os.path.join(
source_dir, "lib", "stan", "lib", "stan_math", "lib", "sundials_4.1.0", "include"
),
]
stan_macros = [
("BOOST_DISABLE_ASSERTS", None),
("BOOST_PHOENIX_NO_VARIADIC_EXPRESSION", None),
("STAN_THREADS", None),
]
extra_compile_args = ["-std=c++1y"]
cython_include_path = [source_dir]
extension = setuptools.Extension(
"python_cython_stan_test.normal",
language="c++",
sources=[os.path.join("python_cython_stan_test", "normal.pyx")],
define_macros=stan_macros,
include_dirs=include_dirs,
extra_compile_args=extra_compile_args,
)
setup(
name="python_cython_stan_test",
version=1.0,
python_requires=">=3.6",
license="MIT",
long_description="static init",
long_description_content_type="text/markdown",
packages=['python_cython_stan_test'],
install_requires=['numpy'],
ext_modules=cythonize(
[extension],
include_path=cython_include_path,
quiet=False,
),
)