Deprecate --system and --no-system in uv venv (#5925)

e.g.

```
❯ cargo run -- venv --no-system
    Blocking waiting for file lock on build directory
   Compiling uv v0.2.34 (/Users/zb/workspace/uv/crates/uv)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 19.85s
     Running `target/debug/uv venv --no-system`
warning: The `--no-system` flag has no effect, a system Python interpreter is always used in `uv venv`
Using Python 3.12.4 interpreter at: /opt/homebrew/opt/python@3.12/bin/python3.12
Creating virtualenv at: .venv
Activate with: source .venv/bin/activate

❯ cargo run -- venv --system
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.15s
     Running `target/debug/uv venv --system`
warning: The `--system` flag has no effect, a system Python interpreter is always used in `uv venv`
Using Python 3.12.4 interpreter at: /opt/homebrew/opt/python@3.12/bin/python3.12
Creating virtualenv at: .venv
Activate with: source .venv/bin/activate
```
This commit is contained in:
Zanie Blue
2024-08-08 13:32:00 -05:00
committed by GitHub
parent dd1bcf8ab9
commit 0d21ff8b5f
2 changed files with 18 additions and 3 deletions
+9 -2
View File
@@ -1837,15 +1837,22 @@ pub struct VenvArgs {
)]
pub python: Option<String>,
// TODO(zanieb): Hide me, I do nothing.
/// Ignore virtual environments when searching for the Python interpreter.
///
/// This is the default behavior and has no effect.
#[arg(
long,
env = "UV_SYSTEM_PYTHON",
value_parser = clap::builder::BoolishValueParser::new(),
overrides_with("no_system")
overrides_with("no_system"),
hide = true,
)]
pub system: bool,
/// This flag is included for compatibility only, it has no effect.
///
/// uv will never search for interpreters in virtual environments when
/// creating a virtual environment.
#[arg(long, overrides_with("system"), hide = true)]
pub no_system: bool,