-
-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathsetup.py
More file actions
20 lines (14 loc) · 595 Bytes
/
setup.py
File metadata and controls
20 lines (14 loc) · 595 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Licensed under a 3-clause BSD style license - see LICENSE.rst
import os
from Cython.Build import cythonize
from extension_helpers import get_extensions
from setuptools import setup
ext_modules = get_extensions()
compiler_directives = {}
if os.getenv('COVERAGE'):
print('Adding linetrace directive')
compiler_directives['profile'] = True
compiler_directives['linetrace'] = True
os.environ['CFLAGS'] = '-DCYTHON_TRACE_NOGIL=1 --coverage -fno-inline-functions -O0'
ext_modules = cythonize(ext_modules, compiler_directives=compiler_directives)
setup(ext_modules=ext_modules)