mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
f0f2cdd1c6
Co-authored-by: Dan Dees <dand@appsmiths.com>
81 lines
2.5 KiB
Groff
81 lines
2.5 KiB
Groff
VERSION='7.3.9'
|
|
PYVER='3.8'
|
|
|
|
# https://www.pypy.org/checksums.html
|
|
aarch64_hash=5e124455e207425e80731dff317f0432fa0aba1f025845ffca813770e2447e32
|
|
linux32_hash=4b261516c6c59078ab0c8bd7207327a1b97057b4ec1714ed5e79a026f9efd492
|
|
linux64_hash=08be25ec82fc5d23b78563eda144923517daba481a90af0ace7a047c9c9a3c34
|
|
osx64_hash=91a5c2c1facd5a4931a8682b7d792f7cf4f2ba25cd2e7e44e982139a6d5e4840
|
|
s390x_hash=c6177a0016c9145c7b99fddb5d74cc2e518ccdb216a6deb51ef6a377510cc930
|
|
win64_hash=05022baaa55db2b60880f2422312d9e4025e1267303ac57f33e8253559d0be88
|
|
|
|
### end of manual settings - following lines same for every download
|
|
|
|
function pypy_pkg_data {
|
|
# pypy architecture
|
|
local ARCH="${1}"
|
|
|
|
local basesrc="pypy${PYVER}-${VERSION}-src"
|
|
local basever="pypy${PYVER}-v${VERSION}"
|
|
local baseurl="https://downloads.python.org/pypy/${basever}"
|
|
|
|
# defaults
|
|
local cmd='install_package' # use bz2
|
|
local pkg="${ARCH}" # assume matches
|
|
local url="${baseurl}-${pkg}.tar.bz2" # use bz2
|
|
local hash='' # undefined
|
|
|
|
case "${pkg}" in
|
|
'linux-aarch64' )
|
|
hash="${aarch64_hash}"
|
|
url="${baseurl}-aarch64.tar.bz2" # diff url
|
|
;;
|
|
'linux' )
|
|
hash="${linux32_hash}"
|
|
pkg='linux32' # package name revised
|
|
url="${baseurl}-${pkg}.tar.bz2" # new url
|
|
;;
|
|
'linux64' )
|
|
hash="${linux64_hash}"
|
|
;;
|
|
'osx64' )
|
|
if require_osx_version "10.13"; then
|
|
hash="${osx64_hash}"
|
|
else
|
|
{ echo
|
|
colorize 1 "ERROR"
|
|
echo ": The binary distribution of PyPy is not available for $(pypy_architecture 2>/dev/null || true), OS X < 10.13."
|
|
echo "try '${basesrc}' to build from source."
|
|
echo
|
|
} >&2
|
|
exit 1
|
|
fi
|
|
;;
|
|
's390x' )
|
|
hash="${s390x_hash}"
|
|
;;
|
|
'win64' )
|
|
hash="${win64_hash}"
|
|
cmd='install_zip' # diff command
|
|
url="${baseurl}-${pkg}.zip" # zip rather than bz2
|
|
;;
|
|
* )
|
|
{ echo
|
|
colorize 1 "ERROR"
|
|
echo ": The binary distribution of PyPy is not available for $(pypy_architecture 2>/dev/null || true)."
|
|
echo "try '${basesrc}' to build from source."
|
|
echo
|
|
} >&2
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
# result - command, package dir, url+hash
|
|
echo "${cmd}" "${basever}-${pkg}" "${url}#${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'
|