osx: use bdist_mpkg.script_bdist_mpkg module instead of bdist_mpkg command
It seems like a default installation of bdist_mpkg makes it available as
Python module, but the corresponding executable is placed in a location like
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/bin which is
not in $PATH and thus not directly available. 'make osx' would thus fail.
Instead, skip the bdist_mpkg executable and invoke it as a Python module. That
works out of the box here.
--- a/Makefile Wed Jan 21 05:04:46 2015 +0100
+++ b/Makefile Wed Jan 21 05:04:48 2015 +0100
@@ -136,10 +136,10 @@
# Packaging targets
osx:
- @which bdist_mpkg >/dev/null || \
+ python -c 'import bdist_mpkg.script_bdist_mpkg' || \
(echo "Missing bdist_mpkg (easy_install bdist_mpkg)"; false)
rm -rf dist/mercurial-*.mpkg
- bdist_mpkg setup.py --
+ python -m bdist_mpkg.script_bdist_mpkg setup.py --
mkdir -p packages/osx
N=`cd dist && echo mercurial-*.mpkg | sed 's,\.mpkg$$,,'` && hdiutil create -srcfolder dist/$$N.mpkg/ -scrub -volname "$$N" -ov packages/osx/$$N.dmg
rm -rf dist/mercurial-*.mpkg