diff options
author | Ned Deily <nad@acm.org> | 2014-11-15 02:56:28 (GMT) |
---|---|---|
committer | Ned Deily <nad@acm.org> | 2014-11-15 02:56:28 (GMT) |
commit | bbdacdc84f7987b75ab08e22d90cc391d034ec1b (patch) | |
tree | e56d8dbac33d3b36c36890167416e04ebe59b191 /Mac/BuildScript/build-installer.py | |
parent | 2a40e3673928077466363fdc7711dd51ed73aff0 (diff) | |
parent | ed7301031917a5f63ca2e9a7cccb6b18113ca27c (diff) | |
download | cpython-bbdacdc84f7987b75ab08e22d90cc391d034ec1b.zip cpython-bbdacdc84f7987b75ab08e22d90cc391d034ec1b.tar.gz cpython-bbdacdc84f7987b75ab08e22d90cc391d034ec1b.tar.bz2 |
Issue #22877: PEP 477 - keep 2.7 and 3.x installers in sync.
Diffstat (limited to 'Mac/BuildScript/build-installer.py')
-rwxr-xr-x | Mac/BuildScript/build-installer.py | 42 |
1 files changed, 19 insertions, 23 deletions
diff --git a/Mac/BuildScript/build-installer.py b/Mac/BuildScript/build-installer.py index 710e84d..46e715a 100755 --- a/Mac/BuildScript/build-installer.py +++ b/Mac/BuildScript/build-installer.py @@ -198,7 +198,7 @@ def library_recipes(): LT_10_5 = bool(getDeptargetTuple() < (10, 5)) # Disable for now - if False: # if (getDeptargetTuple() > (10, 5)) and (getVersionTuple() >= (3, 5)): + if False: # if getDeptargetTuple() > (10, 5): result.extend([ dict( name="Tcl 8.5.15", @@ -239,7 +239,7 @@ def library_recipes(): ), ]) - if getVersionTuple() >= (3, 3): + if PYTHON_3: result.extend([ dict( name="XZ 5.0.5", @@ -369,8 +369,6 @@ def library_recipes(): # Instructions for building packages inside the .mpkg. def pkg_recipes(): unselected_for_python3 = ('selected', 'unselected')[PYTHON_3] - # unselected if 3.0 through 3.3, selected otherwise (2.x or >= 3.4) - unselected_for_lt_python34 = ('selected', 'unselected')[(3, 0) <= getVersionTuple() < (3, 4)] result = [ dict( name="PythonFramework", @@ -439,27 +437,23 @@ def pkg_recipes(): topdir="/Library/Frameworks/Python.framework", source="/empty-dir", required=False, - selected=unselected_for_lt_python34, + selected='selected', + ), + dict( + name="PythonInstallPip", + long_name="Install or upgrade pip", + readme="""\ + This package installs (or upgrades from an earlier version) + pip, a tool for installing and managing Python packages. + """, + postflight="scripts/postflight.ensurepip", + topdir="/Library/Frameworks/Python.framework", + source="/empty-dir", + required=False, + selected='selected', ), ] - if getVersionTuple() >= (3, 4): - result.append( - dict( - name="PythonInstallPip", - long_name="Install or upgrade pip", - readme="""\ - This package installs (or upgrades from an earlier version) - pip, a tool for installing and managing Python packages. - """, - postflight="scripts/postflight.ensurepip", - topdir="/Library/Frameworks/Python.framework", - source="/empty-dir", - required=False, - selected='selected', - ) - ) - if getDeptargetTuple() < (10, 4) and not PYTHON_3: result.append( dict( @@ -977,7 +971,7 @@ def buildPython(): shellQuote(os.path.join(SRCDIR, 'configure')), shellQuote(SDKPATH), UNIVERSALARCHS, (' ', '--with-computed-gotos ')[PYTHON_3], - (' ', '--without-ensurepip ')[getVersionTuple() >= (3, 4)], + (' ', '--without-ensurepip ')[PYTHON_3], shellQuote(WORKDIR)[1:-1], shellQuote(WORKDIR)[1:-1])) @@ -1159,7 +1153,9 @@ def patchFile(inPath, outPath): fp.close() def patchScript(inPath, outPath): + major, minor = getVersionMajorMinor() data = fileContents(inPath) + data = data.replace('@PYMAJOR@', str(major)) data = data.replace('@PYVER@', getVersion()) fp = open(outPath, 'w') fp.write(data) |