-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsetup.py
More file actions
33 lines (24 loc) · 1.07 KB
/
Copy pathsetup.py
File metadata and controls
33 lines (24 loc) · 1.07 KB
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
# setup.py
from distutils.core import setup, Extension
import distutils.sysconfig
import numpy
cfg_vars = distutils.sysconfig.get_config_vars()
for key, value in cfg_vars.items():
if type(value) == str:
cfg_vars[key] = value.replace("-O2", "")
for key, value in cfg_vars.items():
if type(value) == str:
cfg_vars[key] = value.replace("-DNDEBUG", "")
cfg_vars = distutils.sysconfig.get_config_vars()
for key, value in cfg_vars.items():
if type(value) == str:
cfg_vars[key] = value.replace("-Wstrict-prototypes", "")
try:
numpy_include = numpy.get_include()
except AttributeError:
numpy_include = numpy.get_numpy_include()
rt_module = Extension('_rt', libraries=['CGAL','gmp','gomp'],
extra_compile_args = ["-g","-ffast-math","-fopenmp","-std=c++11","-fopenmp"],
sources=['integrate.cxx','integrateQ1.cxx','integrateQ0.cxx','edges.cxx','laguerre.cxx','rt2.cxx','rt.i'],
include_dirs = [numpy_include],swig_opts=['-c++','-py3'])
setup(name='rt', ext_modules=[rt_module], py_modules=["rt"])