-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support parallel builds when installing with pip? #422
Comments
Have they finally added support for parallel compilation? Excellent I'll add that for the next release. Thanks for finding this I, barely have time to look at packaging etc.. anymore. |
I'm pretty sure it's always been there (this is a distutils feature), but poorly documented. Difference is, in the past you'd download and extract the source tarball and run |
I was aware that distutils supported parallel compilation (we use it in |
Fixed in #428 |
Installing raysect from source using pip takes a long time (15 minutes in our Cherab CI for example), largely because the compilation of all the Cython extension modules is done in serial. This could be sped up by parallelising the build process. This is already done for the cythonize step (transpiling pyx to c), using all available cores. Doing it for the build step is pretty trivial: add the following in the setup call in setup.py:
Or, for more explicit parallelisation, an environment variable to specify the number of parallel processes, defaulting to serial:
N.B. Command line arguments to setup.py don't work well when installing via pip: passing
--global-option
means pip won't use wheels for any dependencies (Cython, numpy and matplotlib in particular cause problems) which is why an environment variable is preferred.The text was updated successfully, but these errors were encountered: