1111NAME = 'stratify'
1212DIR = os .path .abspath (os .path .dirname (__file__ ))
1313
14+ extension_kwargs = {'include_dirs' : [np .get_include ()]}
15+ cython_coverage_enabled = os .environ .get ('CYTHON_COVERAGE' , None )
16+ if cython_coverage_enabled :
17+ extension_kwargs .update ({'define_macros' : [('CYTHON_TRACE_NOGIL' , '1' )]})
18+
1419extensions = [Extension ('{}._vinterp' .format (NAME ),
1520 [os .path .join (NAME , '_vinterp.pyx' )],
16- include_dirs = [ np . get_include ()] ),
21+ ** extension_kwargs ),
1722 Extension ('{}._conservative' .format (NAME ),
1823 [os .path .join (NAME , '_conservative.pyx' )],
19- include_dirs = [np .get_include ()])]
20-
24+ ** extension_kwargs )]
2125
2226def extract_version ():
2327 version = None
@@ -37,7 +41,8 @@ def extract_version():
3741 'Nd vertical interpolation/stratification of atmospheric '
3842 'and oceanographic datasets' ),
3943 version = extract_version (),
40- ext_modules = cythonize (extensions ),
44+ ext_modules = cythonize (extensions , compiler_directives = {'linetrace' : True ,
45+ 'binding' : True }),
4146 packages = find_packages (),
4247 classifiers = [
4348 'Development Status :: 3 - Alpha' ,
0 commit comments