@@ -150,17 +150,19 @@ def getFullVersion():
150150# $MACOSX_DEPLOYMENT_TARGET -> minimum OS X level
151151DEPTARGET = '10.3'
152152
153- target_cc_map = {
153+ def getDeptargetTuple ():
154+ return tuple ([int (n ) for n in DEPTARGET .split ('.' )[0 :2 ]])
155+
156+ def getTargetCompilers ():
157+ target_cc_map = {
154158 '10.3' : ('gcc-4.0' , 'g++-4.0' ),
155159 '10.4' : ('gcc-4.0' , 'g++-4.0' ),
156160 '10.5' : ('gcc-4.2' , 'g++-4.2' ),
157161 '10.6' : ('gcc-4.2' , 'g++-4.2' ),
158- '10.7' : ('clang' , 'clang++' ),
159- '10.8' : ('clang' , 'clang++' ),
160- '10.9' : ('clang' , 'clang++' ),
161- }
162+ }
163+ return target_cc_map .get (DEPTARGET , ('clang' , 'clang++' ) )
162164
163- CC , CXX = target_cc_map [ DEPTARGET ]
165+ CC , CXX = getTargetCompilers ()
164166
165167PYTHON_3 = getVersionTuple () >= (3 , 0 )
166168
@@ -193,10 +195,10 @@ def getFullVersion():
193195def library_recipes ():
194196 result = []
195197
196- LT_10_5 = bool (DEPTARGET < '10.5' )
198+ LT_10_5 = bool (getDeptargetTuple () < ( 10 , 5 ) )
197199
198200# Disable for now
199- if False : # if (DEPTARGET > '10.5' ) and (getVersionTuple() >= (3, 5)):
201+ if False : # if (getDeptargetTuple() > (10, 5) ) and (getVersionTuple() >= (3, 5)):
200202 result .extend ([
201203 dict (
202204 name = "Tcl 8.5.15" ,
@@ -304,7 +306,7 @@ def library_recipes():
304306 ),
305307 ])
306308
307- if DEPTARGET < '10.5' :
309+ if getDeptargetTuple () < ( 10 , 5 ) :
308310 result .extend ([
309311 dict (
310312 name = "Bzip2 1.0.6" ,
@@ -458,7 +460,7 @@ def pkg_recipes():
458460 )
459461 )
460462
461- if DEPTARGET < '10.4' and not PYTHON_3 :
463+ if getDeptargetTuple () < ( 10 , 4 ) and not PYTHON_3 :
462464 result .append (
463465 dict (
464466 name = "PythonSystemFixes" ,
@@ -679,7 +681,7 @@ def parseOptions(args=None):
679681 SDKPATH = os .path .abspath (SDKPATH )
680682 DEPSRC = os .path .abspath (DEPSRC )
681683
682- CC , CXX = target_cc_map [ DEPTARGET ]
684+ CC , CXX = getTargetCompilers ()
683685
684686 print ("Settings:" )
685687 print (" * Source directory:" , SRCDIR )
0 commit comments