Include all site packages directories in ephemeral environment overlays (#15121)

Related to https://github.com/astral-sh/uv/issues/15113

The case in the linked issue is that we perhaps should not be allowing
`uv run --with` with system interpreters at all. I think we can consider
that, but the issue highlighted that `uv run --with` for a system
interpreter is broken if the base interpreter has custom site packages.
This generalizes beyond system interpreters so we should probably fix
our overlays.
This commit is contained in:
Zanie Blue 2025-08-08 13:49:21 -05:00 committed by GitHub
parent f6a9b55eb7
commit bdb4b061db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 54 additions and 13 deletions

View file

@ -272,6 +272,9 @@ mod tests {
"/home/ferris/.pyenv/versions/{FULL_VERSION}/lib/python{VERSION}/lib/python{VERSION}",
"/home/ferris/.pyenv/versions/{FULL_VERSION}/lib/python{VERSION}/site-packages"
],
"site_packages": [
"/home/ferris/.pyenv/versions/{FULL_VERSION}/lib/python{VERSION}/site-packages"
],
"stdlib": "/home/ferris/.pyenv/versions/{FULL_VERSION}/lib/python{VERSION}",
"scheme": {
"data": "/home/ferris/.pyenv/versions/{FULL_VERSION}",