Skip to content

Commit

Permalink
Tweak docs
Browse files Browse the repository at this point in the history
  • Loading branch information
charliermarsh committed Aug 8, 2024
1 parent f2e9b24 commit c62ce0c
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 47 deletions.
2 changes: 1 addition & 1 deletion crates/uv-build/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
9 changes: 5 additions & 4 deletions crates/uv-cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<PackageName>,

#[arg(
long,
overrides_with("no_build_isolation"),
Expand Down Expand Up @@ -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<PackageName>,

Expand Down
10 changes: 4 additions & 6 deletions crates/uv-settings/src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -351,12 +351,10 @@ pub struct ResolverInstallerOptions {
"#
)]
pub no_build_isolation: Option<bool>,

/// 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<PackageName>",
Expand Down Expand Up @@ -732,9 +730,9 @@ pub struct PipOptions {
"#
)]
pub no_build_isolation: Option<bool>,
/// 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 = "[]",
Expand Down
20 changes: 10 additions & 10 deletions crates/uv-types/src/builds.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
}
}

Expand All @@ -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
}
}
}
}
}
40 changes: 20 additions & 20 deletions docs/reference/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@ uv run [OPTIONS] <COMMAND>
</ul>
</dd><dt><code>--config-setting</code>, <code>-C</code> <i>config-setting</i></dt><dd><p>Settings to pass to the PEP 517 build backend, specified as <code>KEY=VALUE</code> pairs</p>

</dd><dt><code>--no-build-isolation-package</code> <i>no-build-isolation-package</i></dt><dd><p>Disable isolation when building source distributions for specified packages.</p>
</dd><dt><code>--no-build-isolation-package</code> <i>no-build-isolation-package</i></dt><dd><p>Disable isolation when building source distributions for a specific package.</p>

<p>Assumes that build dependencies specified by PEP 518 are already installed.</p>
<p>Assumes that the packages&#8217; build dependencies specified by PEP 518 are already installed.</p>

</dd><dt><code>--exclude-newer</code> <i>exclude-newer</i></dt><dd><p>Limit candidate packages to those that were uploaded prior to the given date.</p>

Expand Down Expand Up @@ -423,9 +423,9 @@ uv add [OPTIONS] <REQUIREMENTS>...
</ul>
</dd><dt><code>--config-setting</code>, <code>-C</code> <i>config-setting</i></dt><dd><p>Settings to pass to the PEP 517 build backend, specified as <code>KEY=VALUE</code> pairs</p>

</dd><dt><code>--no-build-isolation-package</code> <i>no-build-isolation-package</i></dt><dd><p>Disable isolation when building source distributions for specified packages.</p>
</dd><dt><code>--no-build-isolation-package</code> <i>no-build-isolation-package</i></dt><dd><p>Disable isolation when building source distributions for a specific package.</p>

<p>Assumes that build dependencies specified by PEP 518 are already installed.</p>
<p>Assumes that the packages&#8217; build dependencies specified by PEP 518 are already installed.</p>

</dd><dt><code>--exclude-newer</code> <i>exclude-newer</i></dt><dd><p>Limit candidate packages to those that were uploaded prior to the given date.</p>

Expand Down Expand Up @@ -614,9 +614,9 @@ uv remove [OPTIONS] <REQUIREMENTS>...
</ul>
</dd><dt><code>--config-setting</code>, <code>-C</code> <i>config-setting</i></dt><dd><p>Settings to pass to the PEP 517 build backend, specified as <code>KEY=VALUE</code> pairs</p>

</dd><dt><code>--no-build-isolation-package</code> <i>no-build-isolation-package</i></dt><dd><p>Disable isolation when building source distributions for specified packages.</p>
</dd><dt><code>--no-build-isolation-package</code> <i>no-build-isolation-package</i></dt><dd><p>Disable isolation when building source distributions for a specific package.</p>

<p>Assumes that build dependencies specified by PEP 518 are already installed.</p>
<p>Assumes that the packages&#8217; build dependencies specified by PEP 518 are already installed.</p>

