-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathsetup.py
More file actions
22 lines (20 loc) · 736 Bytes
/
setup.py
File metadata and controls
22 lines (20 loc) · 736 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from setuptools import Extension, setup, find_packages
from Cython.Build import cythonize
import numpy
# Compile pyx files with C
modules = ['utils']
for module in modules:
ext_modules = [
Extension(
name=f'PolyBin3D.cython.{module}',
sources=[f'PolyBin3D/cython/{module}.pyx'],
libraries=['mvec','m'],
extra_compile_args=["-fopenmp","-O3", "-ffast-math", "-march=broadwell"],
extra_link_args=["-fopenmp"],
define_macros=[('NPY_NO_DEPRECATED_API', 'NPY_1_7_API_VERSION')],
include_dirs=[numpy.get_include()],
)
]
setup(
ext_modules=cythonize(ext_modules), # Compile Cython modules and include them in the package
)