| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent e36fcde commit ed73010
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -198,7 +198,7 @@ def library_recipes(): | |||
| 198 | 198 | LT_10_5 = bool(getDeptargetTuple() < (10, 5)) | |
| 199 | 199 | ||
| 200 | 200 | # Disable for now | |
| 201 | - if False: # if (getDeptargetTuple() > (10, 5)) and (getVersionTuple() >= (3, 5)): | ||
| 201 | + if False: # if getDeptargetTuple() > (10, 5): | ||
| 202 | 202 | result.extend([ | |
| 203 | 203 | dict( | |
| 204 | 204 | name="Tcl 8.5.15", | |
@@ -239,7 +239,7 @@ def library_recipes(): | |||
| 239 | 239 | ), | |
| 240 | 240 | ]) | |
| 241 | 241 | ||
| 242 | - if getVersionTuple() >= (3, 3): | ||
| 242 | + if PYTHON_3: | ||
| 243 | 243 | result.extend([ | |
| 244 | 244 | dict( | |
| 245 | 245 | name="XZ 5.0.5", | |
@@ -369,8 +369,6 @@ def library_recipes(): | |||
| 369 | 369 | # Instructions for building packages inside the .mpkg. | |
| 370 | 370 | def pkg_recipes(): | |
| 371 | 371 | 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)] | ||
| 374 | 372 | result = [ | |
| 375 | 373 | dict( | |
| 376 | 374 | name="PythonFramework", | |
@@ -439,27 +437,23 @@ def pkg_recipes(): | |||
| 439 | 437 | topdir="/Library/Frameworks/Python.framework", | |
| 440 | 438 | source="/empty-dir", | |
| 441 | 439 | 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', | ||
| 443 | 454 | ), | |
| 444 | 455 | ] | |
| 445 | 456 | ||
| 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 | - | ||
| 463 | 457 | if getDeptargetTuple() < (10, 4) and not PYTHON_3: | |
| 464 | 458 | result.append( | |
| 465 | 459 | dict( | |
@@ -977,7 +971,7 @@ def buildPython(): | |||
| 977 | 971 | shellQuote(os.path.join(SRCDIR, 'configure')), shellQuote(SDKPATH), | |
| 978 | 972 | UNIVERSALARCHS, | |
| 979 | 973 | (' ', '--with-computed-gotos ')[PYTHON_3], | |
| 980 | - (' ', '--without-ensurepip ')[getVersionTuple() >= (3, 4)], | ||
| 974 | + (' ', '--without-ensurepip ')[PYTHON_3], | ||
| 981 | 975 | shellQuote(WORKDIR)[1:-1], | |
| 982 | 976 | shellQuote(WORKDIR)[1:-1])) | |
| 983 | 977 | ||
@@ -1159,7 +1153,9 @@ def patchFile(inPath, outPath): | |||
| 1159 | 1153 | fp.close() | |
| 1160 | 1154 | ||
| 1161 | 1155 | def patchScript(inPath, outPath): | |
| 1156 | + major, minor = getVersionMajorMinor() | ||
| 1162 | 1157 | data = fileContents(inPath) | |
| 1158 | + data = data.replace('@PYMAJOR@', str(major)) | ||
| 1163 | 1159 | data = data.replace('@PYVER@', getVersion()) | |
| 1164 | 1160 | fp = open(outPath, 'w') | |
| 1165 | 1161 | fp.write(data) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,7 +4,7 @@ | |||
| 4 | 4 | # | |
| 5 | 5 | ||
| 6 | 6 | PYVER="@PYVER@" | |
| 7 | - PYMAJOR="3" | ||
| 7 | + PYMAJOR="@PYMAJOR@" | ||
| 8 | 8 | FWK="/Library/Frameworks/Python.framework/Versions/${PYVER}" | |
| 9 | 9 | RELFWKBIN="../../..${FWK}/bin" | |
| 10 | 10 | ||
@@ -34,32 +34,36 @@ chmod -R g+w "${FWK}/lib/python${PYVER}/site-packages" "${FWK}/bin" | |||
| 34 | 34 | ||
| 35 | 35 | if [ -d /usr/local/bin ] ; then | |
| 36 | 36 | ( | |
| 37 | + install_links_if_our_fw() { | ||
| 38 | + if [ "$(readlink -n ./$1)" = "${RELFWKBIN}/$1" ] ; then | ||
| 39 | + shift | ||
| 40 | + for fn ; | ||
| 41 | + do | ||
| 42 | + if [ -e "${RELFWKBIN}/${fn}" ] ; then | ||
| 43 | + rm -f ./${fn} | ||
| 44 | + ln -s "${RELFWKBIN}/${fn}" "./${fn}" | ||
| 45 | + chgrp -h admin "./${fn}" | ||
| 46 | + chmod -h g+w "./${fn}" | ||
| 47 | + fi | ||
| 48 | + done | ||
| 49 | + fi | ||
| 50 | + } | ||
| 51 | + | ||
| 37 | 52 | cd /usr/local/bin | |
| 53 | + | ||
| 38 | 54 | # Create pipx.y and easy_install-x.y links if /usr/local/bin/pythonx.y | |
| 39 | 55 | # is linked to this framework version | |
| 40 | - if [ "$(readlink -n ./python${PYVER})" = "${RELFWKBIN}/python${PYVER}" ] ; then | ||
| 41 | - for fn in "pip${PYVER}" "easy_install-${PYVER}" ; | ||
| 42 | - do | ||
| 43 | - if [ -e "${RELFWKBIN}/${fn}" ] ; then | ||
| 44 | - rm -f ./${fn} | ||
| 45 | - ln -s "${RELFWKBIN}/${fn}" "./${fn}" | ||
| 46 | - chgrp -h admin "./${fn}" | ||
| 47 | - chmod -h g+w "./${fn}" | ||
| 48 | - fi | ||
| 49 | - done | ||
| 50 | - fi | ||
| 56 | + install_links_if_our_fw "python${PYVER}" \ | ||
| 57 | + "pip${PYVER}" "easy_install-${PYVER}" | ||
| 58 | + | ||
| 51 | 59 | # Create pipx link if /usr/local/bin/pythonx is linked to this version | |
| 52 | - if [ "$(readlink -n ./python${PYMAJOR})" = "${RELFWKBIN}/python${PYMAJOR}" ] ; then | ||
| 53 | - for fn in "pip${PYMAJOR}" ; | ||
| 54 | - do | ||
| 55 | - if [ -e "${RELFWKBIN}/${fn}" ] ; then | ||
| 56 | - rm -f ./${fn} | ||
| 57 | - ln -s "${RELFWKBIN}/${fn}" "./${fn}" | ||
| 58 | - chgrp -h admin "./${fn}" | ||
| 59 | - chmod -h g+w "./${fn}" | ||
| 60 | - fi | ||
| 61 | - done | ||
| 62 | - fi | ||
| 60 | + install_links_if_our_fw "python${PYMAJOR}" \ | ||
| 61 | + "pip${PYMAJOR}" | ||
| 62 | + | ||
| 63 | + # Create pip and easy_install link if /usr/local/bin/python | ||
| 64 | + # is linked to this version | ||
| 65 | + install_links_if_our_fw "python" \ | ||
| 66 | + "pip" "easy_install" | ||
| 63 | 67 | ) | |
| 64 | 68 | fi | |
| 65 | 69 | exit 0 | |
| Back | FazBrowse Home | New Git URL |
0 commit comments