diff options
author | Ned Deily <nad@acm.org> | 2014-06-25 20:36:14 (GMT) |
---|---|---|
committer | Ned Deily <nad@acm.org> | 2014-06-25 20:36:14 (GMT) |
commit | 04cdfa1147d5aadbee190b3aa2c4ccfd2d4a122d (patch) | |
tree | 3f7582d80bbbd7f46f39e78954e2b8e1c4b63359 /Mac/BuildScript | |
parent | 975735f729df6b7767556d2d389b560dbc7500ac (diff) | |
download | cpython-04cdfa1147d5aadbee190b3aa2c4ccfd2d4a122d.zip cpython-04cdfa1147d5aadbee190b3aa2c4ccfd2d4a122d.tar.gz cpython-04cdfa1147d5aadbee190b3aa2c4ccfd2d4a122d.tar.bz2 |
Issue #21811: Anticipated fixes to 3.x and 2.7 for OS X 10.10 Yosemite.
Diffstat (limited to 'Mac/BuildScript')
-rwxr-xr-x | Mac/BuildScript/build-installer.py | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/Mac/BuildScript/build-installer.py b/Mac/BuildScript/build-installer.py index 74c2746..199b560 100755 --- a/Mac/BuildScript/build-installer.py +++ b/Mac/BuildScript/build-installer.py @@ -150,17 +150,19 @@ SRCDIR = os.path.dirname( # $MACOSX_DEPLOYMENT_TARGET -> minimum OS X level DEPTARGET = '10.3' -target_cc_map = { +def getDeptargetTuple(): + return tuple([int(n) for n in DEPTARGET.split('.')[0:2]]) + +def getTargetCompilers(): + target_cc_map = { '10.3': ('gcc-4.0', 'g++-4.0'), '10.4': ('gcc-4.0', 'g++-4.0'), '10.5': ('gcc-4.2', 'g++-4.2'), '10.6': ('gcc-4.2', 'g++-4.2'), - '10.7': ('clang', 'clang++'), - '10.8': ('clang', 'clang++'), - '10.9': ('clang', 'clang++'), -} + } + return target_cc_map.get(DEPTARGET, ('clang', 'clang++') ) -CC, CXX = target_cc_map[DEPTARGET] +CC, CXX = getTargetCompilers() PYTHON_3 = getVersionTuple() >= (3, 0) @@ -193,10 +195,10 @@ EXPECTED_SHARED_LIBS = {} def library_recipes(): result = [] - LT_10_5 = bool(DEPTARGET < '10.5') + LT_10_5 = bool(getDeptargetTuple() < (10, 5)) # Disable for now - if False: # if (DEPTARGET > '10.5') and (getVersionTuple() >= (3, 5)): + if False: # if (getDeptargetTuple() > (10, 5)) and (getVersionTuple() >= (3, 5)): result.extend([ dict( name="Tcl 8.5.15", @@ -304,7 +306,7 @@ def library_recipes(): ), ]) - if DEPTARGET < '10.5': + if getDeptargetTuple() < (10, 5): result.extend([ dict( name="Bzip2 1.0.6", @@ -458,7 +460,7 @@ def pkg_recipes(): ) ) - if DEPTARGET < '10.4' and not PYTHON_3: + if getDeptargetTuple() < (10, 4) and not PYTHON_3: result.append( dict( name="PythonSystemFixes", @@ -679,7 +681,7 @@ def parseOptions(args=None): SDKPATH=os.path.abspath(SDKPATH) DEPSRC=os.path.abspath(DEPSRC) - CC, CXX=target_cc_map[DEPTARGET] + CC, CXX = getTargetCompilers() print("Settings:") print(" * Source directory:", SRCDIR) |