Skip to content

Commit bf2c722

Browse files
webknjazpatchback[bot]
authored andcommitted
📦 Fix setuptools-scm warnings on git archival (#1492)
Prior to this patch, `python -Im build` would emit warnings regarding `.git_archival.txt` having not been templated that look as follows: ```console $ python -Im build -vv 2>&1 | grep -i warni /tmp/build-env-m3vufmd9/lib/python3.14/site-packages/setuptools_scm/git.py:427: UserWarning: git archive did not support describe output warnings.warn("git archive did not support describe output") /tmp/build-env-m3vufmd9/lib/python3.14/site-packages/setuptools_scm/git.py:445: UserWarning: unprocessed git archival found (no export subst applied) warnings.warn("unprocessed git archival found (no export subst applied)") /tmp/build-env-m3vufmd9/lib/python3.14/site-packages/setuptools_scm/git.py:427: UserWarning: git archive did not support describe output warnings.warn("git archive did not support describe output") /tmp/build-env-m3vufmd9/lib/python3.14/site-packages/setuptools_scm/git.py:445: UserWarning: unprocessed git archival found (no export subst applied) warnings.warn("unprocessed git archival found (no export subst applied)") ``` This change addressed that by excluding said file from sdists produced from within Git checkouts so the file only exists when exported into an archive. `MANIFEST.in` itself is excluded due to a cascading warning its presence introduces while fixing the original one. ctx: jazzband/pip-tools#2261 (comment) (cherry picked from commit 533c719)
1 parent 27d5fa6 commit bf2c722

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

MANIFEST.in

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# do not include the `.git_archival.txt` file in sdist builds from repo source
2+
# this avoids setuptools-scm warnings on development builds
3+
exclude .git_archival.txt
14

2-
include README.md
3-
include LICENSE.md
5+
# furthermore do not include the `MANIFEST.in` file itself in sdist builds from
6+
# repo source to avoid the following setuptools warning on development builds:
7+
# warning: no previously-included files found matching '.git_archival.txt'
8+
exclude MANIFEST.in

0 commit comments

Comments
 (0)