mirror of https://github.com/astral-sh/uv
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
|
|
@ -439,8 +439,10 @@ uv accepts the following command-line arguments as environment variables:
|
||||||
directory for caching instead of the default cache directory.
|
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
|
- `UV_NO_CACHE`: Equivalent to the `--no-cache` command-line argument. If set, uv will not use the
|
||||||
cache for any operations.
|
cache for any operations.
|
||||||
- `UV_PRERELEASE`: Equivalent to the `--prerelease` command-line argument. If set to `allow`, uv
|
- `UV_RESOLUTION`: Equivalent to the `--resolution` command-line argument. For example, if set to
|
||||||
will allow pre-release versions for all dependencies.
|
`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
|
- `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`.
|
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
|
WARNING: `UV_SYSTEM_PYTHON=true` is intended for use in continuous integration (CI) environments and
|
||||||
|
|
|
||||||
|
|
@ -306,7 +306,7 @@ struct PipCompileArgs {
|
||||||
#[clap(long)]
|
#[clap(long)]
|
||||||
no_deps: bool,
|
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,
|
resolution: ResolutionMode,
|
||||||
|
|
||||||
#[clap(long, value_enum, default_value_t = PreReleaseMode::default(), conflicts_with = "pre", env = "UV_PRERELEASE")]
|
#[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())]
|
#[clap(long, value_enum, default_value_t = install_wheel_rs::linker::LinkMode::default())]
|
||||||
link_mode: install_wheel_rs::linker::LinkMode,
|
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,
|
resolution: ResolutionMode,
|
||||||
|
|
||||||
#[clap(long, value_enum, default_value_t = PreReleaseMode::default(), conflicts_with = "pre", env = "UV_PRERELEASE")]
|
#[clap(long, value_enum, default_value_t = PreReleaseMode::default(), conflicts_with = "pre", env = "UV_PRERELEASE")]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue