-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
executable file
·34 lines (29 loc) · 996 Bytes
/
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
import sys
from setuptools import setup, Extension
from Cython.Build import cythonize
extra_link_args = []
extra_compile_args = []
if sys.platform.startswith('win'):
# NOTE: this is for msvc not mingw32
# There are issues with mingw64 linking agains msvcrt.
extra_compile_args = ['/Ox']
else:
extra_compile_args=['-O3', '-funroll-loops']
if sys.platform.startswith('linux'):
extra_link_args=['-Wl,-Bsymbolic-functions', '-Wl,-Bsymbolic']
else:
extra_link_args=[]
FXrays = Extension(
name = 'FXrays.FXraysmodule',
sources = ['cython_src/FXraysmodule.pyx', 'c_src/FXrays.c'],
include_dirs = ['cython_src', 'c_src'],
extra_compile_args = extra_compile_args,
extra_link_args = extra_link_args
)
setup(
packages = ['FXrays', 'FXrays.cython_src'],
package_dir = {'FXrays':'python_src', 'FXrays.cython_src':'cython_src'},
ext_modules = cythonize([FXrays]),
package_data = {'FXrays.cython_src':['FXraysmodule.pyx']},
zip_safe=False,
)