mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-18 08:13:46 -05:00
81
plugins/python-build/share/python-build/pypy2.7-7.3.11
Normal file
81
plugins/python-build/share/python-build/pypy2.7-7.3.11
Normal file
@@ -0,0 +1,81 @@
|
||||
VERSION='7.3.11'
|
||||
PYVER='2.7'
|
||||
|
||||
# https://www.pypy.org/checksums.html
|
||||
aarch64_hash=ea924da1defe9325ef760e288b04f984614e405580f5321eb6a5c8f539bd415a
|
||||
linux32_hash=30fd245fab7068c96a75b9ff1323ac55174c64fc8c4751cceb4b7a9bedc1851e
|
||||
linux64_hash=ba8ed958a905c0735a4cfff2875c25089954dc020e087d982b0ffa5b9da316cd
|
||||
osarm64_hash=cc5696ab4f93cd3481c1e4990b5dedd7ba60ac0602fa1890d368889a6c5bf771
|
||||
osx64_hash=56deee9c22640f5686c35b9d64fdb1ce3abd044583e4078f0b171ca2fd2a198e
|
||||
s390x_hash=8fe9481c473178e53266983678684a70fe0c42bafc95f1807bf3ef28770316d4
|
||||
|
||||
### end of manual settings - following lines same for every download
|
||||
|
||||
function err_no_binary {
|
||||
local archmsg="${1}"
|
||||
local ver="pypy${PYVER}-v${VERSION}-src"
|
||||
local url="https://downloads.python.org/pypy/${ver}.tar.bz2"
|
||||
{ echo
|
||||
colorize 1 "ERROR"
|
||||
echo ": The binary distribution of PyPy is not available for ${archmsg}."
|
||||
echo "try '${url}' to build from source."
|
||||
echo
|
||||
} >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
function pypy_pkg_data {
|
||||
# pypy architecture tag
|
||||
local ARCH="${1}"
|
||||
|
||||
# defaults
|
||||
local cmd='install_package' # use bz2
|
||||
local pkg="${ARCH}" # assume matches
|
||||
local ext='tar.bz2'
|
||||
local hash='' # undefined
|
||||
|
||||
# select the hash, fix pkg if not match ARCH
|
||||
case "${ARCH}" in
|
||||
'linux-aarch64' )
|
||||
hash="${aarch64_hash}"
|
||||
pkg='aarch64'
|
||||
;;
|
||||
'linux' )
|
||||
hash="${linux32_hash}"
|
||||
pkg='linux32'
|
||||
;;
|
||||
'linux64' )
|
||||
hash="${linux64_hash}"
|
||||
;;
|
||||
'osarm64' )
|
||||
hash="${osarm64_hash}"
|
||||
pkg='macos_arm64'
|
||||
;;
|
||||
'osx64' )
|
||||
if require_osx_version "10.13"; then
|
||||
hash="${osx64_hash}"
|
||||
pkg='macos_x86_64'
|
||||
else
|
||||
err_no_binary "${ARCH}, OS X < 10.13"
|
||||
fi
|
||||
;;
|
||||
's390x' )
|
||||
hash="${s390x_hash}"
|
||||
;;
|
||||
* )
|
||||
err_no_binary "${ARCH}"
|
||||
;;
|
||||
esac
|
||||
|
||||
local basever="pypy${PYVER}-v${VERSION}"
|
||||
local baseurl="https://downloads.python.org/pypy/${basever}"
|
||||
|
||||
# result - command, package dir, url+hash
|
||||
echo "${cmd}" "${basever}-${pkg}" "${baseurl}-${pkg}.${ext}#${hash}"
|
||||
}
|
||||
|
||||
# determine command, package directory, url+hash
|
||||
declare -a pd="$(pypy_pkg_data "$(pypy_architecture 2>/dev/null || true)")"
|
||||
|
||||
# install
|
||||
${pd[0]} "${pd[1]}" "${pd[2]}" 'pypy' "verify_py${PYVER//./}" 'ensurepip'
|
||||
Reference in New Issue
Block a user