Skip to content

Commit 8b99e2d

Browse files
authored
Add option to pass vcs info into Mac installer build (#2832)
(cherry picked from commit 4da5224)
1 parent c824cc8 commit 8b99e2d

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

Mac/BuildScript/build-installer.py

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1168,8 +1168,25 @@ def buildPython():
11681168
shellQuote(WORKDIR)[1:-1],
11691169
shellQuote(WORKDIR)[1:-1]))
11701170

1171-
print("Running make")
1172-
runCommand("make")
1171+
# Look for environment value BUILDINSTALLER_BUILDPYTHON_MAKE_EXTRAS
1172+
# and, if defined, append its value to the make command. This allows
1173+
# us to pass in version control tags, like GITTAG, to a build from a
1174+
# tarball rather than from a vcs checkout, thus eliminating the need
1175+
# to have a working copy of the vcs program on the build machine.
1176+
#
1177+
# A typical use might be:
1178+
# export BUILDINSTALLER_BUILDPYTHON_MAKE_EXTRAS=" \
1179+
# GITVERSION='echo 123456789a' \
1180+
# GITTAG='echo v3.6.0' \
1181+
# GITBRANCH='echo 3.6'"
1182+
1183+
make_extras = os.getenv("BUILDINSTALLER_BUILDPYTHON_MAKE_EXTRAS")
1184+
if make_extras:
1185+
make_cmd = "make " + make_extras
1186+
else:
1187+
make_cmd = "make"
1188+
print("Running " + make_cmd)
1189+
runCommand(make_cmd)
11731190

11741191
print("Running make install")
11751192
runCommand("make install DESTDIR=%s"%(

0 commit comments

Comments
 (0)