forked from hanyas/sds
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
46 lines (38 loc) · 1.51 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
# python setup.py build_ext --inplace
import os
from distutils.core import setup
from distutils.extension import Extension
from Cython.Build import cythonize
import numpy as np
USE_OPENMP = os.environ.get('USE_OPENMP', False)
print("USE_OPENMP", USE_OPENMP)
ext_modules = []
# ext_modules.append(
# Extension('sds_numpy.cython.hmm_cy',
# sources=["sds_numpy/cython/hmm_cy.pyx"],
# language="c++")
# )
ext_modules.append(
Extension('sds_numpy.cython.hmm_cy',
extra_compile_args=["-fopenmp"] if USE_OPENMP else ["-stdlib=libc++"],
extra_link_args=["-fopenmp"] if USE_OPENMP else ["-stdlib=libc++"],
sources=["sds_numpy/cython/hmm_cy.pyx"],
include_dirs = ['sds_numpy/cython/'],
language="c++")
)
# ext_modules.append(
# Extension('sds_torch.cython.hmm_cy',
# extra_compile_args=["-fopenmp"] if USE_OPENMP else ["-stdlib=libc++"],
# extra_link_args=["-fopenmp"] if USE_OPENMP else ["-stdlib=libc++"],
# sources=["sds_numpy/cython/hmm_cy.pyx"],
# include_dirs = ['sds_torch/cython/'],
# language="c++")
# )
setup(name='sds_numpy',
version='0.0.1',
description='Switching dynamical systems for control',
author='Hany Abdulsamad',
author_email='hany@robot-learning.de',
install_requires=['numpy', 'scipy', 'matplotlib', 'sklearn'],
packages=['sds_numpy'], ext_modules=cythonize(ext_modules),
include_dirs=[np.get_include()],)