comparison Makefile @ 14558:2ce7dfe17bc5

distutils: Create MANIFEST.in instead of MANIFEST in Makefile When running 'python setup.py sdist' many files were omitted from the resulting tarball that are required for a complete build, including the .h file for the inotify extension due to a python2.7+ distutils bug. This would cause 'make dist' to fail to build a correct dist on python2.7 By building a MANIFEST.in that is the same as the old MANIFEST with 'include' at the start of each line will cause a correct MANIFEST to be built and used by distutils.
author Stephen Thorne <stephen@thorne.id.au>
date Thu, 09 Jun 2011 10:15:24 +1000
parents f6b3b346d80c
children 1575dc5d399a
comparison
equal deleted inserted replaced
14557:f966979f61ce 14558:2ce7dfe17bc5
44 44
45 clean: 45 clean:
46 -$(PYTHON) setup.py clean --all # ignore errors from this command 46 -$(PYTHON) setup.py clean --all # ignore errors from this command
47 find . \( -name '*.py[cdo]' -o -name '*.so' \) -exec rm -f '{}' ';' 47 find . \( -name '*.py[cdo]' -o -name '*.so' \) -exec rm -f '{}' ';'
48 rm -f $(addprefix mercurial/,$(notdir $(wildcard mercurial/pure/*.py))) 48 rm -f $(addprefix mercurial/,$(notdir $(wildcard mercurial/pure/*.py)))
49 rm -f MANIFEST tests/*.err 49 rm -f MANIFEST MANIFEST.in tests/*.err
50 rm -rf build mercurial/locale 50 rm -rf build mercurial/locale
51 $(MAKE) -C doc clean 51 $(MAKE) -C doc clean
52 52
53 install: install-bin install-doc 53 install: install-bin install-doc
54 54
67 cd doc && $(MAKE) $(MFLAGS) PREFIX="$(HOME)" install 67 cd doc && $(MAKE) $(MFLAGS) PREFIX="$(HOME)" install
68 68
69 MANIFEST-doc: 69 MANIFEST-doc:
70 $(MAKE) -C doc MANIFEST 70 $(MAKE) -C doc MANIFEST
71 71
72 MANIFEST: MANIFEST-doc 72 MANIFEST.in: MANIFEST-doc
73 hg manifest > MANIFEST 73 hg manifest | sed -e 's/^/include /' > MANIFEST.in
74 echo mercurial/__version__.py >> MANIFEST 74 echo include mercurial/__version__.py >> MANIFEST.in
75 cat doc/MANIFEST >> MANIFEST 75 sed -e 's/^/include /' < doc/MANIFEST >> MANIFEST.in
76 76
77 dist: tests dist-notests 77 dist: tests dist-notests
78 78
79 dist-notests: doc MANIFEST 79 dist-notests: doc MANIFEST.in
80 TAR_OPTIONS="--owner=root --group=root --mode=u+w,go-w,a+rX-s" $(PYTHON) setup.py -q sdist 80 TAR_OPTIONS="--owner=root --group=root --mode=u+w,go-w,a+rX-s" $(PYTHON) setup.py -q sdist
81 81
82 check: tests 82 check: tests
83 83
84 tests: 84 tests: