mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-07 20:31:01 -05:00
Use pip<21 syntax in ensurepip call for pypy2.7-7.3.13 and 2.7.18
This commit is contained in:
parent
c6f0d31dc9
commit
509d3a8855
4 changed files with 14 additions and 5 deletions
|
@ -2037,14 +2037,23 @@ build_package_get_pip() {
|
|||
build_package_symlink_version_suffix
|
||||
}
|
||||
|
||||
# Pip <21 (in 2.7 and derivatives like PyPy-2.7) doesn't support -I
|
||||
build_package_ensurepip_lt21() {
|
||||
build_package_ensurepip lt21
|
||||
}
|
||||
|
||||
build_package_ensurepip() {
|
||||
local mode="$1"
|
||||
local ensurepip_opts
|
||||
# Install as `--altinstall` if the Python is installed as `altinstall` (#255)
|
||||
if [[ "$PYTHON_MAKE_INSTALL_TARGET" == *"altinstall"* ]]; then
|
||||
ensurepip_opts="--altinstall"
|
||||
fi
|
||||
local python_opts="-I"
|
||||
if [[ $mode == "lt21" ]]; then python_opts="-s"; fi
|
||||
|
||||
# FIXME: `--altinstall` with `get-pip.py`
|
||||
"$PYTHON_BIN" -I -m ensurepip ${ensurepip_opts} 1>/dev/null 2>&1 || build_package_get_pip "$@" || return 1
|
||||
"$PYTHON_BIN" $python_opts -m ensurepip ${ensurepip_opts} 1>/dev/null 2>&1 || build_package_get_pip "$@" || return 1
|
||||
build_package_symlink_version_suffix
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ export PYTHON_BUILD_HOMEBREW_OPENSSL_FORMULA="openssl@1.1 openssl@1.0 openssl"
|
|||
install_package "openssl-1.1.1v" "https://www.openssl.org/source/openssl-1.1.1v.tar.gz" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.0" "https://ftpmirror.gnu.org/readline/readline-8.0.tar.gz#e339f51971478d369f8a053a330a190781acb9864cf4c541060f12078948e461" mac_readline --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
install_package "Python-2.7.18" "https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tar.xz#b62c0e7937551d0cc02b8fd5cb0f544f9405bafc9a54d3808ed4594812edef43" standard verify_py27 copy_python_gdb ensurepip
|
||||
install_package "Python-2.7.18" "https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tar.xz#b62c0e7937551d0cc02b8fd5cb0f544f9405bafc9a54d3808ed4594812edef43" standard verify_py27 copy_python_gdb ensurepip_lt21
|
||||
else
|
||||
install_package "Python-2.7.18" "https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tgz#da3080e3b488f648a3d7a4560ddee895284c3380b11d6de75edb986526b9a814" standard verify_py27 copy_python_gdb ensurepip
|
||||
install_package "Python-2.7.18" "https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tgz#da3080e3b488f648a3d7a4560ddee895284c3380b11d6de75edb986526b9a814" standard verify_py27 copy_python_gdb ensurepip_lt21
|
||||
fi
|
||||
|
|
|
@ -78,4 +78,4 @@ function pypy_pkg_data {
|
|||
declare -a pd="$(pypy_pkg_data "$(pypy_architecture 2>/dev/null || true)")"
|
||||
|
||||
# install
|
||||
${pd[0]} "${pd[1]}" "${pd[2]}" 'pypy' "verify_py${PYVER//./}" 'ensurepip'
|
||||
${pd[0]} "${pd[1]}" "${pd[2]}" 'pypy' "verify_py${PYVER//./}" 'ensurepip_lt21'
|
||||
|
|
|
@ -11,4 +11,4 @@ url="https://downloads.python.org/pypy/${ver}.tar.bz2"
|
|||
|
||||
prefer_openssl11
|
||||
install_package "openssl-1.1.1f" "https://www.openssl.org/source/openssl-1.1.1f.tar.gz#186c6bfe6ecfba7a5b48c47f8a1673d0f3b0e5ba2e25602dd23b629975da3f35" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "${ver}" "${url}#${hash}" 'pypy_builder' "verify_py${PYVER//./}" 'ensurepip'
|
||||
install_package "${ver}" "${url}#${hash}" 'pypy_builder' "verify_py${PYVER//./}" 'ensurepip_lt21'
|
||||
|
|
Loading…
Reference in a new issue