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
MAINT: Raise RuntimeError if setuptools version is too recent. #20795
Conversation
NumPy does not build with setuptools versions greater than '60.0.0'. Check the version when setuptools is imported in setup.py and raise a RuntimeError if the version is too recent. That way we avoid people opening issues when their build fails for that reason. Closes numpy#20692.
Trying this out and it seems to work fine so far for numpy (and test suite passed). |
They work for NumPy and we have no assurance that setuptools won't stop working again. We plan to change build systems over the next year. EDIT: The main purpose is to avoid people creating issues that result from using newer setuptools. We have been getting those. |
I understand. Only reason I am asking is because it's hard for downstream packagers if something is pinning a hard < requirement. The only breakage known so far is to do with distutils and this knob exists for that reason. Setting it reverts to the old behaviour as it bypasses the setuptools implementation entirely. I'm not asking you to sort out the distutils issues in general or anything, I'm just wondering if that setting seems to work for you too, as it does for me and I expect it to. My understanding is that it should mitigate anything to do with the ongoing transition in setuptools right now. (I wasn't sure if maybe nobody had realised it existed.) But if we need to just do this downstream, I get that too. Thanks in any case for working on a new build system! |
One possibility is to add a check for |
Can someone make PR with such modyfication or post here patch for that? |
#20963 attempts to resolve problems around this change. |
This may or may not work - it's a completely untested combination, so YMMV.
Just seeing this now. If you get weird build issues you may still have to downgrade, or go debug the issue by yourself. So I'm not at all sure that this will be better for packagers. It's almost guaranteed to break eventually - but it may stay working for a while. |
It works for us in Gentoo and seemingly other downstreams. We'll know to keep an eye out if we get failures anyway as it's going to end up being setuptools related, but this hack is there for other packages too. I don't really expect numpy to support it, but would appreciate patches being merged as we go if we find some easy workarounds which don't affect normal cases. Thank you for your help. |
Backport of #20759.
NumPy does not build with setuptools versions greater than '60.0.0'.
Check the version when setuptools is imported in setup.py and raise
a RuntimeError if the version is too recent. That way we avoid people
opening issues when their build fails for that reason.
Closes #20692.