-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Prepare for the future of distutils-in-setuptools #8851
Comments
One thing I'd like to propose is that we avoid using distutils functions from setuptools. We've worked hard to decouple pip from setuptools - it would be bad to now re-couple the two. We don't want to depend on a build backend just for some utility functions. A quick scan of the pip codebase shows the following imports:
The FancyGetopt usage should be replaced with standard option parsing (ideally the long-discussed "use a better option parser" rewrite). The |
I want to propose only do the changes on Python 3 since new setuptools is not available on Python 2 anyway. We can do this in the same framework as #8114. This way, the transition can start in 20.3, rather than 21.0 when Python 2 is dropped entirely. PyCon Taiwan is already wrapping up (the main conference was held last weekend) and I plan to come back to the transition away from |
To add to the list, distutils.util.change_root (used by install.legacy) does not uses anything from distutils so it could be moved into pip just fine. Sometimes the function would be useful elsewhere too, e.g. to get the installation site if both root and target are specified (ref GH-7828). Funny enough, |
(edit: I messed up the flags, the corresponding key is the other way around) |
@uranusjr do you wanna close this out, since you’re tracking the distutils migration in a different issue? |
I think this can be closed. |
At least one of the breakages induced by setuptools 50.0 is already confirmed as a pip bug, and there very well may be more. pip needs a detailed (if not complete) assessment to its setuptools compatibiliy and fix the compatibility issues so the world does not break again when the distutils switch eventually happens.
Originally posted by @uranusjr in #8824 (comment)
Consider this issue a discussion point for that assessment and pip's preparedness for the same.
The text was updated successfully, but these errors were encountered: