Add only-emit-workspace and similar variants to uv export (#16681)
Some checks are pending
CI / mkdocs (push) Waiting to run
CI / Determine changes (push) Waiting to run
CI / lint (push) Waiting to run
CI / cargo clippy | ubuntu (push) Blocked by required conditions
CI / cargo clippy | windows (push) Blocked by required conditions
CI / cargo dev generate-all (push) Blocked by required conditions
CI / cargo shear (push) Waiting to run
CI / cargo test | ubuntu (push) Blocked by required conditions
CI / cargo test | macos (push) Blocked by required conditions
CI / cargo test | windows (push) Blocked by required conditions
CI / check windows trampoline | aarch64 (push) Blocked by required conditions
CI / check windows trampoline | i686 (push) Blocked by required conditions
CI / build binary | macos aarch64 (push) Blocked by required conditions
CI / check windows trampoline | x86_64 (push) Blocked by required conditions
CI / test windows trampoline | aarch64 (push) Blocked by required conditions
CI / test windows trampoline | i686 (push) Blocked by required conditions
CI / test windows trampoline | x86_64 (push) Blocked by required conditions
CI / typos (push) Waiting to run
CI / build binary | linux libc (push) Blocked by required conditions
CI / smoke test | linux aarch64 (push) Blocked by required conditions
CI / build binary | linux aarch64 (push) Blocked by required conditions
CI / build binary | linux musl (push) Blocked by required conditions
CI / ecosystem test | pydantic/pydantic-core (push) Blocked by required conditions
CI / build binary | macos x86_64 (push) Blocked by required conditions
CI / build binary | windows x86_64 (push) Blocked by required conditions
CI / build binary | windows aarch64 (push) Blocked by required conditions
CI / build binary | msrv (push) Blocked by required conditions
CI / build binary | freebsd (push) Blocked by required conditions
CI / ecosystem test | prefecthq/prefect (push) Blocked by required conditions
CI / ecosystem test | pallets/flask (push) Blocked by required conditions
CI / smoke test | linux (push) Blocked by required conditions
CI / check system | alpine (push) Blocked by required conditions
CI / smoke test | macos (push) Blocked by required conditions
CI / smoke test | windows x86_64 (push) Blocked by required conditions
CI / smoke test | windows aarch64 (push) Blocked by required conditions
CI / integration test | activate nushell venv (push) Blocked by required conditions
CI / integration test | conda on ubuntu (push) Blocked by required conditions
CI / integration test | uv publish (push) Blocked by required conditions
CI / integration test | deadsnakes python3.9 on ubuntu (push) Blocked by required conditions
CI / integration test | free-threaded on windows (push) Blocked by required conditions
CI / integration test | aarch64 windows implicit (push) Blocked by required conditions
CI / integration test | aarch64 windows explicit (push) Blocked by required conditions
CI / integration test | windows python install manager (push) Blocked by required conditions
CI / integration test | pypy on ubuntu (push) Blocked by required conditions
CI / integration test | pypy on windows (push) Blocked by required conditions
CI / integration test | graalpy on ubuntu (push) Blocked by required conditions
CI / integration test | graalpy on windows (push) Blocked by required conditions
CI / integration test | pyodide on ubuntu (push) Blocked by required conditions
CI / integration test | github actions (push) Blocked by required conditions
CI / integration test | free-threaded python on github actions (push) Blocked by required conditions
CI / integration test | pyenv on wsl x86-64 (push) Blocked by required conditions
CI / integration test | determine publish changes (push) Blocked by required conditions
CI / integration test | registries (push) Blocked by required conditions
CI / integration test | uv_build (push) Blocked by required conditions
CI / check cache | ubuntu (push) Blocked by required conditions
CI / check cache | macos aarch64 (push) Blocked by required conditions
CI / check system | python on debian (push) Blocked by required conditions
CI / check system | python on fedora (push) Blocked by required conditions
CI / check system | python on ubuntu (push) Blocked by required conditions
CI / check system | python on rocky linux 10 (push) Blocked by required conditions
CI / check system | python on rocky linux 8 (push) Blocked by required conditions
CI / check system | python on rocky linux 9 (push) Blocked by required conditions
CI / check system | graalpy on ubuntu (push) Blocked by required conditions
CI / check system | pypy on ubuntu (push) Blocked by required conditions
CI / check system | pyston (push) Blocked by required conditions
CI / check system | python on macos aarch64 (push) Blocked by required conditions
CI / check system | homebrew python on macos aarch64 (push) Blocked by required conditions
CI / check system | x86-64 python on macos aarch64 (push) Blocked by required conditions
CI / check system | python on macos x86-64 (push) Blocked by required conditions
CI / check system | python3.10 on windows x86-64 (push) Blocked by required conditions
CI / check system | python3.10 on windows x86 (push) Blocked by required conditions
CI / check system | python3.13 on windows x86-64 (push) Blocked by required conditions
CI / check system | x86-64 python3.13 on windows aarch64 (push) Blocked by required conditions
CI / check system | aarch64 python3.13 on windows aarch64 (push) Blocked by required conditions
CI / check system | windows registry (push) Blocked by required conditions
CI / check system | python3.12 via chocolatey (push) Blocked by required conditions
CI / check system | python3.9 via pyenv (push) Blocked by required conditions
CI / check system | conda3.11 on windows x86-64 (push) Blocked by required conditions
CI / check system | conda3.8 on windows x86-64 (push) Blocked by required conditions
CI / check system | python3.13 (push) Blocked by required conditions
CI / check system | conda3.11 on macos aarch64 (push) Blocked by required conditions
CI / check system | conda3.8 on macos aarch64 (push) Blocked by required conditions
CI / check system | conda3.11 on linux x86-64 (push) Blocked by required conditions
CI / check system | conda3.8 on linux x86-64 (push) Blocked by required conditions
CI / check system | amazonlinux (push) Blocked by required conditions
CI / check system | embedded python3.10 on windows x86-64 (push) Blocked by required conditions
CI / benchmarks | walltime aarch64 linux (push) Blocked by required conditions
CI / benchmarks | instrumented (push) Blocked by required conditions
zizmor / Run zizmor (push) Waiting to run

## Summary

This is useful for scenarios in which you want to emit the workspace
dependencies, but nothing else.
This commit is contained in:
Charlie Marsh 2025-11-12 11:51:45 -05:00 committed by GitHub
parent ae1edef9c0
commit 2c0d166260
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 408 additions and 19 deletions

View file

@ -3713,35 +3713,63 @@ pub struct SyncArgs {
/// of its dependencies are still installed. This is particularly useful in situations like
/// building Docker images where installing the project separately from its dependencies allows
/// optimal layer caching.
#[arg(long)]
///
/// The inverse `--only-install-project` can be used to install _only_ the project itself,
/// excluding all dependencies.
#[arg(long, conflicts_with = "only_install_project")]
pub no_install_project: bool,
/// Only install the current project.
#[arg(long, conflicts_with = "no_install_project", hide = true)]
pub only_install_project: bool,
/// Do not install any workspace members, including the root project.
///
/// By default, all of the workspace members and their dependencies are installed into the
/// By default, all workspace members and their dependencies are installed into the
/// environment. The `--no-install-workspace` option allows exclusion of all the workspace
/// members while retaining their dependencies. This is particularly useful in situations like
/// building Docker images where installing the workspace separately from its dependencies
/// allows optimal layer caching.
#[arg(long)]
///
/// The inverse `--only-install-workspace` can be used to install _only_ workspace members,
/// excluding all other dependencies.
#[arg(long, conflicts_with = "only_install_workspace")]
pub no_install_workspace: bool,
/// Only install workspace members, including the root project.
#[arg(long, conflicts_with = "no_install_workspace", hide = true)]
pub only_install_workspace: bool,
/// Do not install local path dependencies
///
/// Skips the current project, workspace members, and any other local (path or editable)
/// packages. Only remote/indexed dependencies are installed. Useful in Docker builds to cache
/// heavy third-party dependencies first and layer local packages separately.
#[arg(long)]
///
/// The inverse `--only-install-local` can be used to install _only_ local packages, excluding
/// all remote dependencies.
#[arg(long, conflicts_with = "only_install_local")]
pub no_install_local: bool,
/// Only install local path dependencies
#[arg(long, conflicts_with = "no_install_local", hide = true)]
pub only_install_local: bool,
/// Do not install the given package(s).
///
/// By default, all of the project's dependencies are installed into the environment. The
/// `--no-install-package` option allows exclusion of specific packages. Note this can result
/// in a broken environment, and should be used with caution.
#[arg(long)]
///
/// The inverse `--only-install-package` can be used to install _only_ the specified packages,
/// excluding all others.
#[arg(long, conflicts_with = "only_install_package")]
pub no_install_package: Vec<PackageName>,
/// Only install the given package(s).
#[arg(long, conflicts_with = "no_install_package", hide = true)]
pub only_install_package: Vec<PackageName>,
/// Assert that the `uv.lock` will remain unchanged.
///
/// Requires that the lockfile is up-to-date. If the lockfile is missing or needs to be updated,
@ -4158,26 +4186,106 @@ pub struct AddArgs {
/// its dependencies are still installed. This is particularly useful in situations like building
/// Docker images where installing the project separately from its dependencies allows optimal
/// layer caching.
#[arg(long, conflicts_with = "frozen", conflicts_with = "no_sync")]
///
/// The inverse `--only-install-project` can be used to install _only_ the project itself,
/// excluding all dependencies.
#[arg(
long,
conflicts_with = "frozen",
conflicts_with = "no_sync",
conflicts_with = "only_install_project"
)]
pub no_install_project: bool,
/// Only install the current project.
#[arg(
long,
conflicts_with = "frozen",
conflicts_with = "no_sync",
conflicts_with = "no_install_project",
hide = true
)]
pub only_install_project: bool,
/// Do not install any workspace members, including the current project.
///
/// By default, all of the workspace members and their dependencies are installed into the
/// By default, all workspace members and their dependencies are installed into the
/// environment. The `--no-install-workspace` option allows exclusion of all the workspace
/// members while retaining their dependencies. This is particularly useful in situations like
/// building Docker images where installing the workspace separately from its dependencies
/// allows optimal layer caching.
#[arg(long, conflicts_with = "frozen", conflicts_with = "no_sync")]
///
/// The inverse `--only-install-workspace` can be used to install _only_ workspace members,
/// excluding all other dependencies.
#[arg(
long,
conflicts_with = "frozen",
conflicts_with = "no_sync",
conflicts_with = "only_install_workspace"
)]
pub no_install_workspace: bool,
/// Only install workspace members, including the current project.
#[arg(
long,
conflicts_with = "frozen",
conflicts_with = "no_sync",
conflicts_with = "no_install_workspace",
hide = true
)]
pub only_install_workspace: bool,
/// Do not install local path dependencies
///
/// Skips the current project, workspace members, and any other local (path or editable)
/// packages. Only remote/indexed dependencies are installed. Useful in Docker builds to cache
/// heavy third-party dependencies first and layer local packages separately.
#[arg(long, conflicts_with = "frozen", conflicts_with = "no_sync")]
///
/// The inverse `--only-install-local` can be used to install _only_ local packages, excluding
/// all remote dependencies.
#[arg(
long,
conflicts_with = "frozen",
conflicts_with = "no_sync",
conflicts_with = "only_install_local"
)]
pub no_install_local: bool,
/// Only install local path dependencies
#[arg(
long,
conflicts_with = "frozen",
conflicts_with = "no_sync",
conflicts_with = "no_install_local",
hide = true
)]
pub only_install_local: bool,
/// Do not install the given package(s).
///
/// By default, all project's dependencies are installed into the environment. The
/// `--no-install-package` option allows exclusion of specific packages. Note this can result
/// in a broken environment, and should be used with caution.
///
/// The inverse `--only-install-package` can be used to install _only_ the specified packages,
/// excluding all others.
#[arg(
long,
conflicts_with = "frozen",
conflicts_with = "no_sync",
conflicts_with = "only_install_package"
)]
pub no_install_package: Vec<PackageName>,
/// Only install the given package(s).
#[arg(
long,
conflicts_with = "frozen",
conflicts_with = "no_sync",
conflicts_with = "no_install_package",
hide = true
)]
pub only_install_package: Vec<PackageName>,
}
#[derive(Args)]
@ -4564,32 +4672,92 @@ pub struct ExportArgs {
/// By default, the current project is included in the exported requirements file with all of
/// its dependencies. The `--no-emit-project` option allows the project to be excluded, but all
/// of its dependencies to remain included.
#[arg(long, alias = "no-install-project")]
///
/// The inverse `--only-emit-project` can be used to emit _only_ the project itself, excluding
/// all dependencies.
#[arg(
long,
alias = "no-install-project",
conflicts_with = "only_emit_project"
)]
pub no_emit_project: bool,
/// Only emit the current project.
#[arg(
long,
alias = "only-install-project",
conflicts_with = "no_emit_project",
hide = true
)]
pub only_emit_project: bool,
/// Do not emit any workspace members, including the root project.
///
/// By default, all workspace members and their dependencies are included in the exported
/// requirements file, with all of their dependencies. The `--no-emit-workspace` option allows
/// exclusion of all the workspace members while retaining their dependencies.
#[arg(long, alias = "no-install-workspace")]
///
/// The inverse `--only-emit-workspace` can be used to emit _only_ workspace members, excluding
/// all other dependencies.
#[arg(
long,
alias = "no-install-workspace",
conflicts_with = "only_emit_workspace"
)]
pub no_emit_workspace: bool,
/// Only emit workspace members, including the root project.
#[arg(
long,
alias = "only-install-workspace",
conflicts_with = "no_emit_workspace",
hide = true
)]
pub only_emit_workspace: bool,
/// Do not include local path dependencies in the exported requirements.
///
/// Omits the current project, workspace members, and any other local (path or editable)
/// packages from the export. Only remote/indexed dependencies are written. Useful for Docker
/// and CI flows that want to export and cache third-party dependencies first.
#[arg(long, alias = "no-install-local")]
///
/// The inverse `--only-emit-local` can be used to emit _only_ local packages, excluding all
/// remote dependencies.
#[arg(long, alias = "no-install-local", conflicts_with = "only_emit_local")]
pub no_emit_local: bool,
/// Only include local path dependencies in the exported requirements.
#[arg(
long,
alias = "only-install-local",
conflicts_with = "no_emit_local",
hide = true
)]
pub only_emit_local: bool,
/// Do not emit the given package(s).
///
/// By default, all of the project's dependencies are included in the exported requirements
/// By default, all project's dependencies are included in the exported requirements
/// file. The `--no-emit-package` option allows exclusion of specific packages.
#[arg(long, alias = "no-install-package")]
///
/// The inverse `--only-emit-package` can be used to emit _only_ the specified packages,
/// excluding all others.
#[arg(
long,
alias = "no-install-package",
conflicts_with = "only_emit_package"
)]
pub no_emit_package: Vec<PackageName>,
/// Only emit the given package(s).
#[arg(
long,
alias = "only-install-package",
conflicts_with = "no_emit_package",
hide = true
)]
pub only_emit_package: Vec<PackageName>,
/// Assert that the `uv.lock` will remain unchanged.
///
/// Requires that the lockfile is up-to-date. If the lockfile is missing or needs to be updated,

View file

@ -17,26 +17,43 @@ pub struct InstallTarget<'a> {
pub struct InstallOptions {
/// Omit the project itself from the resolution.
pub no_install_project: bool,
/// Include only the project itself in the resolution.
pub only_install_project: bool,
/// Omit all workspace members (including the project itself) from the resolution.
pub no_install_workspace: bool,
/// Include only workspace members (including the project itself) in the resolution.
pub only_install_workspace: bool,
/// Omit all local packages from the resolution.
pub no_install_local: bool,
/// Include only local packages in the resolution.
pub only_install_local: bool,
/// Omit the specified packages from the resolution.
pub no_install_package: Vec<PackageName>,
/// Include only the specified packages in the resolution.
pub only_install_package: Vec<PackageName>,
}
impl InstallOptions {
#[allow(clippy::fn_params_excessive_bools)]
pub fn new(
no_install_project: bool,
only_install_project: bool,
no_install_workspace: bool,
only_install_workspace: bool,
no_install_local: bool,
only_install_local: bool,
no_install_package: Vec<PackageName>,
only_install_package: Vec<PackageName>,
) -> Self {
Self {
no_install_project,
only_install_project,
no_install_workspace,
only_install_workspace,
no_install_local,
only_install_local,
no_install_package,
only_install_package,
}
}
@ -48,6 +65,55 @@ impl InstallOptions {
members: &BTreeSet<PackageName>,
) -> bool {
let package_name = target.name;
// If `--only-install-package` is set, only include specified packages.
if !self.only_install_package.is_empty() {
if self.only_install_package.contains(package_name) {
return true;
}
debug!("Omitting `{package_name}` from resolution due to `--only-install-package`");
return false;
}
// If `--only-install-local` is set, only include local packages.
if self.only_install_local {
if target.is_local {
return true;
}
debug!("Omitting `{package_name}` from resolution due to `--only-install-local`");
return false;
}
// If `--only-install-workspace` is set, only include the project and workspace members.
if self.only_install_workspace {
// Check if it's the project itself
if let Some(project_name) = project_name {
if package_name == project_name {
return true;
}
}
// Check if it's a workspace member
if members.contains(package_name) {
return true;
}
// Otherwise, exclude it
debug!("Omitting `{package_name}` from resolution due to `--only-install-workspace`");
return false;
}
// If `--only-install-project` is set, only include the project itself.
if self.only_install_project {
if let Some(project_name) = project_name {
if package_name == project_name {
return true;
}
}
debug!("Omitting `{package_name}` from resolution due to `--only-install-project`");
return false;
}
// If `--no-install-project` is set, remove the project itself.
if self.no_install_project {
if let Some(project_name) = project_name {

View file

@ -67,8 +67,13 @@ pub(crate) async fn add(
active: Option<bool>,
no_sync: bool,
no_install_project: bool,
only_install_project: bool,
no_install_workspace: bool,
only_install_workspace: bool,
no_install_local: bool,
only_install_local: bool,
no_install_package: Vec<PackageName>,
only_install_package: Vec<PackageName>,
requirements: Vec<RequirementsSource>,
constraints: Vec<RequirementsSource>,
marker: Option<MarkerTree>,
@ -743,8 +748,13 @@ pub(crate) async fn add(
sync_state,
lock_check,
no_install_project,
only_install_project,
no_install_workspace,
only_install_workspace,
no_install_local,
only_install_local,
no_install_package.clone(),
only_install_package.clone(),
&defaulted_extras,
&defaulted_groups,
raw,
@ -974,8 +984,13 @@ async fn lock_and_sync(
sync_state: PlatformState,
lock_check: LockCheck,
no_install_project: bool,
only_install_project: bool,
no_install_workspace: bool,
only_install_workspace: bool,
no_install_local: bool,
only_install_local: bool,
no_install_package: Vec<PackageName>,
only_install_package: Vec<PackageName>,
extras: &ExtrasSpecificationWithDefaults,
groups: &DependencyGroupsWithDefaults,
raw: bool,
@ -1167,9 +1182,13 @@ async fn lock_and_sync(
None,
InstallOptions::new(
no_install_project,
only_install_project,
no_install_workspace,
only_install_workspace,
no_install_local,
vec![],
only_install_local,
no_install_package,
only_install_package,
),
Modifications::Sufficient,
None,

View file

@ -2121,8 +2121,13 @@ async fn run_project(
args.active,
args.no_sync,
args.no_install_project,
args.only_install_project,
args.no_install_workspace,
args.only_install_workspace,
args.no_install_local,
args.only_install_local,
args.no_install_package,
args.only_install_package,
requirements,
constraints,
args.marker,

View file

@ -1346,9 +1346,13 @@ impl SyncSettings {
inexact,
exact,
no_install_project,
only_install_project,
no_install_workspace,
only_install_workspace,
no_install_local,
only_install_local,
no_install_package,
only_install_package,
locked,
frozen,
active,
@ -1417,9 +1421,13 @@ impl SyncSettings {
editable: flag(editable, no_editable, "editable").map(EditableMode::from),
install_options: InstallOptions::new(
no_install_project,
only_install_project,
no_install_workspace,
only_install_workspace,
no_install_local,
only_install_local,
no_install_package,
only_install_package,
),
modifications: if flag(exact, inexact, "inexact").unwrap_or(true) {
Modifications::Exact
@ -1526,8 +1534,13 @@ pub(crate) struct AddSettings {
pub(crate) python: Option<String>,
pub(crate) workspace: Option<bool>,
pub(crate) no_install_project: bool,
pub(crate) only_install_project: bool,
pub(crate) no_install_workspace: bool,
pub(crate) only_install_workspace: bool,
pub(crate) no_install_local: bool,
pub(crate) only_install_local: bool,
pub(crate) no_install_package: Vec<PackageName>,
pub(crate) only_install_package: Vec<PackageName>,
pub(crate) install_mirrors: PythonInstallMirrors,
pub(crate) refresh: Refresh,
pub(crate) indexes: Vec<Index>,
@ -1572,8 +1585,13 @@ impl AddSettings {
workspace,
no_workspace,
no_install_project,
only_install_project,
no_install_workspace,
only_install_workspace,
no_install_local,
only_install_local,
no_install_package,
only_install_package,
} = args;
let dependency_type = if let Some(extra) = optional {
@ -1680,8 +1698,13 @@ impl AddSettings {
python: python.and_then(Maybe::into_option),
workspace: flag(workspace, no_workspace, "workspace"),
no_install_project,
only_install_project,
no_install_workspace,
only_install_workspace,
no_install_local,
only_install_local,
no_install_package,
only_install_package,
editable: flag(editable, no_editable, "editable"),
extras: extra.unwrap_or_default(),
refresh: Refresh::from(refresh),
@ -2019,9 +2042,13 @@ impl ExportSettings {
no_hashes,
output_file,
no_emit_project,
only_emit_project,
no_emit_workspace,
no_emit_package,
only_emit_workspace,
no_emit_local,
only_emit_local,
no_emit_package,
only_emit_package,
locked,
frozen,
resolver,
@ -2063,9 +2090,13 @@ impl ExportSettings {
hashes: flag(hashes, no_hashes, "hashes").unwrap_or(true),
install_options: InstallOptions::new(
no_emit_project,
only_emit_project,
no_emit_workspace,
only_emit_workspace,
no_emit_local,
only_emit_local,
no_emit_package,
only_emit_package,
),
output_file,
lock_check: if locked {

View file

@ -2266,6 +2266,92 @@ fn requirements_txt_no_emit() -> Result<()> {
Ok(())
}
#[test]
fn requirements_txt_only_emit() -> Result<()> {
let context = TestContext::new("3.12");
let pyproject_toml = context.temp_dir.child("pyproject.toml");
pyproject_toml.write_str(
r#"
[project]
name = "project"
version = "0.1.0"
requires-python = ">=3.12"
dependencies = ["anyio==3.7.0", "child"]
[tool.uv.workspace]
members = ["child"]
[tool.uv.sources]
child = { workspace = true }
[build-system]
requires = ["setuptools>=42"]
build-backend = "setuptools.build_meta"
"#,
)?;
let child = context.temp_dir.child("child");
child.child("pyproject.toml").write_str(
r#"
[project]
name = "child"
version = "0.1.0"
requires-python = ">=3.12"
dependencies = ["iniconfig>=2"]
[build-system]
requires = ["setuptools>=42"]
build-backend = "setuptools.build_meta"
"#,
)?;
context.lock().assert().success();
uv_snapshot!(context.filters(), context.export().arg("--only-emit-workspace"), @r###"
success: true
exit_code: 0
----- stdout -----
# This file was autogenerated by uv via the following command:
# uv export --cache-dir [CACHE_DIR] --only-emit-workspace
-e .
-e ./child
# via project
----- stderr -----
Resolved 6 packages in [TIME]
"###);
uv_snapshot!(context.filters(), context.export().arg("--only-emit-project"), @r###"
success: true
exit_code: 0
----- stdout -----
# This file was autogenerated by uv via the following command:
# uv export --cache-dir [CACHE_DIR] --only-emit-project
-e .
----- stderr -----
Resolved 6 packages in [TIME]
"###);
uv_snapshot!(context.filters(), context.export().arg("--only-emit-package").arg("anyio"), @r###"
success: true
exit_code: 0
----- stdout -----
# This file was autogenerated by uv via the following command:
# uv export --cache-dir [CACHE_DIR] --only-emit-package anyio
anyio==3.7.0 \
--hash=sha256:275d9973793619a5374e1c89a4f4ad3f4b0a5510a2b5b939444bee8f4c4d37ce \
--hash=sha256:eddca883c4175f14df8aedce21054bfca3adb70ffe76a9f607aef9d7fa2ea7f0
# via project
----- stderr -----
Resolved 6 packages in [TIME]
"###);
Ok(())
}
#[test]
fn requirements_txt_no_editable() -> Result<()> {
let context = TestContext::new("3.12");

View file

@ -898,10 +898,16 @@ uv add [OPTIONS] <PACKAGES|--requirements <REQUIREMENTS>>
<p>May also be set with the <code>UV_NO_CONFIG</code> environment variable.</p></dd><dt id="uv-add--no-index"><a href="#uv-add--no-index"><code>--no-index</code></a></dt><dd><p>Ignore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via <code>--find-links</code></p>
</dd><dt id="uv-add--no-install-local"><a href="#uv-add--no-install-local"><code>--no-install-local</code></a></dt><dd><p>Do not install local path dependencies</p>
<p>Skips the current project, workspace members, and any other local (path or editable) packages. Only remote/indexed dependencies are installed. Useful in Docker builds to cache heavy third-party dependencies first and layer local packages separately.</p>
<p>The inverse <code>--only-install-local</code> can be used to install <em>only</em> local packages, excluding all remote dependencies.</p>
</dd><dt id="uv-add--no-install-package"><a href="#uv-add--no-install-package"><code>--no-install-package</code></a> <i>no-install-package</i></dt><dd><p>Do not install the given package(s).</p>
<p>By default, all project's dependencies are installed into the environment. The <code>--no-install-package</code> option allows exclusion of specific packages. Note this can result in a broken environment, and should be used with caution.</p>
<p>The inverse <code>--only-install-package</code> can be used to install <em>only</em> the specified packages, excluding all others.</p>
</dd><dt id="uv-add--no-install-project"><a href="#uv-add--no-install-project"><code>--no-install-project</code></a></dt><dd><p>Do not install the current project.</p>
<p>By default, the current project is installed into the environment with all of its dependencies. The <code>--no-install-project</code> option allows the project to be excluded, but all of its dependencies are still installed. This is particularly useful in situations like building Docker images where installing the project separately from its dependencies allows optimal layer caching.</p>
<p>The inverse <code>--only-install-project</code> can be used to install <em>only</em> the project itself, excluding all dependencies.</p>
</dd><dt id="uv-add--no-install-workspace"><a href="#uv-add--no-install-workspace"><code>--no-install-workspace</code></a></dt><dd><p>Do not install any workspace members, including the current project.</p>
<p>By default, all of the workspace members and their dependencies are installed into the environment. The <code>--no-install-workspace</code> option allows exclusion of all the workspace members while retaining their dependencies. This is particularly useful in situations like building Docker images where installing the workspace separately from its dependencies allows optimal layer caching.</p>
<p>By default, all workspace members and their dependencies are installed into the environment. The <code>--no-install-workspace</code> option allows exclusion of all the workspace members while retaining their dependencies. This is particularly useful in situations like building Docker images where installing the workspace separately from its dependencies allows optimal layer caching.</p>
<p>The inverse <code>--only-install-workspace</code> can be used to install <em>only</em> workspace members, excluding all other dependencies.</p>
</dd><dt id="uv-add--no-managed-python"><a href="#uv-add--no-managed-python"><code>--no-managed-python</code></a></dt><dd><p>Disable use of uv-managed Python versions.</p>
<p>Instead, uv will search for a suitable Python version on the system.</p>
<p>May also be set with the <code>UV_NO_MANAGED_PYTHON</code> environment variable.</p></dd><dt id="uv-add--no-progress"><a href="#uv-add--no-progress"><code>--no-progress</code></a></dt><dd><p>Hide all progress outputs.</p>
@ -1488,12 +1494,16 @@ uv sync [OPTIONS]
<p>May also be set with the <code>UV_NO_GROUP</code> environment variable.</p></dd><dt id="uv-sync--no-index"><a href="#uv-sync--no-index"><code>--no-index</code></a></dt><dd><p>Ignore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via <code>--find-links</code></p>
</dd><dt id="uv-sync--no-install-local"><a href="#uv-sync--no-install-local"><code>--no-install-local</code></a></dt><dd><p>Do not install local path dependencies</p>
<p>Skips the current project, workspace members, and any other local (path or editable) packages. Only remote/indexed dependencies are installed. Useful in Docker builds to cache heavy third-party dependencies first and layer local packages separately.</p>
<p>The inverse <code>--only-install-local</code> can be used to install <em>only</em> local packages, excluding all remote dependencies.</p>
</dd><dt id="uv-sync--no-install-package"><a href="#uv-sync--no-install-package"><code>--no-install-package</code></a> <i>no-install-package</i></dt><dd><p>Do not install the given package(s).</p>
<p>By default, all of the project's dependencies are installed into the environment. The <code>--no-install-package</code> option allows exclusion of specific packages. Note this can result in a broken environment, and should be used with caution.</p>
<p>The inverse <code>--only-install-package</code> can be used to install <em>only</em> the specified packages, excluding all others.</p>
</dd><dt id="uv-sync--no-install-project"><a href="#uv-sync--no-install-project"><code>--no-install-project</code></a></dt><dd><p>Do not install the current project.</p>
<p>By default, the current project is installed into the environment with all of its dependencies. The <code>--no-install-project</code> option allows the project to be excluded, but all of its dependencies are still installed. This is particularly useful in situations like building Docker images where installing the project separately from its dependencies allows optimal layer caching.</p>
<p>The inverse <code>--only-install-project</code> can be used to install <em>only</em> the project itself, excluding all dependencies.</p>
</dd><dt id="uv-sync--no-install-workspace"><a href="#uv-sync--no-install-workspace"><code>--no-install-workspace</code></a></dt><dd><p>Do not install any workspace members, including the root project.</p>
<p>By default, all of the workspace members and their dependencies are installed into the environment. The <code>--no-install-workspace</code> option allows exclusion of all the workspace members while retaining their dependencies. This is particularly useful in situations like building Docker images where installing the workspace separately from its dependencies allows optimal layer caching.</p>
<p>By default, all workspace members and their dependencies are installed into the environment. The <code>--no-install-workspace</code> option allows exclusion of all the workspace members while retaining their dependencies. This is particularly useful in situations like building Docker images where installing the workspace separately from its dependencies allows optimal layer caching.</p>
<p>The inverse <code>--only-install-workspace</code> can be used to install <em>only</em> workspace members, excluding all other dependencies.</p>
</dd><dt id="uv-sync--no-managed-python"><a href="#uv-sync--no-managed-python"><code>--no-managed-python</code></a></dt><dd><p>Disable use of uv-managed Python versions.</p>
<p>Instead, uv will search for a suitable Python version on the system.</p>
<p>May also be set with the <code>UV_NO_MANAGED_PYTHON</code> environment variable.</p></dd><dt id="uv-sync--no-progress"><a href="#uv-sync--no-progress"><code>--no-progress</code></a></dt><dd><p>Hide all progress outputs.</p>
@ -1915,12 +1925,16 @@ uv export [OPTIONS]
<p>May also be set with the <code>UV_NO_DEV</code> environment variable.</p></dd><dt id="uv-export--no-editable"><a href="#uv-export--no-editable"><code>--no-editable</code></a></dt><dd><p>Export any editable dependencies, including the project and any workspace members, as non-editable</p>
<p>May also be set with the <code>UV_NO_EDITABLE</code> environment variable.</p></dd><dt id="uv-export--no-emit-local"><a href="#uv-export--no-emit-local"><code>--no-emit-local</code></a>, <code>--no-install-local</code></dt><dd><p>Do not include local path dependencies in the exported requirements.</p>
<p>Omits the current project, workspace members, and any other local (path or editable) packages from the export. Only remote/indexed dependencies are written. Useful for Docker and CI flows that want to export and cache third-party dependencies first.</p>
<p>The inverse <code>--only-emit-local</code> can be used to emit <em>only</em> local packages, excluding all remote dependencies.</p>
</dd><dt id="uv-export--no-emit-package"><a href="#uv-export--no-emit-package"><code>--no-emit-package</code></a>, <code>--no-install-package</code> <i>no-emit-package</i></dt><dd><p>Do not emit the given package(s).</p>
<p>By default, all of the project's dependencies are included in the exported requirements file. The <code>--no-emit-package</code> option allows exclusion of specific packages.</p>
<p>By default, all project's dependencies are included in the exported requirements file. The <code>--no-emit-package</code> option allows exclusion of specific packages.</p>
<p>The inverse <code>--only-emit-package</code> can be used to emit <em>only</em> the specified packages, excluding all others.</p>
</dd><dt id="uv-export--no-emit-project"><a href="#uv-export--no-emit-project"><code>--no-emit-project</code></a>, <code>--no-install-project</code></dt><dd><p>Do not emit the current project.</p>
<p>By default, the current project is included in the exported requirements file with all of its dependencies. The <code>--no-emit-project</code> option allows the project to be excluded, but all of its dependencies to remain included.</p>
<p>The inverse <code>--only-emit-project</code> can be used to emit <em>only</em> the project itself, excluding all dependencies.</p>
</dd><dt id="uv-export--no-emit-workspace"><a href="#uv-export--no-emit-workspace"><code>--no-emit-workspace</code></a>, <code>--no-install-workspace</code></dt><dd><p>Do not emit any workspace members, including the root project.</p>
<p>By default, all workspace members and their dependencies are included in the exported requirements file, with all of their dependencies. The <code>--no-emit-workspace</code> option allows exclusion of all the workspace members while retaining their dependencies.</p>
<p>The inverse <code>--only-emit-workspace</code> can be used to emit <em>only</em> workspace members, excluding all other dependencies.</p>
</dd><dt id="uv-export--no-extra"><a href="#uv-export--no-extra"><code>--no-extra</code></a> <i>no-extra</i></dt><dd><p>Exclude the specified optional dependencies, if <code>--all-extras</code> is supplied.</p>
<p>May be provided multiple times.</p>
</dd><dt id="uv-export--no-group"><a href="#uv-export--no-group"><code>--no-group</code></a> <i>no-group</i></dt><dd><p>Disable the specified dependency group.</p>