From 8d2c2e8cdf2d8070ac54f584bd8508904719aa68 Mon Sep 17 00:00:00 2001 From: konsti Date: Tue, 9 Dec 2025 22:14:28 +0100 Subject: [PATCH] Better source-exclude reference docs (#16832) Fixed https://github.com/astral-sh/uv/issues/16821 This is already explained in the guide, but it was missing from the reference docs. --------- Co-authored-by: Zanie Blue --- crates/uv-build-backend/src/settings.rs | 3 +++ docs/concepts/build-backend.md | 2 +- uv.schema.json | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/crates/uv-build-backend/src/settings.rs b/crates/uv-build-backend/src/settings.rs index da90b509f..ae7777905 100644 --- a/crates/uv-build-backend/src/settings.rs +++ b/crates/uv-build-backend/src/settings.rs @@ -70,6 +70,9 @@ pub struct BuildBackendSettings { pub default_excludes: bool, /// Glob expressions which files and directories to exclude from the source distribution. + /// + /// These exclusions are also applied to wheels to ensure that a wheel built from a source tree + /// is consistent with a wheel built from a source distribution. #[option( default = r#"[]"#, value_type = "list[str]", diff --git a/docs/concepts/build-backend.md b/docs/concepts/build-backend.md index ce0f8fdd1..83d6e69f7 100644 --- a/docs/concepts/build-backend.md +++ b/docs/concepts/build-backend.md @@ -230,7 +230,7 @@ From these, [`tool.uv.build-backend.source-exclude`](../reference/settings.md#build-backend_source-exclude), [`tool.uv.build-backend.wheel-exclude`](../reference/settings.md#build-backend_wheel-exclude) and the default excludes are removed. The source dist excludes are applied to avoid source tree to wheel -source builds including more files than source tree to source distribution to wheel build. +builds including more files than source tree to source distribution to wheel build. There are no specific wheel includes. There must only be one top level module, and all data files must either be under the module root or in the appropriate diff --git a/uv.schema.json b/uv.schema.json index a5d3a04f2..bcabfdfd1 100644 --- a/uv.schema.json +++ b/uv.schema.json @@ -744,7 +744,7 @@ "default": false }, "source-exclude": { - "description": "Glob expressions which files and directories to exclude from the source distribution.", + "description": "Glob expressions which files and directories to exclude from the source distribution.\n\nThese exclusions are also applied to wheels to ensure that a wheel built from a source tree\nis consistent with a wheel built from a source distribution.", "type": "array", "default": [], "items": {