mirror of
https://github.com/astral-sh/uv.git
synced 2025-09-02 08:47:23 +00:00
Validate that discovered interpreters meet the Python preference (#7934)
Closes https://github.com/astral-sh/uv/issues/5144 e.g. ``` ❯ cargo run -q -- sync --python-preference only-system Using CPython 3.12.6 interpreter at: /opt/homebrew/opt/python@3.12/bin/python3.12 Removed virtual environment at: .venv Creating virtual environment at: .venv Resolved 9 packages in 14ms Installed 8 packages in 9ms + anyio==4.6.0 + certifi==2024.8.30 + h11==0.14.0 + httpcore==1.0.5 + httpx==0.27.2 + idna==3.10 + ruff==0.6.7 + sniffio==1.3.1 ❯ cargo run -q -- sync --python-preference only-managed Using CPython 3.12.1 Removed virtual environment at: .venv Creating virtual environment at: .venv Resolved 9 packages in 14ms Installed 8 packages in 11ms + anyio==4.6.0 + certifi==2024.8.30 + h11==0.14.0 + httpcore==1.0.5 + httpx==0.27.2 + idna==3.10 + ruff==0.6.7 + sniffio==1.3.1 ```
This commit is contained in:
parent
2df06ebfbc
commit
b98ac8c224
12 changed files with 544 additions and 11 deletions
|
@ -158,8 +158,7 @@ impl PythonEnvironment {
|
|||
let installation = match find_python_installation(
|
||||
request,
|
||||
preference,
|
||||
// Ignore managed installations when looking for environments
|
||||
PythonPreference::OnlySystem,
|
||||
PythonPreference::default(),
|
||||
cache,
|
||||
preview,
|
||||
)? {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue