mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-19 03:05:06 +00:00
Include the parent interpreter in Python discovery when --system
is used (#7440)
Closes https://github.com/astral-sh/uv/issues/7417 Tested with this epic blurb ``` ❯ uv pip install --python /Users/zb/.local/share/uv/python/cpython-3.13.0rc2-macos-aarch64-none/bin/python3 . --break-system-packages --reinstall Resolved 1 package in 0.91ms Built uv @ file:///Users/zb/workspace/uv Prepared 1 package in 2m 48s Uninstalled 1 package in 1ms Installed 1 package in 1ms - uv==0.4.10 + uv==0.4.10 (from file:///Users/zb/workspace/uv) ❯ /Users/zb/.local/share/uv/python/cpython-3.13.0rc2-macos-aarch64-none/bin/python3 -m uv pip install --system -v httpx DEBUG uv 0.4.10 DEBUG Searching for Python interpreter in system path DEBUG Found `cpython-3.13.0rc2-macos-aarch64-none` at `/Users/zb/.local/share/uv/python/cpython-3.13.0rc2-macos-aarch64-none/bin/python3` (parent interpreter) DEBUG Using Python 3.13.0rc2 environment at /Users/zb/.local/share/uv/python/cpython-3.13.0rc2-macos-aarch64-none/bin/python3 ```
This commit is contained in:
parent
e9378be919
commit
f679987fe1
2 changed files with 23 additions and 16 deletions
|
@ -1247,8 +1247,8 @@ mod tests {
|
|||
)??;
|
||||
assert_eq!(
|
||||
python.interpreter().python_full_version().to_string(),
|
||||
"3.12.3",
|
||||
"We should prefer the system interpreter"
|
||||
"3.12.0",
|
||||
"We should prefer the parent interpreter since it's not virtual"
|
||||
);
|
||||
|
||||
// Test with `EnvironmentPreference::OnlyVirtual`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue