forked from lindermanlab/ssm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·37 lines (31 loc) · 1.18 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
#!/usr/bin/env python
import os
from distutils.core import setup
from Cython.Build import cythonize
from setuptools.extension import Extension
import numpy as np
# Only compile with OpenMP if user asks for it
USE_OPENMP = os.environ.get('USE_OPENMP', False)
print("USE_OPENMP", USE_OPENMP)
# Create the extensions. Manually enumerate the required
extensions = []
extensions.append(
Extension('ssm.cstats',
extra_compile_args=["-fopenmp"] if USE_OPENMP else [],
extra_link_args=["-fopenmp"] if USE_OPENMP else [],
language="c++",
sources=["ssm/cstats.pyx"],
)
)
extensions = cythonize(extensions)
setup(name='ssm',
version='0.0.1',
description='Bayesian learning and inference for a variety of state space models',
author='Scott Linderman',
author_email='[email protected]',
url='https://github.com/slinderman/ssm',
install_requires=['future', 'numpy', 'scipy', 'matplotlib', 'numba', 'scikit-learn', 'tqdm', 'autograd', 'seaborn'],
packages=['ssm','ssm.extensions','ssm.extensions.mp_srslds'],
ext_modules=extensions,
include_dirs=[np.get_include(),],
)