</dd><dt><code>--exclude-newer</code> <i>exclude-newer</i></dt><dd><p>Limit candidate packages to those that were uploaded prior to the given date.</p>

Expand Down Expand Up @@ -801,9 +801,9 @@ uv sync [OPTIONS]
</ul>
</dd><dt><code>--config-setting</code>, <code>-C</code> <i>config-setting</i></dt><dd><p>Settings to pass to the PEP 517 build backend, specified as <code>KEY=VALUE</code> pairs</p>

</dd><dt><code>--no-build-isolation-package</code> <i>no-build-isolation-package</i></dt><dd><p>Disable isolation when building source distributions for specified packages.</p>
</dd><dt><code>--no-build-isolation-package</code> <i>no-build-isolation-package</i></dt><dd><p>Disable isolation when building source distributions for a specific package.</p>

<p>Assumes that build dependencies specified by PEP 518 are already installed.</p>
<p>Assumes that the packages&#8217; build dependencies specified by PEP 518 are already installed.</p>

</dd><dt><code>--exclude-newer</code> <i>exclude-newer</i></dt><dd><p>Limit candidate packages to those that were uploaded prior to the given date.</p>

Expand Down Expand Up @@ -982,9 +982,9 @@ uv lock [OPTIONS]
</ul>
</dd><dt><code>--config-setting</code>, <code>-C</code> <i>config-setting</i></dt><dd><p>Settings to pass to the PEP 517 build backend, specified as <code>KEY=VALUE</code> pairs</p>

</dd><dt><code>--no-build-isolation-package</code> <i>no-build-isolation-package</i></dt><dd><p>Disable isolation when building source distributions for specified packages.</p>
</dd><dt><code>--no-build-isolation-package</code> <i>no-build-isolation-package</i></dt><dd><p>Disable isolation when building source distributions for a specific package.</p>

<p>Assumes that build dependencies specified by PEP 518 are already installed.</p>
<p>Assumes that the packages&#8217; build dependencies specified by PEP 518 are already installed.</p>

</dd><dt><code>--exclude-newer</code> <i>exclude-newer</i></dt><dd><p>Limit candidate packages to those that were uploaded prior to the given date.</p>

Expand Down Expand Up @@ -1174,9 +1174,9 @@ uv tree [OPTIONS]
</ul>
</dd><dt><code>--config-setting</code>, <code>-C</code> <i>config-setting</i></dt><dd><p>Settings to pass to the PEP 517 build backend, specified as <code>KEY=VALUE</code> pairs</p>

</dd><dt><code>--no-build-isolation-package</code> <i>no-build-isolation-package</i></dt><dd><p>Disable isolation when building source distributions for specified packages.</p>
</dd><dt><code>--no-build-isolation-package</code> <i>no-build-isolation-package</i></dt><dd><p>Disable isolation when building source distributions for a specific package.</p>

<p>Assumes that build dependencies specified by PEP 518 are already installed.</p>
<p>Assumes that the packages&#8217; build dependencies specified by PEP 518 are already installed.</p>

</dd><dt><code>--exclude-newer</code> <i>exclude-newer</i></dt><dd><p>Limit candidate packages to those that were uploaded prior to the given date.</p>

Expand Down Expand Up @@ -1426,9 +1426,9 @@ uv tool run [OPTIONS] [COMMAND]
</ul>
</dd><dt><code>--config-setting</code>, <code>-C</code> <i>config-setting</i></dt><dd><p>Settings to pass to the PEP 517 build backend, specified as <code>KEY=VALUE</code> pairs</p>

</dd><dt><code>--no-build-isolation-package</code> <i>no-build-isolation-package</i></dt><dd><p>Disable isolation when building source distributions for specified packages.</p>
</dd><dt><code>--no-build-isolation-package</code> <i>no-build-isolation-package</i></dt><dd><p>Disable isolation when building source distributions for a specific package.</p>

