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

Query interpreter to determine correct virtualenv paths #2188

Merged
merged 1 commit into from
Mar 5, 2024

Conversation

charliermarsh
Copy link
Member

@charliermarsh charliermarsh commented Mar 5, 2024

Summary

This PR migrates our virtualenv creation from a setup that assumes prior knowledge of the correct paths, to a technique borrowed from virtualenv whereby we use sysconfig and distutils to determine the paths. The general trick is to grab the expected paths with sysconfig, then make them all relative, then make them absolute for a given directory.

Closes #2095.
Closes #2153.

@charliermarsh charliermarsh force-pushed the charlie/venv-paths branch 2 times, most recently from 275eac8 to a3fb98d Compare March 5, 2024 00:28
@charliermarsh charliermarsh marked this pull request as ready for review March 5, 2024 00:28
@charliermarsh charliermarsh added compatibility Compatibility with a specification or another tool virtualenv Related to virtual environments labels Mar 5, 2024
@charliermarsh charliermarsh force-pushed the charlie/venv-paths branch 3 times, most recently from 906278c to 8b2bf50 Compare March 5, 2024 00:40
"pypy"
} else {
"python"
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E.g., this is no longer necessary.

@charliermarsh charliermarsh merged commit 0f6fc11 into main Mar 5, 2024
7 checks passed
@charliermarsh charliermarsh deleted the charlie/venv-paths branch March 5, 2024 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility Compatibility with a specification or another tool virtualenv Related to virtual environments
Projects
None yet
2 participants