Commit 1c4f32b9 authored by Stefan Behnel's avatar Stefan Behnel

Run cythonize() in parallel in "new_build_ext" if threaded distutils build was requested.

parent 14058944
......@@ -14,9 +14,11 @@ else:
class new_build_ext(_build_ext, object):
def finalize_options(self):
if self.distribution.ext_modules:
nthreads = getattr(self, 'parallel', None) # -j option in Py3.5+
nthreads = int(nthreads) if nthreads else None
from Cython.Build.Dependencies import cythonize
self.distribution.ext_modules[:] = cythonize(
self.distribution.ext_modules)
self.distribution.ext_modules, nthreads=nthreads)
super(new_build_ext, self).finalize_options()
# This will become new_build_ext in the future.
......
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