-
Notifications
You must be signed in to change notification settings - Fork 13
/
setup.py
32 lines (29 loc) · 927 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
from platform import system
from setuptools import setup, Extension
from Cython.Build import cythonize
# from numpy import get_include
extra_link_args = ['-lomp'] if system() == 'Darwin' else ['-fopenmp']
extra_compile_args = ['-Xpreprocessor', '-fopenmp']\
if system() == 'Darwin'\
else ['-fopenmp']
ext_modules = [
Extension(
"bitermplus._btm",
sources=["src/bitermplus/_btm.pyx"],
extra_compile_args=extra_compile_args,
extra_link_args=extra_link_args),
Extension(
"bitermplus._metrics",
# include_dirs=[get_include()],
# library_dirs=[get_include()],
sources=["src/bitermplus/_metrics.pyx"],
extra_compile_args=extra_compile_args,
extra_link_args=extra_link_args),
]
setup(
ext_modules=cythonize(
ext_modules,
compiler_directives={
'embedsignature': True,
'language_level': 3})
)