From 7dbebc1baad5a3d9af1e86ac0522ae42e3b387a4 Mon Sep 17 00:00:00 2001 From: Sarthak Bhardwaj Date: Sat, 11 Apr 2026 19:13:49 +0000 Subject: [PATCH 1/2] docs: note VCS ignore interaction with packages (#10831) The 'packages' subsection of docs/pyproject.md did not mention that entries are still subject to the VCS ignore settings that seed the exclude field (documented in the sibling 'exclude and include' subsection). This caught a user out on #10831 where a package path pointing at generated code excluded by .gitignore silently produced empty distributions. Adds a small warning block to the 'packages' subsection explaining the interaction and pointing to the 'exclude and include' subsection for the include-with-format workaround. Refs #10831 --- docs/pyproject.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/pyproject.md b/docs/pyproject.md index 6d6fe27b650..8dcc2cd384d 100644 --- a/docs/pyproject.md +++ b/docs/pyproject.md @@ -699,6 +699,15 @@ Poetry is clever enough to detect Python subpackages. Thus, you only have to specify the directory where your root package resides. {{% /note %}} +{{% warning %}} +If a VCS is being used, files matched by its ignore settings (for example by +`.gitignore` for git) are excluded from the built distributions even when their +parent directory is listed under `packages`. This can be surprising if a +`packages` entry points at generated code or another path that is intentionally +kept out of version control. To ship such files, add them back via +[`include`]({{< relref "#exclude-and-include" >}}) with an explicit `format`. +{{% /warning %}} + ### exclude and include {{% note %}} From dc6317462a1408c7fb1863d399ea37663c27152d Mon Sep 17 00:00:00 2001 From: Sarthak Bhardwaj Date: Mon, 13 Apr 2026 18:10:20 +0000 Subject: [PATCH 2/2] fix typo: add comma, capitalize Git --- docs/pyproject.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/pyproject.md b/docs/pyproject.md index 8dcc2cd384d..5da05138b46 100644 --- a/docs/pyproject.md +++ b/docs/pyproject.md @@ -700,8 +700,8 @@ Thus, you only have to specify the directory where your root package resides. {{% /note %}} {{% warning %}} -If a VCS is being used, files matched by its ignore settings (for example by -`.gitignore` for git) are excluded from the built distributions even when their +If a VCS is being used, files matched by its ignore settings (for example, by +`.gitignore` for Git) are excluded from the built distributions even when their parent directory is listed under `packages`. This can be surprising if a `packages` entry points at generated code or another path that is intentionally kept out of version control. To ship such files, add them back via