Commit 66d2d95a authored by Stefan Behnel's avatar Stefan Behnel

Switch setup.py script to calling cythonize() through "new_build_ext" to get a...

Switch setup.py script to calling cythonize() through "new_build_ext" to get a clean split between the "translate" and "compile" steps. Previously, it would alternate between the two, which meant that Cython was already partially compiled while it was still being used.
parent d7923124
......@@ -157,14 +157,14 @@ def compile_cython_modules(profile=False, compile_more=False, cython_with_refnan
# XXX hack around setuptools quirk for '*.pyx' sources
extensions[-1].sources[0] = pyx_source_file
from Cython.Distutils import build_ext
from Cython.Distutils.build_ext import new_build_ext
if profile:
from Cython.Compiler.Options import get_directive_defaults
get_directive_defaults()['profile'] = True
sys.stderr.write("Enabled profiling for the Cython binary modules\n")
# not using cythonize() here to let distutils decide whether building extensions was requested
add_command_class("build_ext", build_ext)
# not using cythonize() directly to let distutils decide whether building extensions was requested
add_command_class("build_ext", new_build_ext)
setup_args['ext_modules'] = extensions
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment