Patchwork [3,of,3,stable,osx] osx: wire up genosxversion script

login
register
mail settings
Submitter Augie Fackler
Date July 25, 2017, 12:57 a.m.
Message ID <117dea1ed78163b5c0a0.1500944268@augie-macbookpro2.roam.corp.google.com>
Download mbox | patch
Permalink /patch/22549/
State Accepted
Headers show

Comments

Augie Fackler - July 25, 2017, 12:57 a.m.
# HG changeset patch
# User Augie Fackler <augie@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.

Patch

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 \