diff options
author | 2017-07-23 18:09:14 -0400 | |
---|---|---|
committer | 2017-07-23 18:09:14 -0400 | |
commit | 8b99e2da1ffa8112ee0ba7600a8823da61e132bb (patch) | |
tree | 2898c705a0080e2c877abc817dbaca1e606cc934 /Mac | |
parent | [3.5] Backport bpo-30876 (GH-2639), bpo-18018 and bpo-26367. (#2677) (diff) | |
download | cpython-8b99e2da1ffa8112ee0ba7600a8823da61e132bb.tar.gz cpython-8b99e2da1ffa8112ee0ba7600a8823da61e132bb.tar.bz2 cpython-8b99e2da1ffa8112ee0ba7600a8823da61e132bb.zip |
Add option to pass vcs info into Mac installer build (#2832)
(cherry picked from commit 4da52247d6ae53b8384f9753430e8cd2672ff97d)
Diffstat (limited to 'Mac')
-rwxr-xr-x | Mac/BuildScript/build-installer.py | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/Mac/BuildScript/build-installer.py b/Mac/BuildScript/build-installer.py index fb112741e05..d7d40110a66 100755 --- a/Mac/BuildScript/build-installer.py +++ b/Mac/BuildScript/build-installer.py @@ -1168,8 +1168,25 @@ def buildPython(): shellQuote(WORKDIR)[1:-1], shellQuote(WORKDIR)[1:-1])) - print("Running make") - runCommand("make") + # Look for environment value BUILDINSTALLER_BUILDPYTHON_MAKE_EXTRAS + # and, if defined, append its value to the make command. This allows + # us to pass in version control tags, like GITTAG, to a build from a + # tarball rather than from a vcs checkout, thus eliminating the need + # to have a working copy of the vcs program on the build machine. + # + # A typical use might be: + # export BUILDINSTALLER_BUILDPYTHON_MAKE_EXTRAS=" \ + # GITVERSION='echo 123456789a' \ + # GITTAG='echo v3.6.0' \ + # GITBRANCH='echo 3.6'" + + make_extras = os.getenv("BUILDINSTALLER_BUILDPYTHON_MAKE_EXTRAS") + if make_extras: + make_cmd = "make " + make_extras + else: + make_cmd = "make" + print("Running " + make_cmd) + runCommand(make_cmd) print("Running make install") runCommand("make install DESTDIR=%s"%( |