[PATCH 3 of 3 stable osx] osx: wire up genosxversion script

Augie Fackler raf at durin42.com
Mon Jul 24 20:57:48 EDT 2017


# HG changeset patch
# User Augie Fackler <augie at google.com>
# Date 1500943166 14400
#      Mon Jul 24 20:39:26 2017 -0400
# Branch stable
# Node ID 117dea1ed78163b5c0a006dc869d8c6c218474f0
# Parent  89f9d76c874eb95343a1608298c45e285cc02de4
osx: wire up genosxversion script

The only version strings that are changed are the ones baked into the
.pkg - hg's self-reported version string doesn't change, so users will
still see our mostly-pip-compatible version strings.

For reference, the part of our versioning setup that's not PEP440
compatible is the RC releases - those should be .rc0 insted of
-rc. It's too late to change that for the 4.3 cycle, so I'll worry
about fixing that during the 4.4 cycle.

diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -14,6 +14,7 @@ DOCFILES=mercurial/help/*.txt
 export LANGUAGE=C
 export LC_ALL=C
 TESTFLAGS ?= $(shell echo $$HGTESTFLAGS)
+OSXVERSIONFLAGS ?= $(shell echo $$OSXVERSIONFLAGS)
 
 # Set this to e.g. "mingw32" to use a non-default compiler.
 COMPILER=
@@ -185,7 +186,7 @@ osx:
 	  PREFIX=/usr/local \
 	  clean install
 	mkdir -p $${OUTPUTDIR:-dist}
-	HGVER=$$((cat build/mercurial/Library/Python/2.7/site-packages/mercurial/__version__.py; echo 'print(version)') | python) && \
+	HGVER=$(shell python contrib/genosxversion.py $(OSXVERSIONFLAGS) build/mercurial/Library/Python/2.7/site-packages/mercurial/__version__.py ) && \
 	OSXVER=$$(sw_vers -productVersion | cut -d. -f1,2) && \
 	pkgbuild --filter \\.DS_Store --root build/mercurial/ \
 	  --identifier org.mercurial-scm.mercurial \


More information about the Mercurial-devel mailing list