Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add UV_LINK_MODE as env variable #3315

Merged
merged 1 commit into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,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_LINK_MODE`: Equivalent to the `--link-mode` command-line argument. If set, uv will use this
as a link mode.

In each case, the corresponding command-line argument takes precedence over an environment variable.

Expand Down
8 changes: 4 additions & 4 deletions crates/uv/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ pub(crate) struct PipCompileArgs {
///
/// Defaults to `clone` (also known as Copy-on-Write) on macOS, and `hardlink` on Linux and
/// Windows.
#[arg(long, value_enum)]
#[arg(long, value_enum, env = "UV_LINK_MODE")]
pub(crate) link_mode: Option<install_wheel_rs::linker::LinkMode>,

/// The URL of the Python package index (by default: <https://pypi.org/simple>).
Expand Down Expand Up @@ -644,7 +644,7 @@ pub(crate) struct PipSyncArgs {
///
/// Defaults to `clone` (also known as Copy-on-Write) on macOS, and `hardlink` on Linux and
/// Windows.
#[arg(long, value_enum)]
#[arg(long, value_enum, env = "UV_LINK_MODE")]
pub(crate) link_mode: Option<install_wheel_rs::linker::LinkMode>,

/// The URL of the Python package index (by default: <https://pypi.org/simple>).
Expand Down Expand Up @@ -995,7 +995,7 @@ pub(crate) struct PipInstallArgs {
///
/// Defaults to `clone` (also known as Copy-on-Write) on macOS, and `hardlink` on Linux and
/// Windows.
#[arg(long, value_enum)]
#[arg(long, value_enum, env = "UV_LINK_MODE")]
pub(crate) link_mode: Option<install_wheel_rs::linker::LinkMode>,

/// The strategy to use when selecting between the different compatible versions for a given
Expand Down Expand Up @@ -1641,7 +1641,7 @@ pub(crate) struct VenvArgs {
///
/// Defaults to `clone` (also known as Copy-on-Write) on macOS, and `hardlink` on Linux and
/// Windows.
#[arg(long, value_enum)]
#[arg(long, value_enum, env = "UV_LINK_MODE")]
pub(crate) link_mode: Option<install_wheel_rs::linker::LinkMode>,

/// The URL of the Python package index (by default: <https://pypi.org/simple>).
Expand Down
Loading