Skip to content
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

Respect non-sysconfig-based system Pythons #2193

Merged
merged 2 commits into from
Mar 5, 2024

Conversation

charliermarsh
Copy link
Member

@charliermarsh charliermarsh commented Mar 5, 2024

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.

@charliermarsh charliermarsh changed the title Charlie/sysconfig paths Update get_interpreter_info.py to respect non-sysconfig-based system Pythons Mar 5, 2024
@charliermarsh charliermarsh marked this pull request as ready for review March 5, 2024 02:08
@charliermarsh charliermarsh changed the title Update get_interpreter_info.py to respect non-sysconfig-based system Pythons Respect non-sysconfig-based system Pythons Mar 5, 2024
@charliermarsh charliermarsh added bug Something isn't working compatibility Compatibility with another interface or tool labels Mar 5, 2024
@charliermarsh charliermarsh force-pushed the charlie/sysconfig-paths branch 2 times, most recently from d28e570 to fcf9a3f Compare March 5, 2024 02:15
@charliermarsh charliermarsh force-pushed the charlie/sysconfig-paths branch 3 times, most recently from 5f4328d to fada08d Compare March 5, 2024 05:08
Base automatically changed from charlie/venv-paths to main March 5, 2024 21:13
@charliermarsh charliermarsh enabled auto-merge (squash) March 5, 2024 21:13
@charliermarsh charliermarsh merged commit 9e41f73 into main Mar 5, 2024
16 checks passed
@charliermarsh charliermarsh deleted the charlie/sysconfig-paths branch March 5, 2024 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working compatibility Compatibility with another interface or tool
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants