@@ -364,6 +364,7 @@ def library_recipes():
364364# Instructions for building packages inside the .mpkg.
365365def pkg_recipes ():
366366 unselected_for_python3 = ('selected' , 'unselected' )[PYTHON_3 ]
367+ unselected_for_lt_python34 = ('selected' , 'unselected' )[getVersionTuple () < (3 , 4 )]
367368 result = [
368369 dict (
369370 name = "PythonFramework" ,
@@ -432,10 +433,27 @@ def pkg_recipes():
432433 topdir = "/Library/Frameworks/Python.framework" ,
433434 source = "/empty-dir" ,
434435 required = False ,
435- selected = unselected_for_python3 ,
436+ selected = unselected_for_lt_python34 ,
436437 ),
437438 ]
438439
440+ if getVersionTuple () >= (3 , 4 ):
441+ result .append (
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' ,
454+ )
455+ )
456+
439457 if DEPTARGET < '10.4' and not PYTHON_3 :
440458 result .append (
441459 dict (
@@ -453,6 +471,7 @@ def pkg_recipes():
453471 selected = unselected_for_python3 ,
454472 )
455473 )
474+
456475 return result
457476
458477def fatal (msg ):
@@ -955,11 +974,13 @@ def buildPython():
955974 runCommand ("%s -C --enable-framework --enable-universalsdk=%s "
956975 "--with-universal-archs=%s "
957976 "%s "
977+ "%s "
958978 "LDFLAGS='-g -L%s/libraries/usr/local/lib' "
959979 "CFLAGS='-g -I%s/libraries/usr/local/include' 2>&1" % (
960980 shellQuote (os .path .join (SRCDIR , 'configure' )), shellQuote (SDKPATH ),
961981 UNIVERSALARCHS ,
962982 (' ' , '--with-computed-gotos ' )[PYTHON_3 ],
983+ (' ' , '--without-ensurepip ' )[getVersionTuple () >= (3 , 4 )],
963984 shellQuote (WORKDIR )[1 :- 1 ],
964985 shellQuote (WORKDIR )[1 :- 1 ]))
965986
0 commit comments