Add PyPy v8.0.0 (#3552)

* remove OpenSSL source build
PyPy searches dependencies with pkg-config which XCode CLT do not ship, so it cannot build without Homebrew or MacPorts anyway
* Use Homebrew/MacPorts OpenSSL

---------

Co-authored-by: Ivan Pozdeev <vano@mail.mipt.ru>
This commit is contained in:
exurd 2026-09-28 00:01:44 +01:00 committed by GitHub
parent ab74141ab4
commit 2439bee2c5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 269 additions and 0 deletions

View File

@ -1205,6 +1205,8 @@ build_package_pypy() {
} }
build_package_pypy_builder() { build_package_pypy_builder() {
use_homebrew_openssl || use_macports_openssl || true
if [ -f "rpython/bin/rpython" ]; then # pypy 2.x if [ -f "rpython/bin/rpython" ]; then # pypy 2.x
if [ -z "${PYPY_OPTS}" ]; then if [ -z "${PYPY_OPTS}" ]; then
local PYPY_OPTS="--opt=jit --batch --make-jobs=$(num_cpu_cores)" local PYPY_OPTS="--opt=jit --batch --make-jobs=$(num_cpu_cores)"

View File

@ -0,0 +1,77 @@
VERSION='8.0.0'
PYVER='2.7'
# https://www.pypy.org/checksums.html
aarch64_hash=9ece5a6f575514ed38dde663e7f54e59de01c35b2df6d1ef83e25490d6b7c7b8
linux32_hash=74d09cafbe0c85ae4c4d17d54099c6b31354235ffdd5277c01601434cc23e459
linux64_hash=714e8c41608d0d66588c3ba48fb788dc33a1e8a865168d165585d1660beade0d
osarm64_hash=167966aa205ca29b8d3ac6994e3d0d1741f3bf03e9e300737ed591304347c7b0
osx64_hash=4e4f27669b27a7ff950058eb07e22687f5a04ba04220bb3df24411f07d5c0340
### 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.gz"
{ 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'
local pkg="${ARCH}" # assume matches
local ext='tar.gz' # v8.0.0+ now uses gz instead of 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.15"; then
hash="${osx64_hash}"
pkg='macos_x86_64'
else
err_no_binary "${ARCH}, OS X < 10.15"
fi
;;
* )
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_lt21'

View File

@ -0,0 +1,12 @@
VERSION='8.0.0'
PYVER='2.7'
# https://www.pypy.org/checksums.html
hash=e2a56b587014a97a7e6bd14ae99b55247cf2939d67a05a09e62af0afc16125cb
### end of manual settings - following lines same for every download
ver="pypy${PYVER}-v${VERSION}-src"
url="https://downloads.python.org/pypy/${ver}.tar.gz"
install_package "${ver}" "${url}#${hash}" 'pypy_builder' "verify_py${PYVER//./}" 'ensurepip_lt21'

View File

@ -0,0 +1,77 @@
VERSION='8.0.0'
PYVER='3.11'
# https://www.pypy.org/checksums.html
aarch64_hash=37faf1a0b00131748910ad21844a9b1b3fedd630c89b01ec98cdb1b5466ffca5
linux32_hash=14fcf398eacffdc98db2f3b10ae9e8c9628932dc89b0958d145b9fd9c7307301
linux64_hash=66a3657e9ddf2d62ead44d3a44b9ea2f6e7dbf28d812554cae5c982a0585bfa5
osarm64_hash=8fb2abc4f6e3fb5d40ad5bac5092bb6dfcc5131b4a5d2663073155084b9569e4
osx64_hash=5f295181d622147271b51281d4968cb9d11b8c639af9aacf07fd710a496b8d10
### 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.gz"
{ 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'
local pkg="${ARCH}" # assume matches
local ext='tar.gz' # v8.0.0+ now uses gz instead of 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.15"; then
hash="${osx64_hash}"
pkg='macos_x86_64'
else
err_no_binary "${ARCH}, OS X < 10.15"
fi
;;
* )
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'

View File

@ -0,0 +1,12 @@
VERSION='8.0.0'
PYVER='3.11'
# https://www.pypy.org/checksums.html
hash=829cef413d84383563488f0234b3cc537a8034e43fda13e0530500dad2d5dc3b
### end of manual settings - following lines same for every download
ver="pypy${PYVER}-v${VERSION}-src"
url="https://downloads.python.org/pypy/${ver}.tar.gz"
install_package "${ver}" "${url}#${hash}" 'pypy_builder' "verify_py${PYVER//./}" 'ensurepip'

View File

@ -0,0 +1,77 @@
VERSION='8.0.0'
PYVER='3.12'
# https://www.pypy.org/checksums.html
aarch64_hash=72de008683246b0c18aeb8e163dc5d022d3f19b001e8cc5c258010968f10e336
linux32_hash=228d793e57217f2516032db2c38e593914cb222f0d41660d1d8adbb571dcd4e3
linux64_hash=a1b4851459c2b3dffccab71cb08989534fab0839deddd34f0e6bf18add256fd7
osarm64_hash=936ee357126058e43b374ec055495127c9187e2026144b48dca09cc2dcb9b443
osx64_hash=6dd2909a52c205993b42f45f0e92470af54e63387a4e1f61232f9307e72f1447
### 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.gz"
{ 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'
local pkg="${ARCH}" # assume matches
local ext='tar.gz' # v8.0.0+ now uses gz instead of 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.15"; then
hash="${osx64_hash}"
pkg='macos_x86_64'
else
err_no_binary "${ARCH}, OS X < 10.15"
fi
;;
* )
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'

View File

@ -0,0 +1,12 @@
VERSION='8.0.0'
PYVER='3.12'
# https://www.pypy.org/checksums.html
hash=eb406334e413828901034544d0033d67452c3cf2f11f77fd2daae0cd4fbb0a7b
### end of manual settings - following lines same for every download
ver="pypy${PYVER}-v${VERSION}-src"
url="https://downloads.python.org/pypy/${ver}.tar.gz"
install_package "${ver}" "${url}#${hash}" 'pypy_builder' "verify_py${PYVER//./}" 'ensurepip'