mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 13:25:00 +00:00
Add UV_OVERRIDE
environment variable for --override
(#4836)
Closes https://github.com/astral-sh/uv/issues/4827
This commit is contained in:
parent
3fa09a3972
commit
f450b45780
3 changed files with 14 additions and 6 deletions
|
@ -574,6 +574,8 @@ uv accepts the following command-line arguments as environment variables:
|
|||
uv will require that all dependencies have a hash specified in the requirements file.
|
||||
- `UV_CONSTRAINT`: Equivalent to the `--constraint` command-line argument. If set, uv will use this
|
||||
file as the constraints file. Uses space-separated list of files.
|
||||
- `UV_OVERRIDE`: Equivalent to the `--override` command-line argument. If set, uv will use this
|
||||
file as the overrides file. Uses space-separated list of files.
|
||||
- `UV_LINK_MODE`: Equivalent to the `--link-mode` command-line argument. If set, uv will use this
|
||||
as a link mode.
|
||||
- `UV_NO_BUILD_ISOLATION`: Equivalent to the `--no-build-isolation` command-line argument. If set,
|
||||
|
|
|
@ -373,8 +373,8 @@ pub struct PipCompileArgs {
|
|||
/// While constraints are _additive_, in that they're combined with the requirements of the
|
||||
/// constituent packages, overrides are _absolute_, in that they completely replace the
|
||||
/// requirements of the constituent packages.
|
||||
#[arg(long, value_parser = parse_file_path)]
|
||||
pub r#override: Vec<PathBuf>,
|
||||
#[arg(long, env = "UV_OVERRIDE", value_delimiter = ' ', value_parser = parse_maybe_file_path)]
|
||||
pub r#override: Vec<Maybe<PathBuf>>,
|
||||
|
||||
/// Include optional dependencies from the extra group name; may be provided more than once.
|
||||
/// Only applies to `pyproject.toml`, `setup.py`, and `setup.cfg` sources.
|
||||
|
@ -906,8 +906,8 @@ pub struct PipInstallArgs {
|
|||
/// While constraints are _additive_, in that they're combined with the requirements of the
|
||||
/// constituent packages, overrides are _absolute_, in that they completely replace the
|
||||
/// requirements of the constituent packages.
|
||||
#[arg(long, value_parser = parse_file_path)]
|
||||
pub r#override: Vec<PathBuf>,
|
||||
#[arg(long, env = "UV_OVERRIDE", value_delimiter = ' ', value_parser = parse_maybe_file_path)]
|
||||
pub r#override: Vec<Maybe<PathBuf>>,
|
||||
|
||||
/// Include optional dependencies from the extra group name; may be provided more than once.
|
||||
/// Only applies to `pyproject.toml`, `setup.py`, and `setup.cfg` sources.
|
||||
|
|
|
@ -684,7 +684,10 @@ impl PipCompileSettings {
|
|||
.into_iter()
|
||||
.filter_map(Maybe::into_option)
|
||||
.collect(),
|
||||
r#override,
|
||||
r#override: r#override
|
||||
.into_iter()
|
||||
.filter_map(Maybe::into_option)
|
||||
.collect(),
|
||||
overrides_from_workspace,
|
||||
refresh: Refresh::from(refresh),
|
||||
settings: PipSettings::combine(
|
||||
|
@ -890,7 +893,10 @@ impl PipInstallSettings {
|
|||
.into_iter()
|
||||
.filter_map(Maybe::into_option)
|
||||
.collect(),
|
||||
r#override,
|
||||
r#override: r#override
|
||||
.into_iter()
|
||||
.filter_map(Maybe::into_option)
|
||||
.collect(),
|
||||
dry_run,
|
||||
overrides_from_workspace,
|
||||
refresh: Refresh::from(refresh),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue