summaryrefslogtreecommitdiff
path: root/Mac
diff options
context:
space:
mode:
authorNed Deily <nad@acm.org>2014-06-25 13:42:22 -0700
committerNed Deily <nad@acm.org>2014-06-25 13:42:22 -0700
commit9b515f7e2e5408d04335d4a60e376aada7265d34 (patch)
tree4a99eb29ec0f1ce9b017a8cc463eb75fbc5f48a3 /Mac
parent130f0eb7699ab043ab88bfe4207a72d6f90e55ba (diff)
parentb0613599907ab9d9823f6a79725134d206fdf180 (diff)
downloadcpython-9b515f7e2e5408d04335d4a60e376aada7265d34.tar.gz
Issue #21811: Anticipated fixes to 3.x and 2.7 for OS X 10.10 Yosemite.
Diffstat (limited to 'Mac')
-rwxr-xr-xMac/BuildScript/build-installer.py24
1 files changed, 13 insertions, 11 deletions
diff --git a/Mac/BuildScript/build-installer.py b/Mac/BuildScript/build-installer.py
index 74c274646a..199b560b65 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)