diff options
author | Ned Deily <nad@python.org> | 2017-06-16 22:47:48 (GMT) |
---|---|---|
committer | Ned Deily <nad@python.org> | 2017-06-17 06:58:07 (GMT) |
commit | 4da52247d6ae53b8384f9753430e8cd2672ff97d (patch) | |
tree | 1686f568428063a562ae4ace34c48458164cd0ca /Mac/BuildScript | |
parent | 0a794a3256b24ccf57b18ec9964f2367ac1f3d30 (diff) | |
download | cpython-4da52247d6ae53b8384f9753430e8cd2672ff97d.zip cpython-4da52247d6ae53b8384f9753430e8cd2672ff97d.tar.gz cpython-4da52247d6ae53b8384f9753430e8cd2672ff97d.tar.bz2 |
Add option to pass vcs info into Mac installer build
Diffstat (limited to 'Mac/BuildScript')
-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 7b4376f..e17299a 100755 --- a/Mac/BuildScript/build-installer.py +++ b/Mac/BuildScript/build-installer.py @@ -1142,8 +1142,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"%( |