mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 19:08:04 +00:00
Add UV_RESOLUTION
environment variable for --resolution
(#2720)
Closes https://github.com/astral-sh/uv/issues/2710.
This commit is contained in:
parent
27b96211a2
commit
ce5df77ecb
2 changed files with 6 additions and 4 deletions
|
@ -439,8 +439,10 @@ uv accepts the following command-line arguments as environment variables:
|
|||
directory for caching instead of the default cache directory.
|
||||
- `UV_NO_CACHE`: Equivalent to the `--no-cache` command-line argument. If set, uv will not use the
|
||||
cache for any operations.
|
||||
- `UV_PRERELEASE`: Equivalent to the `--prerelease` command-line argument. If set to `allow`, uv
|
||||
will allow pre-release versions for all dependencies.
|
||||
- `UV_RESOLUTION`: Equivalent to the `--resolution` command-line argument. For example, if set to
|
||||
`lowest-direct`, uv will install the lowest compatible versions of all direct dependencies.
|
||||
- `UV_PRERELEASE`: Equivalent to the `--prerelease` command-line argument. For example, if set to
|
||||
`allow`, uv will allow pre-release versions for all dependencies.
|
||||
- `UV_SYSTEM_PYTHON`: Equivalent to the `--system` command-line argument. If set to `true`, uv
|
||||
will use the first Python interpreter found in the system `PATH`.
|
||||
WARNING: `UV_SYSTEM_PYTHON=true` is intended for use in continuous integration (CI) environments and
|
||||
|
|
|
@ -306,7 +306,7 @@ struct PipCompileArgs {
|
|||
#[clap(long)]
|
||||
no_deps: bool,
|
||||
|
||||
#[clap(long, value_enum, default_value_t = ResolutionMode::default())]
|
||||
#[clap(long, value_enum, default_value_t = ResolutionMode::default(), env = "UV_RESOLUTION")]
|
||||
resolution: ResolutionMode,
|
||||
|
||||
#[clap(long, value_enum, default_value_t = PreReleaseMode::default(), conflicts_with = "pre", env = "UV_PRERELEASE")]
|
||||
|
@ -781,7 +781,7 @@ struct PipInstallArgs {
|
|||
#[clap(long, value_enum, default_value_t = install_wheel_rs::linker::LinkMode::default())]
|
||||
link_mode: install_wheel_rs::linker::LinkMode,
|
||||
|
||||
#[clap(long, value_enum, default_value_t = ResolutionMode::default())]
|
||||
#[clap(long, value_enum, default_value_t = ResolutionMode::default(), env = "UV_RESOLUTION")]
|
||||
resolution: ResolutionMode,
|
||||
|
||||
#[clap(long, value_enum, default_value_t = PreReleaseMode::default(), conflicts_with = "pre", env = "UV_PRERELEASE")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue