-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Prefer importing build_py and sdist from setuptools #6007
Prefer importing build_py and sdist from setuptools #6007
Conversation
needed for compatibility with setuptools >= 58.5.0
Upstream issue: pypa/setuptools#2849 |
This may end up being resolved upstream in which case we can just disallow 58.5.0 and 58.5.1. We may still want to make this change, though? |
The most recent version of setuptools has a bug that breaks our install: pypa/setuptools#2849 Here we copy the solution from scikit-image/scikit-image#6007 .
The support for commands inheriting directly from |
do we need the try statement? i feel like with distutils being deprecated we should move away from it completely. |
Not sure. I hadn't checked if these are present in our oldest supported setuptools. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @grlee77
verified install with older setuptools (0.45)
It works without the try/except for setuptools 0.45, so I have removed it. I'm not sure about how to best avoid importing the CompileError or LinkError classes from |
Maybe the best is to open an issue to setuptools asking for suggestions? They might think the best is to expose these in the public API. |
Just found this issue that seems to cover it already: pypa/setuptools#2698 |
Ok, it should be a matter of PR then. I am sure the folks in setuptools would find it reasonable, or at least provide a clear alternate path. Maybe this part can be addressed in the future, when it is available (aka TODO)? |
Agreed. I will merge this as is today once the CI completes. |
@grlee77, there you go: pypa/setuptools#2858. It should be available soon in a release 😄 |
Description
closes #6006
This PR updates some imports to use setuptools own versions rather than the ones from distutils. This is needed for compatibility with recent setuptools (>58.5.0) which made this breaking change: pypa/setuptools@2e66eb7
Checklist
./doc/examples
(new features only)./benchmarks
, if your changes aren't covered by anexisting benchmark
For reviewers
later.
__init__.py
.doc/release/release_dev.rst
.