Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b364d9f

Browse files
authored
More Mac installer fixes for git-based workflow (#2839)
1 parent 77e97ca commit b364d9f

1 file changed

Lines changed: 23 additions & 7 deletions

File tree

Mac/BuildScript/build-installer.py

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
Python 2.6.
1414
1515
In addition to what is supplied with OS X 10.5+ and Xcode 3+, the script
16-
requires an installed version of git and a third-party version of
16+
requires an installed third-party version of
1717
Tcl/Tk 8.4 (for OS X 10.4 and 10.5 deployment targets) or Tcl/TK 8.5
1818
(for 10.6 or later) installed in /Library/Frameworks. When installed,
1919
the Python built by this script will attempt to dynamically link first to
@@ -23,7 +23,7 @@
2323
2424
32-bit-only installer builds are still possible on OS X 10.4 with Xcode 2.5
2525
and the installation of additional components, such as a newer Python
26-
(2.5 is needed for Python parser updates), git, and for the documentation
26+
(2.5 is needed for Python parser updates) and for the documentation
2727
build either svn (pre-3.4.1) or sphinx-build (3.4.1 and later).
2828
2929
Usage: see USAGE variable in the script.
@@ -635,9 +635,8 @@ def checkEnvironment():
635635
base_path = base_path + ':' + OLD_DEVELOPER_TOOLS
636636
os.environ['PATH'] = base_path
637637
print("Setting default PATH: %s"%(os.environ['PATH']))
638-
# Ensure ws have access to git and to sphinx-build.
639-
# You may have to create links in /usr/bin for them.
640-
runCommand('git --version')
638+
# Ensure we have access to sphinx-build.
639+
# You may have to create a link in /usr/bin for it.
641640
runCommand('sphinx-build --version')
642641

643642
def parseOptions(args=None):
@@ -1142,8 +1141,25 @@ def buildPython():
11421141
shellQuote(WORKDIR)[1:-1],
11431142
shellQuote(WORKDIR)[1:-1]))
11441143

1145-
print("Running make")
1146-
runCommand("make")
1144+
# Look for environment value BUILDINSTALLER_BUILDPYTHON_MAKE_EXTRAS
1145+
# and, if defined, append its value to the make command. This allows
1146+
# us to pass in version control tags, like GITTAG, to a build from a
1147+
# tarball rather than from a vcs checkout, thus eliminating the need
1148+
# to have a working copy of the vcs program on the build machine.
1149+
#
1150+
# A typical use might be:
1151+
# export BUILDINSTALLER_BUILDPYTHON_MAKE_EXTRAS=" \
1152+
# GITVERSION='echo 123456789a' \
1153+
# GITTAG='echo v3.6.0' \
1154+
# GITBRANCH='echo 3.6'"
1155+
1156+
make_extras = os.getenv("BUILDINSTALLER_BUILDPYTHON_MAKE_EXTRAS")
1157+
if make_extras:
1158+
make_cmd = "make " + make_extras
1159+
else:
1160+
make_cmd = "make"
1161+
print("Running " + make_cmd)
1162+
runCommand(make_cmd)
11471163

11481164
print("Running make install")
11491165
runCommand("make install DESTDIR=%s"%(

0 commit comments

Comments
 (0)