build: static and versioned MANIFEST.in with setuptools-scm
Now that setuptools-scm is used, it is better to have a static MANIFEST.in file.
From https://setuptools-scm.readthedocs.io:
> Additionally setuptools-scm provides setuptools with a list of files that
> are managed by the SCM (i.e. it automatically adds all the SCM-managed files to the sdist).
--- a/.hgignore Sat Nov 30 01:44:47 2024 +0100
+++ b/.hgignore Wed Jan 29 23:10:12 2025 +0100
@@ -52,8 +52,6 @@
doc/build
doc/html
doc/man
-MANIFEST
-MANIFEST.in
patches
mercurial/__modulepolicy__.py
mercurial/__version__.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/MANIFEST.in Wed Jan 29 23:10:12 2025 +0100
@@ -0,0 +1,5 @@
+include mercurial/__version__.py
+include doc/*.html
+include doc/*.1 doc/*.5 doc/*.8
+include doc/html/*.html
+include doc/man/*.1
--- a/Makefile Sat Nov 30 01:44:47 2024 +0100
+++ b/Makefile Wed Jan 29 23:10:12 2025 +0100
@@ -87,7 +87,7 @@
find contrib doc hgext hgext3rd i18n mercurial tests hgdemandimport \
\( -name '*.py[cdo]' -o -name '*.so' \) -exec rm -f '{}' ';'
rm -rf .venv_*
- rm -f MANIFEST MANIFEST.in hgext/__index__.py tests/*.err
+ rm -f hgext/__index__.py tests/*.err
rm -f mercurial/__modulepolicy__.py
if test -d .hg; then rm -f mercurial/__version__.py; fi
rm -rf build mercurial/locale
@@ -121,17 +121,9 @@
install-rhg: build-rhg
install -m 755 rust/target/release/rhg "$(PREFIX)"/bin/
-MANIFEST-doc:
- $(MAKE) -C doc MANIFEST
-
-MANIFEST.in: MANIFEST-doc
- hg manifest | sed -e 's/^/include /' > MANIFEST.in
- echo include mercurial/__version__.py >> MANIFEST.in
- sed -e 's/^/include /' < doc/MANIFEST >> MANIFEST.in
-
dist: tests dist-notests
-dist-notests: doc MANIFEST.in
+dist-notests: doc
TAR_OPTIONS="--owner=root --group=root --mode=u+w,go-w,a+rX-s" $(PYTHON) setup.py -q sdist
check: tests
--- a/doc/Makefile Sat Nov 30 01:44:47 2024 +0100
+++ b/doc/Makefile Wed Jan 29 23:10:12 2025 +0100
@@ -206,13 +206,6 @@
$(PYTHON) runrst html --hg-individual-pages $(RSTARGS) --halt warning \
--link-stylesheet --stylesheet-path style.css $(BUILDDIR)/$*.gendoc.txt $@
-MANIFEST: man html
-# tracked files are already in the main MANIFEST
- $(RM) $@
- for i in $(MAN) $(HTML); do \
- echo "doc/$$i" >> $@ ; \
- done
-
install: man
for i in $(MAN) ; do \
subdir=`echo $$i | sed -n 's/^.*\.\([0-9]\)$$/man\1/p'` ; \
@@ -225,4 +218,4 @@
# $(HTML) only has the basic topics, so we need to delete $(HTMLOUT)/*.html and
# other similar files "by hand" here.
clean:
- $(RM) $(MAN) $(HTML) common.txt $(SOURCES) MANIFEST *.gendoc.txt $(BUILDFILES) $(BUILDDIR)/*.gendoc.* $(HTMLOUT)/*.html
+ $(RM) $(MAN) $(HTML) common.txt $(SOURCES) *.gendoc.txt $(BUILDFILES) $(BUILDDIR)/*.gendoc.* $(HTMLOUT)/*.html
--- a/tests/test-check-code.t Sat Nov 30 01:44:47 2024 +0100
+++ b/tests/test-check-code.t Wed Jan 29 23:10:12 2025 +0100
@@ -65,6 +65,7 @@
CONTRIBUTING
CONTRIBUTORS
COPYING
+ MANIFEST.in
Makefile
README.rst
hg