-
Notifications
You must be signed in to change notification settings - Fork 648
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
Modify install paths for prior Debian system Pythons #2113
Comments
This is really complex, we'd need to vendor quite a lot of Python code from |
Note that this only affects installing with |
Yes, possible, |
The thing we want to do here is:
Add all of this to You can also see an example of how virtualenv does this: https://github.com/pypa/virtualenv/blob/5cd543fdf8047600ff2737babec4a635ad74d169/src/virtualenv/discovery/py_info.py#L80. |
## Summary Covering some of the limitations from #2113.
## Summary `pip` uses `sysconfig` for Python 3.10 and later by default; however, it falls back to `distutils` for earlier Python versions, and distros can actually tell `pip` to continue falling back to `distutils` via the `_PIP_USE_SYSCONFIG` variable. By _always_ using `sysconfig`, we're doing the wrong then when installing into some system Pythons, e.g., on Debian prior to Python 3.10. This PR modifies our logic to mirror `pip` exactly, which is what's been recommended to me as the right thing to do. Closes #2113. ## Test Plan Most notably, the new Debian tests pass here (which fail on main: #2144). I also added Pyston as a second stress-test.
Within:
We see:
So when installing into Debian's system Python, we'll end up installing into the "wrong" place. See Filipe's excellent article on it here: https://ffy00.github.io/blog/02-python-debian-and-the-install-locations/.
(I don't see this issue with latest Debian.)
The text was updated successfully, but these errors were encountered: