diff --git a/crates/uv-build/src/lib.rs b/crates/uv-build/src/lib.rs index c162e086f919..03a08dbb5ad4 100644 --- a/crates/uv-build/src/lib.rs +++ b/crates/uv-build/src/lib.rs @@ -437,7 +437,7 @@ impl SourceBuild { let package_name = project.clone().map(|p| p.name); // Create a virtual environment, or install into the shared environment if requested. - let venv = if let Some(venv) = build_isolation.shared_environment(package_name.as_ref()) { + let venv = if let Some(venv) = build_isolation.shared_environment(package_name.as_ref()) { venv.clone() } else { uv_virtualenv::create_venv( diff --git a/crates/uv-cli/src/lib.rs b/crates/uv-cli/src/lib.rs index 04e56e3d4bed..ba0bc0f46c3a 100644 --- a/crates/uv-cli/src/lib.rs +++ b/crates/uv-cli/src/lib.rs @@ -3034,11 +3034,12 @@ pub struct ResolverArgs { )] pub no_build_isolation: bool, - /// Disable isolation when building source distributions for specified packages. + /// Disable isolation when building source distributions for a specific package. /// - /// Assumes that build dependencies specified by PEP 518 are already installed. + /// Assumes that the packages' build dependencies specified by PEP 518 are already installed. #[arg(long, help_heading = "Build options")] pub no_build_isolation_package: Vec, + #[arg( long, overrides_with("no_build_isolation"), @@ -3204,9 +3205,9 @@ pub struct ResolverInstallerArgs { )] pub no_build_isolation: bool, - /// Disable isolation when building source distributions for specified packages. + /// Disable isolation when building source distributions for a specific package. /// - /// Assumes that build dependencies specified by PEP 518 are already installed. + /// Assumes that the packages' build dependencies specified by PEP 518 are already installed. #[arg(long, help_heading = "Build options")] pub no_build_isolation_package: Vec, diff --git a/crates/uv-settings/src/settings.rs b/crates/uv-settings/src/settings.rs index 80c172f800e1..fd631010f03d 100644 --- a/crates/uv-settings/src/settings.rs +++ b/crates/uv-settings/src/settings.rs @@ -351,12 +351,10 @@ pub struct ResolverInstallerOptions { "# )] pub no_build_isolation: Option, - - /// Disable isolation when building source distributions. + /// Disable isolation when building source distributions for a specific package. /// - /// Assumes that build dependencies specified by [PEP 518](https://peps.python.org/pep-0518/) + /// Assumes that the packages' build dependencies specified by [PEP 518](https://peps.python.org/pep-0518/) /// are already installed. - /// #[option( default = "[]", value_type = "Vec", @@ -732,9 +730,9 @@ pub struct PipOptions { "# )] pub no_build_isolation: Option, - /// Disable isolation when building source distributions. + /// Disable isolation when building source distributions for a specific package. /// - /// Assumes that build dependencies specified by [PEP 518](https://peps.python.org/pep-0518/) + /// Assumes that the packages' build dependencies specified by [PEP 518](https://peps.python.org/pep-0518/) /// are already installed. #[option( default = "[]", diff --git a/crates/uv-types/src/builds.rs b/crates/uv-types/src/builds.rs index deca2b4a0c83..5aec6fd37a67 100644 --- a/crates/uv-types/src/builds.rs +++ b/crates/uv-types/src/builds.rs @@ -16,9 +16,9 @@ impl<'a> BuildIsolation<'a> { match self { Self::Isolated => true, Self::Shared(_) => false, - Self::SharedPackage(_, packages) => package.map_or(true, |package| { - !packages.iter().any(|p| p == package) - }), + Self::SharedPackage(_, packages) => { + package.map_or(true, |package| !packages.iter().any(|p| p == package)) + } } } @@ -27,13 +27,13 @@ impl<'a> BuildIsolation<'a> { match self { Self::Isolated => None, Self::Shared(env) => Some(env), - Self::SharedPackage(env, packages) => if package.is_some_and(|package| { - packages.iter().any(|p| p == package) - }) { - Some(env) - } else { - None - }, + Self::SharedPackage(env, packages) => { + if package.is_some_and(|package| packages.iter().any(|p| p == package)) { + Some(env) + } else { + None + } + } } } } diff --git a/docs/reference/cli.md b/docs/reference/cli.md index e1bec745a26c..f9394b1f3807 100644 --- a/docs/reference/cli.md +++ b/docs/reference/cli.md @@ -144,9 +144,9 @@ uv run [OPTIONS]
--config-setting, -C config-setting

Settings to pass to the PEP 517 build backend, specified as KEY=VALUE pairs

-
--no-build-isolation-package no-build-isolation-package

Disable isolation when building source distributions for specified packages.

+
--no-build-isolation-package no-build-isolation-package

Disable isolation when building source distributions for a specific package.

-

Assumes that build dependencies specified by PEP 518 are already installed.

+

Assumes that the packages’ build dependencies specified by PEP 518 are already installed.

--exclude-newer exclude-newer

Limit candidate packages to those that were uploaded prior to the given date.

@@ -423,9 +423,9 @@ uv add [OPTIONS] ...
--config-setting, -C config-setting

Settings to pass to the PEP 517 build backend, specified as KEY=VALUE pairs

-
--no-build-isolation-package no-build-isolation-package

Disable isolation when building source distributions for specified packages.

+
--no-build-isolation-package no-build-isolation-package

Disable isolation when building source distributions for a specific package.

-

Assumes that build dependencies specified by PEP 518 are already installed.

+

Assumes that the packages’ build dependencies specified by PEP 518 are already installed.

--exclude-newer exclude-newer

Limit candidate packages to those that were uploaded prior to the given date.

@@ -614,9 +614,9 @@ uv remove [OPTIONS] ...
--config-setting, -C config-setting

Settings to pass to the PEP 517 build backend, specified as KEY=VALUE pairs

-
--no-build-isolation-package no-build-isolation-package

Disable isolation when building source distributions for specified packages.

+
--no-build-isolation-package no-build-isolation-package

Disable isolation when building source distributions for a specific package.

-

Assumes that build dependencies specified by PEP 518 are already installed.

+

Assumes that the packages’ build dependencies specified by PEP 518 are already installed.

--exclude-newer exclude-newer

Limit candidate packages to those that were uploaded prior to the given date.

@@ -801,9 +801,9 @@ uv sync [OPTIONS]
--config-setting, -C config-setting

Settings to pass to the PEP 517 build backend, specified as KEY=VALUE pairs

-
--no-build-isolation-package no-build-isolation-package

Disable isolation when building source distributions for specified packages.

+
--no-build-isolation-package no-build-isolation-package

Disable isolation when building source distributions for a specific package.

-

Assumes that build dependencies specified by PEP 518 are already installed.

+

Assumes that the packages’ build dependencies specified by PEP 518 are already installed.

--exclude-newer exclude-newer

Limit candidate packages to those that were uploaded prior to the given date.

@@ -982,9 +982,9 @@ uv lock [OPTIONS]
--config-setting, -C config-setting

Settings to pass to the PEP 517 build backend, specified as KEY=VALUE pairs

-
--no-build-isolation-package no-build-isolation-package

Disable isolation when building source distributions for specified packages.

+
--no-build-isolation-package no-build-isolation-package

Disable isolation when building source distributions for a specific package.

-

Assumes that build dependencies specified by PEP 518 are already installed.

+

Assumes that the packages’ build dependencies specified by PEP 518 are already installed.

--exclude-newer exclude-newer

Limit candidate packages to those that were uploaded prior to the given date.

@@ -1174,9 +1174,9 @@ uv tree [OPTIONS]
--config-setting, -C config-setting

Settings to pass to the PEP 517 build backend, specified as KEY=VALUE pairs

-
--no-build-isolation-package no-build-isolation-package

Disable isolation when building source distributions for specified packages.

+
--no-build-isolation-package no-build-isolation-package

Disable isolation when building source distributions for a specific package.

-

Assumes that build dependencies specified by PEP 518 are already installed.

+

Assumes that the packages’ build dependencies specified by PEP 518 are already installed.

--exclude-newer exclude-newer

Limit candidate packages to those that were uploaded prior to the given date.

@@ -1426,9 +1426,9 @@ uv tool run [OPTIONS] [COMMAND]
--config-setting, -C config-setting

Settings to pass to the PEP 517 build backend, specified as KEY=VALUE pairs

-
--no-build-isolation-package no-build-isolation-package

Disable isolation when building source distributions for specified packages.

+
--no-build-isolation-package no-build-isolation-package

Disable isolation when building source distributions for a specific package.

-

Assumes that build dependencies specified by PEP 518 are already installed.

+

Assumes that the packages’ build dependencies specified by PEP 518 are already installed.

--exclude-newer exclude-newer

Limit candidate packages to those that were uploaded prior to the given date.

@@ -1617,9 +1617,9 @@ uv tool install [OPTIONS]
--config-setting, -C config-setting

Settings to pass to the PEP 517 build backend, specified as KEY=VALUE pairs

-
--no-build-isolation-package no-build-isolation-package

Disable isolation when building source distributions for specified packages.

+
--no-build-isolation-package no-build-isolation-package

Disable isolation when building source distributions for a specific package.

-

Assumes that build dependencies specified by PEP 518 are already installed.

+

Assumes that the packages’ build dependencies specified by PEP 518 are already installed.

--exclude-newer exclude-newer

Limit candidate packages to those that were uploaded prior to the given date.

@@ -2496,9 +2496,9 @@ uv pip compile [OPTIONS] ...
--config-setting, -C config-setting

Settings to pass to the PEP 517 build backend, specified as KEY=VALUE pairs

-
--no-build-isolation-package no-build-isolation-package

Disable isolation when building source distributions for specified packages.

+
--no-build-isolation-package no-build-isolation-package

Disable isolation when building source distributions for a specific package.

-

Assumes that build dependencies specified by PEP 518 are already installed.

+

Assumes that the packages’ build dependencies specified by PEP 518 are already installed.

--exclude-newer exclude-newer

Limit candidate packages to those that were uploaded prior to the given date.

@@ -3009,9 +3009,9 @@ uv pip install [OPTIONS] |--editable
--config-setting, -C config-setting

Settings to pass to the PEP 517 build backend, specified as KEY=VALUE pairs

-
--no-build-isolation-package no-build-isolation-package

Disable isolation when building source distributions for specified packages.

+
--no-build-isolation-package no-build-isolation-package

Disable isolation when building source distributions for a specific package.

-

Assumes that build dependencies specified by PEP 518 are already installed.

+

Assumes that the packages’ build dependencies specified by PEP 518 are already installed.

--exclude-newer exclude-newer

Limit candidate packages to those that were uploaded prior to the given date.

diff --git a/docs/reference/settings.md b/docs/reference/settings.md index a8e0874c0a48..bf5d2621a589 100644 --- a/docs/reference/settings.md +++ b/docs/reference/settings.md @@ -478,9 +478,9 @@ are already installed. #### [`no-build-isolation-package`](#no-build-isolation-package) {: #no-build-isolation-package } -Disable isolation when building source distributions. +Disable isolation when building source distributions for a specific package. -Assumes that build dependencies specified by [PEP 518](https://peps.python.org/pep-0518/) +Assumes that the packages' build dependencies specified by [PEP 518](https://peps.python.org/pep-0518/) are already installed. **Default value**: `[]` @@ -1752,9 +1752,9 @@ are already installed. #### [`no-build-isolation-package`](#pip_no-build-isolation-package) {: #pip_no-build-isolation-package } -Disable isolation when building source distributions. +Disable isolation when building source distributions for a specific package. -Assumes that build dependencies specified by [PEP 518](https://peps.python.org/pep-0518/) +Assumes that the packages' build dependencies specified by [PEP 518](https://peps.python.org/pep-0518/) are already installed. **Default value**: `[]` diff --git a/uv.schema.json b/uv.schema.json index 844cdb1c634e..8b3e09f81058 100644 --- a/uv.schema.json +++ b/uv.schema.json @@ -169,7 +169,7 @@ ] }, "no-build-isolation-package": { - "description": "Disable isolation when building source distributions.\n\nAssumes that build dependencies specified by [PEP 518](https://peps.python.org/pep-0518/) are already installed.", + "description": "Disable isolation when building source distributions for a specific package.\n\nAssumes that the packages' build dependencies specified by [PEP 518](https://peps.python.org/pep-0518/) are already installed.", "type": [ "array", "null" @@ -761,7 +761,7 @@ ] }, "no-build-isolation-package": { - "description": "Disable isolation when building source distributions.\n\nAssumes that build dependencies specified by [PEP 518](https://peps.python.org/pep-0518/) are already installed.", + "description": "Disable isolation when building source distributions for a specific package.\n\nAssumes that the packages' build dependencies specified by [PEP 518](https://peps.python.org/pep-0518/) are already installed.", "type": [ "array", "null"