@@ -198,7 +198,7 @@ def library_recipes():
198198 LT_10_5 = bool (getDeptargetTuple () < (10 , 5 ))
199199
200200# Disable for now
201- if False : # if ( getDeptargetTuple() > (10, 5)) and (getVersionTuple() >= (3, 5) ):
201+ if False : # if getDeptargetTuple() > (10, 5):
202202 result .extend ([
203203 dict (
204204 name = "Tcl 8.5.15" ,
@@ -239,7 +239,7 @@ def library_recipes():
239239 ),
240240 ])
241241
242- if getVersionTuple () >= ( 3 , 3 ) :
242+ if PYTHON_3 :
243243 result .extend ([
244244 dict (
245245 name = "XZ 5.0.5" ,
@@ -369,8 +369,6 @@ def library_recipes():
369369# Instructions for building packages inside the .mpkg.
370370def pkg_recipes ():
371371 unselected_for_python3 = ('selected' , 'unselected' )[PYTHON_3 ]
372- # unselected if 3.0 through 3.3, selected otherwise (2.x or >= 3.4)
373- unselected_for_lt_python34 = ('selected' , 'unselected' )[(3 , 0 ) <= getVersionTuple () < (3 , 4 )]
374372 result = [
375373 dict (
376374 name = "PythonFramework" ,
@@ -439,27 +437,23 @@ def pkg_recipes():
439437 topdir = "/Library/Frameworks/Python.framework" ,
440438 source = "/empty-dir" ,
441439 required = False ,
442- selected = unselected_for_lt_python34 ,
440+ selected = 'selected' ,
441+ ),
442+ dict (
443+ name = "PythonInstallPip" ,
444+ long_name = "Install or upgrade pip" ,
445+ readme = """\
446+ This package installs (or upgrades from an earlier version)
447+ pip, a tool for installing and managing Python packages.
448+ """ ,
449+ postflight = "scripts/postflight.ensurepip" ,
450+ topdir = "/Library/Frameworks/Python.framework" ,
451+ source = "/empty-dir" ,
452+ required = False ,
453+ selected = 'selected' ,
443454 ),
444455 ]
445456
446- if getVersionTuple () >= (3 , 4 ):
447- result .append (
448- dict (
449- name = "PythonInstallPip" ,
450- long_name = "Install or upgrade pip" ,
451- readme = """\
452- This package installs (or upgrades from an earlier version)
453- pip, a tool for installing and managing Python packages.
454- """ ,
455- postflight = "scripts/postflight.ensurepip" ,
456- topdir = "/Library/Frameworks/Python.framework" ,
457- source = "/empty-dir" ,
458- required = False ,
459- selected = 'selected' ,
460- )
461- )
462-
463457 if getDeptargetTuple () < (10 , 4 ) and not PYTHON_3 :
464458 result .append (
465459 dict (
@@ -977,7 +971,7 @@ def buildPython():
977971 shellQuote (os .path .join (SRCDIR , 'configure' )), shellQuote (SDKPATH ),
978972 UNIVERSALARCHS ,
979973 (' ' , '--with-computed-gotos ' )[PYTHON_3 ],
980- (' ' , '--without-ensurepip ' )[getVersionTuple () >= ( 3 , 4 ) ],
974+ (' ' , '--without-ensurepip ' )[PYTHON_3 ],
981975 shellQuote (WORKDIR )[1 :- 1 ],
982976 shellQuote (WORKDIR )[1 :- 1 ]))
983977
@@ -1159,7 +1153,9 @@ def patchFile(inPath, outPath):
11591153 fp .close ()
11601154
11611155def patchScript (inPath , outPath ):
1156+ major , minor = getVersionMajorMinor ()
11621157 data = fileContents (inPath )
1158+ data = data .replace ('@PYMAJOR@' , str (major ))
11631159 data = data .replace ('@PYVER@' , getVersion ())
11641160 fp = open (outPath , 'w' )
11651161 fp .write (data )
0 commit comments