Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.1k
Add ninja to Python build requirements#29740
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
timhoffm commentedMar 12, 2025
Should this also be added tohttps://github.com/matplotlib/matplotlib/blob/main/environment.yml? |
story645 commentedMar 12, 2025
It's complicated b/c this should optimally be provided by the system - sorry dropped the ball on#29083 for where/how this should be documented |
dstansby commentedMar 12, 2025
Ah, sorry I didn't see that! What's the reason for preferring a system-based install over a Python package? I had a quick look in the Python package and original package docs, and coudln't find anything on the topic. |
tacaswell commentedMar 13, 2025
It is always a build requirement, but if you let pip use an isolated environment there is same magic that gets down to add ninja if it not available. pip/wheel does not claim to be (or I think want to be) a general purpose package manager (despite it being true you can wrap binaries up in a wheel and put them on pypi (like uv, ruff, ninja, cmake, even different versions of Python) but rather to be a package manager for Python packages. We should try to take the tools at their intent and prefer getting ninja from the system when possible. If pypa were to go the other way and try to become a general package manager then it would make sense to pull ninja + cmake + compilers from pypi, but until then I think we should prefer to get build tools from the system. It would also make sense (as described in#29746 ) to add a |
dstansby commentedMar 14, 2025
Thanks for the explanation - that makes sense. I might take a stab at a pixi development workflow then, especially since it's the only way I can get around#29741 at the moment. |
Uh oh!
There was an error while loading.Please reload this page.
PR summary
At least for me in a clean virtual environment on macOS, this seems to be a build requirement.Fixes#29739.
I'm also hoping this means it doesn't need to be installed through system package managers on CI too, allowing it to be specified in one place instead of lots of places in the CI config.
PR checklist