<p>Assumes that build dependencies specified by PEP 518 are already installed.</p>
<p>Assumes that the packages&#8217; build dependencies specified by PEP 518 are already installed.</p>

</dd><dt><code>--exclude-newer</code> <i>exclude-newer</i></dt><dd><p>Limit candidate packages to those that were uploaded prior to the given date.</p>

Expand Down Expand Up @@ -1617,9 +1617,9 @@ uv tool install [OPTIONS] <PACKAGE>
</ul>
</dd><dt><code>--config-setting</code>, <code>-C</code> <i>config-setting</i></dt><dd><p>Settings to pass to the PEP 517 build backend, specified as <code>KEY=VALUE</code> pairs</p>

</dd><dt><code>--no-build-isolation-package</code> <i>no-build-isolation-package</i></dt><dd><p>Disable isolation when building source distributions for specified packages.</p>
</dd><dt><code>--no-build-isolation-package</code> <i>no-build-isolation-package</i></dt><dd><p>Disable isolation when building source distributions for a specific package.</p>

<p>Assumes that build dependencies specified by PEP 518 are already installed.</p>
<p>Assumes that the packages&#8217; build dependencies specified by PEP 518 are already installed.</p>

</dd><dt><code>--exclude-newer</code> <i>exclude-newer</i></dt><dd><p>Limit candidate packages to those that were uploaded prior to the given date.</p>

Expand Down Expand Up @@ -2496,9 +2496,9 @@ uv pip compile [OPTIONS] <SRC_FILE>...
</ul>
</dd><dt><code>--config-setting</code>, <code>-C</code> <i>config-setting</i></dt><dd><p>Settings to pass to the PEP 517 build backend, specified as <code>KEY=VALUE</code> pairs</p>

</dd><dt><code>--no-build-isolation-package</code> <i>no-build-isolation-package</i></dt><dd><p>Disable isolation when building source distributions for specified packages.</p>
</dd><dt><code>--no-build-isolation-package</code> <i>no-build-isolation-package</i></dt><dd><p>Disable isolation when building source distributions for a specific package.</p>

<p>Assumes that build dependencies specified by PEP 518 are already installed.</p>
<p>Assumes that the packages&#8217; build dependencies specified by PEP 518 are already installed.</p>

</dd><dt><code>--exclude-newer</code> <i>exclude-newer</i></dt><dd><p>Limit candidate packages to those that were uploaded prior to the given date.</p>

Expand Down Expand Up @@ -3009,9 +3009,9 @@ uv pip install [OPTIONS] <PACKAGE|--requirement <REQUIREMENT>|--editable <EDITAB
</ul>
</dd><dt><code>--config-setting</code>, <code>-C</code> <i>config-setting</i></dt><dd><p>Settings to pass to the PEP 517 build backend, specified as <code>KEY=VALUE</code> pairs</p>

</dd><dt><code>--no-build-isolation-package</code> <i>no-build-isolation-package</i></dt><dd><p>Disable isolation when building source distributions for specified packages.</p>
</dd><dt><code>--no-build-isolation-package</code> <i>no-build-isolation-package</i></dt><dd><p>Disable isolation when building source distributions for a specific package.</p>

<p>Assumes that build dependencies specified by PEP 518 are already installed.</p>
<p>Assumes that the packages&#8217; build dependencies specified by PEP 518 are already installed.</p>

</dd><dt><code>--exclude-newer</code> <i>exclude-newer</i></dt><dd><p>Limit candidate packages to those that were uploaded prior to the given date.</p>

Expand Down
8 changes: 4 additions & 4 deletions docs/reference/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**: `[]`
Expand Down Expand Up @@ -1752,9 +1752,9 @@ are already installed.
#### [`no-build-isolation-package`](#pip_no-build-isolation-package) {: #pip_no-build-isolation-package }
<span id="no-build-isolation-package"></span>

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**: `[]`
Expand Down
4 changes: 2 additions & 2 deletions uv.schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c62ce0c

Please sign in to comment.