Compare commits

..

30 Commits

Author SHA1 Message Date
Michał
f8b1d7ae09
pyenv-exec: add the --environment option for programs that embed libpython without a path (#3537)
---------

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: native-api <vano@mail.mipt.ru>
2026-10-02 11:17:30 +03:00
Ayush
6ff25c51d3
pyenv-binary: allow local definitions to override published packages (#3577) 2026-10-02 05:19:21 +03:00
Ivan Pozdeev
42c75f3c53 2.8.7 2026-10-01 09:22:36 +03:00
pyenv-bot[bot]
e258d55f1f
Add CPython 3.10.22, 3.11.17 (#3576)
Co-authored-by: native-api <2670332+native-api@users.noreply.github.com>
2026-10-01 09:18:55 +03:00
pyenv-bot[bot]
627e0aa921
Add CPython 3.14.8 (#3574)
---------

Co-authored-by: native-api <2670332+native-api@users.noreply.github.com>
Co-authored-by: Ivan Pozdeev <vano@mail.mipt.ru>
2026-10-01 07:41:27 +03:00
pyenv-bot[bot]
3d51eb919b
Add CPython 3.12.15, 3.13.16 (#3575)
Co-authored-by: native-api <2670332+native-api@users.noreply.github.com>
2026-10-01 06:11:20 +03:00
Ayush
2e3d62a129
tests: python-buid: use helpers from core (#3572) 2026-09-30 06:28:46 +03:00
Zhaoqi Xu
699e27fb27
init: honor custom PYENV_ROOT in init setup tips (#3569) 2026-09-29 02:41:17 +03:00
native-api
d9b158620e
Speed up permission fix step (#3571)
Saves several seconds for large installations like Anaconda
2026-09-29 01:11:44 +03:00
Ivan Pozdeev
bb15db59a4 graalpython: make python* symlinks 2026-09-28 13:06:24 +03:00
Ivan Pozdeev
60bfb906e1 Use new fixture 2026-09-28 13:04:27 +03:00
exurd
2439bee2c5
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>
2026-09-28 02:01:44 +03:00
exurd
ab74141ab4
Fix minimum macOS version check for PyPy v7.3.8+ (#3570)
* Switch pypy*-7.3.8-aarch64 to -portable
Regular version is no longer available for download

---------

Co-authored-by: Ivan Pozdeev <vano@mail.mipt.ru>
2026-09-27 12:11:20 +03:00
native-api
e9334284e1
Merge pull request #3561 from n0tl3ss/fix/python-build-download-progress
python-build: show download progress in interactive terminals
2026-09-27 11:31:14 +03:00
Nemanja Mikic
8339b9b033 python-build: show download progress in interactive terminals
---
Co-authored-by: Ivan Pozdeev <vano@mail.mipt.ru>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2026-09-27 11:00:13 +03:00
Ivan Pozdeev
67dbc6e930 stub: support ** to match any number of arguments 2026-09-27 10:59:03 +03:00
Ayush
513364609d
pyenv-binary: install published CPython packages (#3567) 2026-09-25 23:45:13 +03:00
exurd
3d1dda120b
python-build: Add add_pypy.py for pypy versions (#3566)
* python-build: add `add_pypy.py` for pypy versions

couldn't help myself ;P

python-build; add_pypy.py: ensure ensurepip is correct

python-build; add_pypy.py: check file extension

python-build; add_pypy.py: update os x version check to 10.15

python-build; add_pypy.py: remove outdated comment

python-build; add_pypy.py: cleanup comment

* Update add_pypy.py

* Remove comments irrelevant to reading the code
2026-09-25 10:13:34 +03:00
exurd
5434a7e3e9
Add PyPy v7.3.21 (#3564)
---------

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2026-09-25 02:19:33 +03:00
native-api
49cc565e1c
Merge pull request #3553 from exurd/pr/pypy-v7.3.23
Add PyPy v7.3.23
2026-09-24 14:20:14 +03:00
Ivan Pozdeev
a55c9df84d CI: install gdbm as part of prerequisites 2026-09-24 12:19:13 +03:00
Ivan Pozdeev
08021a03ab python-build: Support automatically picking PyPy as bootstrap version 2026-09-24 12:18:57 +03:00
exurd
9ac7b27486 Add PyPy v7.3.23 2026-09-24 12:04:24 +03:00
native-api
df5372511c
python-build: create pypy* symlinks for PyPy (#3562)
Source and some older versions builds do not create them
2026-09-24 07:23:52 +03:00
native-api
a3c666e177
install-prerequisites: add an option for optional dependencies (#3560) 2026-09-24 00:12:25 +03:00
native-api
26370b7f24
python-build: create PEP 394 symlinks for PyPy (#3559) 2026-09-23 13:34:23 +03:00
Michael Šimáček
beb4f2ffd2
Add GraalPy 3.13 25.4.4 (#3558) 2026-09-23 09:50:21 +03:00
David Lawson
4eea9b7848
python-build: create PEP 394 symlinks for Pyston (#3557)
* Consolidate build_package_pyston2_2 into build_package_pyston
There's no longer a difference

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: Ivan Pozdeev <vano@mail.mipt.ru>
2026-09-23 09:49:52 +03:00
Ayush
249f8d888e
CI: publish Apple Silicon macOS binaries (#3556)
* pyenv-binary: relocate macOS text paths
* CI: publish Apple Silicon macOS binaries
* pyenv-binary: preserve unrelated bytecode
* CI: stabilize macOS binary package names
2026-09-22 01:12:32 +03:00
Mingyang Wu
7db7714ff7
Fix rehash repair of individually corrupted shims (#3540) 2026-09-21 13:02:14 +03:00
112 changed files with 12721 additions and 279 deletions

View File

@ -20,12 +20,12 @@ runs:
shell: bash shell: bash
run: | run: |
#prerequisites #prerequisites
brew install openssl readline sqlite3 xz tcl-tk@8 libb2 zstd brew install openssl readline sqlite3 xz tcl-tk@8 libb2 zstd gdbm
- if: runner.os == 'Linux' - if: runner.os == 'Linux'
shell: bash shell: bash
run: | run: |
#prerequisites #prerequisites
pyenv install-prerequisites pyenv install-prerequisites --all
- shell: bash - shell: bash
run: | run: |
#build #build

View File

@ -108,7 +108,7 @@ jobs:
echo "$PYENV_ROOT/shims:$PYENV_ROOT/bin" >> $GITHUB_PATH echo "$PYENV_ROOT/shims:$PYENV_ROOT/bin" >> $GITHUB_PATH
- run: | - run: |
#prerequisites #prerequisites
brew install openssl readline sqlite3 xz tcl-tk@8 libb2 zstd brew install openssl readline sqlite3 xz tcl-tk@8 libb2 zstd gdbm
if [[ "${{ matrix.python-version }}" =~ pypy.*-(src|dev) ]]; then if [[ "${{ matrix.python-version }}" =~ pypy.*-(src|dev) ]]; then
export PYENV_BOOTSTRAP_VERSION=pypy2.7-7 export PYENV_BOOTSTRAP_VERSION=pypy2.7-7
echo "PYENV_BOOTSTRAP_VERSION=$PYENV_BOOTSTRAP_VERSION" >> $GITHUB_ENV echo "PYENV_BOOTSTRAP_VERSION=$PYENV_BOOTSTRAP_VERSION" >> $GITHUB_ENV
@ -222,7 +222,7 @@ jobs:
echo "$PYENV_ROOT/shims:$PYENV_ROOT/bin" >> $GITHUB_PATH echo "$PYENV_ROOT/shims:$PYENV_ROOT/bin" >> $GITHUB_PATH
- run: | - run: |
#prerequisites #prerequisites
pyenv install-prerequisites pyenv install-prerequisites --all
if [[ "${{ matrix.python-version }}" =~ pypy.*-(src|dev) ]]; then if [[ "${{ matrix.python-version }}" =~ pypy.*-(src|dev) ]]; then
export PYENV_BOOTSTRAP_VERSION=pypy2.7-7 export PYENV_BOOTSTRAP_VERSION=pypy2.7-7
echo "PYENV_BOOTSTRAP_VERSION=$PYENV_BOOTSTRAP_VERSION" >> $GITHUB_ENV echo "PYENV_BOOTSTRAP_VERSION=$PYENV_BOOTSTRAP_VERSION" >> $GITHUB_ENV

View File

@ -7,26 +7,42 @@ on:
description: A CPython version accepted by `pyenv install` description: A CPython version accepted by `pyenv install`
required: true required: true
type: string type: string
platform:
description: Platform to build on
required: true
type: choice
default: ubuntu-24.04
options:
- ubuntu-24.04
- macos-15
permissions: permissions:
contents: read contents: read
jobs: jobs:
publish_ubuntu: publish:
runs-on: ubuntu-24.04 runs-on: ${{ inputs.platform }}
env: env:
PYENV_ROOT: ${{ github.workspace }} PYENV_ROOT: ${{ github.workspace }}
VERSION: ${{ inputs.version }} VERSION: ${{ inputs.version }}
steps: steps:
- uses: actions/checkout@v7 - uses: actions/checkout@v7
- name: Install build prerequisites - name: Install Ubuntu build prerequisites
if: runner.os == 'Linux'
run: ./bin/pyenv install-prerequisites run: ./bin/pyenv install-prerequisites
- name: Install macOS build prerequisites
if: runner.os == 'macOS'
run: brew install openssl readline sqlite3 xz tcl-tk@8 libb2 zstd
- name: Build package - name: Build package
env: env:
PYTHON_CONFIGURE_OPTS: --enable-optimizations PYTHON_CONFIGURE_OPTS: --enable-optimizations
run: | run: |
VERSION="${VERSION%%:*}" VERSION="${VERSION%%:*}"
entry="$(./bin/pyenv binary package-name "$VERSION")" if [ "$RUNNER_OS" = "macOS" ]; then
entry="${VERSION}-${{ inputs.platform }}-$(uname -m)"
else
entry="$(./bin/pyenv binary package-name "$VERSION")"
fi
echo "entry=$entry" >> "$GITHUB_ENV" echo "entry=$entry" >> "$GITHUB_ENV"
mkdir dist mkdir dist
cd dist cd dist

View File

@ -1,6 +1,28 @@
# Version History # Version History
## Release v2.8.7
* Fix rehash repair of individually corrupted shims by @aprylewu in https://github.com/pyenv/pyenv/pull/3540
* CI: publish Apple Silicon macOS binaries by @macayu17 in https://github.com/pyenv/pyenv/pull/3556
* python-build: create PEP 394 symlinks for Pyston by @dmrlawson in https://github.com/pyenv/pyenv/pull/3557
* Add GraalPy 3.13 25.4.4 by @msimacek in https://github.com/pyenv/pyenv/pull/3558
* python-build: create PEP 394 symlinks for PyPy by @native-api in https://github.com/pyenv/pyenv/pull/3559
* install-prerequisites: add an option for optional dependencies by @native-api in https://github.com/pyenv/pyenv/pull/3560
* python-build: create pypy* symlinks for PyPy by @native-api in https://github.com/pyenv/pyenv/pull/3562
* Add PyPy v7.3.23 by @exurd in https://github.com/pyenv/pyenv/pull/3553
* Add PyPy v7.3.21 by @exurd in https://github.com/pyenv/pyenv/pull/3564
* python-build: Add `add_pypy.py` for pypy versions by @exurd in https://github.com/pyenv/pyenv/pull/3566
* pyenv-binary: install published CPython packages by @macayu17 in https://github.com/pyenv/pyenv/pull/3567
* python-build: show download progress in interactive terminals by @n0tl3ss in https://github.com/pyenv/pyenv/pull/3561
* Fix minimum macOS version check for PyPy v7.3.8+ by @exurd in https://github.com/pyenv/pyenv/pull/3570
* Add PyPy v8.0.0 by @exurd in https://github.com/pyenv/pyenv/pull/3552
* python-build: Speed up permission fix step by @native-api in https://github.com/pyenv/pyenv/pull/3571
* fix(init): honor custom PYENV_ROOT in init setup tips by @r3wretrhy in https://github.com/pyenv/pyenv/pull/3569
* tests: python-build: use helpers from core by @macayu17 in https://github.com/pyenv/pyenv/pull/3572
* Add CPython 3.12.15, 3.13.16 by @pyenv-bot[bot] in https://github.com/pyenv/pyenv/pull/3575
* Add CPython 3.14.8 by @pyenv-bot[bot] in https://github.com/pyenv/pyenv/pull/3574
* Add CPython 3.10.22, 3.11.17 by @pyenv-bot[bot] in https://github.com/pyenv/pyenv/pull/3576
## Release v2.8.6 ## Release v2.8.6
* Update graalpy URLs for 25.3.4.1 by @msimacek in https://github.com/pyenv/pyenv/pull/3533 * Update graalpy URLs for 25.3.4.1 by @msimacek in https://github.com/pyenv/pyenv/pull/3533
* python-build: add build prerequisite installer by @macayu17 in https://github.com/pyenv/pyenv/pull/3532 * python-build: add build prerequisite installer by @macayu17 in https://github.com/pyenv/pyenv/pull/3532

View File

@ -315,7 +315,7 @@ Lists all Python versions with the given command installed.
## `pyenv exec` ## `pyenv exec`
Usage: pyenv exec <command> [arg1 arg2...] Usage: pyenv exec [-N|--environment] <command> [arg1 arg2...]
Runs an executable by first preparing PATH so that the selected Python Runs an executable by first preparing PATH so that the selected Python
version's `bin` directory is at the front. version's `bin` directory is at the front.
@ -326,7 +326,18 @@ For example, if the currently selected Python version is 3.9.7:
is equivalent to: is equivalent to:
PATH="$PYENV_ROOT/versions/3.9.7/bin:$PATH" pip install -r requirements.txt PYENV_VERSION="3.9.7" PATH="$PYENV_ROOT/versions/3.9.7/bin:$PATH" pip install -r requirements.txt
The `--environment` option sets `PYTHONHOME` and `LD_LIBRARY_PATH` (`DYLD_LIBRARY_PATH` in macOS) in the program's environment.
This is needed to run programs that embed Python by loading `libpython` without specifying rpath or an explicit path.
This breaks linking for programs that expect to link to a different `libpython` with the same name as one
in selected Python -- thus it's not done by default.
In macOS, System Integrity Protection (SIP) removes `DYLD_LIBRARY_PATH` from a process' environment
upon `exec` (not `fork`) if the executable being run is protected. The protection covers preinstalled system software
(including preinstalled shells) and does not cover user-installed apps and 3rd-party software. See
[About System Integrity Protection on your Mac - Apple Support](https://support.apple.com/en-us/102149)
for details.
## `pyenv root` ## `pyenv root`

View File

@ -12,7 +12,7 @@
set -e set -e
[ -n "$PYENV_DEBUG" ] && set -x [ -n "$PYENV_DEBUG" ] && set -x
version="2.8.6" version="2.8.7"
git_revision="" git_revision=""
if cd "${BASH_SOURCE%/*}" 2>/dev/null && git remote -v 2>/dev/null | grep -q pyenv; then if cd "${BASH_SOURCE%/*}" 2>/dev/null && git remote -v 2>/dev/null | grep -q pyenv; then

View File

@ -2,7 +2,17 @@
# #
# Summary: Run an executable with the selected Python version # Summary: Run an executable with the selected Python version
# #
# Usage: pyenv exec <command> [arg1 arg2...] # Usage: pyenv exec [-N|--environment] <command> [arg1 arg2...]
#
# -N/--environment Set PYTHONHOME and LD_LIBRARY_PATH (DYLD_LIBRARY_PATH in macOS)
# envvars for the running command.
# This allows to run programs that embed Python without using rpath or
# exact library path to libpython.
# WARNING: For the running command and its child processes, this will
# break linkage for programs that expect to be linked to a different
# libpython instance with the same name!
# WARNING: In macOS, DYLD_LIBRARY_PATH will be unset by the system for
# processes covered by System Integrity Protection.
# #
# Runs an executable by first preparing PATH so that the selected Python # Runs an executable by first preparing PATH so that the selected Python
# version's `bin' directory is at the front. # version's `bin' directory is at the front.
@ -18,9 +28,16 @@ set -e
# Provide pyenv completions # Provide pyenv completions
if [ "$1" = "--complete" ]; then if [ "$1" = "--complete" ]; then
echo --environment
exec pyenv-shims --short exec pyenv-shims --short
fi fi
unset MODIFY_ENV
if [ "$1" = "-N" ] || [ "$1" = "--environment" ]; then
MODIFY_ENV=true
shift
fi
PYENV_VERSION="$(pyenv-version-name -f)" PYENV_VERSION="$(pyenv-version-name -f)"
PYENV_COMMAND="$1" PYENV_COMMAND="$1"
@ -54,4 +71,27 @@ if [ "${PYENV_BIN_PATH#${PYENV_ROOT}}" != "${PYENV_BIN_PATH}" ]; then
# Only add to $PATH for non-system version. # Only add to $PATH for non-system version.
export PATH="${PYENV_BIN_PATH}:${PATH}" export PATH="${PYENV_BIN_PATH}:${PATH}"
fi fi
if [ -n "$MODIFY_ENV" ]; then
# Check if multiple Python versions are selected
VERSIONS=$(pyenv-prefix)
if [[ "$VERSIONS" == *:* ]]; then
VERSION="${VERSIONS%%:*}"
echo "pyenv: Warning: multiple Python versions are selected." \
"Setting environment variables for the first one, (${VERSION#$PYENV_ROOT})" >&2
else
VERSION="$VERSIONS"
fi
# Assign the correct version of PYTHONHOME
export PYTHONHOME="$VERSION"
case "$(uname -s)" in
Darwin)
export DYLD_LIBRARY_PATH="${PYTHONHOME}/lib${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}"
;;
*)
export LD_LIBRARY_PATH="${PYTHONHOME}/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}"
;;
esac
fi
exec "$PYENV_COMMAND_PATH" "$@" exec "$PYENV_COMMAND_PATH" "$@"

View File

@ -189,8 +189,76 @@ function help_() {
} >&2 } >&2
} }
# True when tips/install should keep the portable default root form.
function pyenv_root_is_default() {
[[ ${PYENV_ROOT} == "${HOME}/.pyenv" ]]
}
# Escape a value for inclusion inside double quotes in a POSIX shell script.
function escape_for_double_quoted_posix() {
local s="$1"
s="${s//\\/\\\\}"
s="${s//\"/\\\"}"
s="${s//\$/\\\$}"
s="${s//\`/\\\`}"
printf '%s' "$s"
}
# Escape a value for inclusion inside double quotes in a fish script.
function escape_for_double_quoted_fish() {
local s="$1"
s="${s//\\/\\\\}"
s="${s//\"/\\\"}"
s="${s//\$/\\\$}"
printf '%s' "$s"
}
# Escape a value for inclusion inside single quotes in a PowerShell script.
function escape_for_single_quoted_pwsh() {
local s="$1"
# Bash 3.2 (macOS / CI docker): avoid \' in ${//} replacement —
# it becomes a literal backslash. Double single-quotes via a var instead.
local q="'"
s="${s//${q}/${q}${q}}"
printf '%s' "$s"
}
# Emit the PYENV_ROOT assignment line for tips/--install (posix|fish|pwsh).
# Portable default keeps $HOME / $Env:HOME; custom roots are quoted per target shell.
function print_pyenv_root_assignment() {
case "$1" in
posix )
if pyenv_root_is_default; then
echo 'export PYENV_ROOT="$HOME/.pyenv"'
else
printf 'export PYENV_ROOT="%s"\n' "$(escape_for_double_quoted_posix "${PYENV_ROOT}")"
fi
;;
fish )
if pyenv_root_is_default; then
# Keep master's expandable $HOME form (fish expands unquoted $HOME).
echo 'set -Ux PYENV_ROOT $HOME/.pyenv'
else
printf 'set -Ux PYENV_ROOT "%s"\n' "$(escape_for_double_quoted_fish "${PYENV_ROOT}")"
fi
;;
pwsh )
if pyenv_root_is_default; then
echo '$Env:PYENV_ROOT="$Env:HOME/.pyenv"'
else
# Single-quoted PowerShell literal: no $ / backtick expansion.
printf "\$Env:PYENV_ROOT='%s'\n" "$(escape_for_single_quoted_pwsh "${PYENV_ROOT}")"
fi
;;
* )
echo "pyenv: internal error: unknown shell family for PYENV_ROOT assignment: $1" >&2
return 1
;;
esac
}
function print_posix_shell_setup() { function print_posix_shell_setup() {
echo 'export PYENV_ROOT="$HOME/.pyenv"' print_pyenv_root_assignment posix
echo '[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"' echo '[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"'
echo 'eval "$(pyenv init - '$shell')"' echo 'eval "$(pyenv init - '$shell')"'
} }
@ -200,7 +268,7 @@ function print_fish_shell_setup() {
} }
function print_fish_user_path_setup() { function print_fish_user_path_setup() {
echo 'set -Ux PYENV_ROOT $HOME/.pyenv' print_pyenv_root_assignment fish
echo 'if functions -q fish_add_path' echo 'if functions -q fish_add_path'
echo ' test -d $PYENV_ROOT/bin; and fish_add_path $PYENV_ROOT/bin' echo ' test -d $PYENV_ROOT/bin; and fish_add_path $PYENV_ROOT/bin'
echo 'else' echo 'else'
@ -209,7 +277,7 @@ function print_fish_user_path_setup() {
} }
function print_pwsh_shell_setup() { function print_pwsh_shell_setup() {
echo '$Env:PYENV_ROOT="$Env:HOME/.pyenv"' print_pyenv_root_assignment pwsh
echo 'if (Test-Path -LP "$Env:PYENV_ROOT/bin" -PathType Container) {' echo 'if (Test-Path -LP "$Env:PYENV_ROOT/bin" -PathType Container) {'
echo ' $Env:PATH="$Env:PYENV_ROOT/bin:$Env:PATH" }' echo ' $Env:PATH="$Env:PYENV_ROOT/bin:$Env:PATH" }'
echo 'iex ((pyenv init -) -join "`n")' echo 'iex ((pyenv init -) -join "`n")'

View File

@ -80,10 +80,8 @@ fi
unset tested_for_other_write_errors unset tested_for_other_write_errors
# The prototype shim file is a script that re-execs itself, passing # The prototype shim file is a script that re-execs itself, passing
# its filename and any arguments to `pyenv exec`. This file is # its filename and any arguments to `pyenv exec`. This file is copied
# hard-linked for every executable and then removed. The linking # for every executable and then removed. It also serves as a lock.
# technique is fast, uses less disk space than unique files, and also
# serves as a locking mechanism.
create_prototype_shim() { create_prototype_shim() {
cat > "$PROTOTYPE_SHIM_PATH" <<SH cat > "$PROTOTYPE_SHIM_PATH" <<SH
#!/usr/bin/env bash #!/usr/bin/env bash
@ -100,18 +98,30 @@ fi
exec "$(command -v pyenv)" exec "\$program" "\$@" exec "$(command -v pyenv)" exec "\$program" "\$@"
SH SH
chmod +x "$PROTOTYPE_SHIM_PATH" chmod +x "$PROTOTYPE_SHIM_PATH"
local LC_ALL=C
IFS= read -r -d '' PROTOTYPE_SHIM_CONTENTS < "$PROTOTYPE_SHIM_PATH" || true
PROTOTYPE_SHIM_READ_SIZE=$((${#PROTOTYPE_SHIM_CONTENTS} + 1))
} }
# If the contents of the prototype shim file differ from the contents # Install a shim when it is first registered, replacing an existing copy
# of the first shim in the shims directory, assume pyenv has been # if it was overwritten. Hooks can then customize it without a later
# upgraded and the existing shims need to be removed. # registration overwriting their changes.
remove_outdated_shims() { install_shims() {
local shim local shim file shim_contents
for shim in "$SHIM_PATH"/*; do # Count bytes consistently across Bash versions, including multibyte paths.
if ! diff "$PROTOTYPE_SHIM_PATH" "$shim" >/dev/null 2>&1; then local LC_ALL=C
rm -f "$SHIM_PATH"/* for shim; do
file="${SHIM_PATH}/${shim}"
if [[ -f "$file" || ( -L "$file" && ! -e "$file" ) ]]; then
shim_contents=
# Read with a builtin to avoid a subprocess per shim. A successful
# read means a NUL or extra character was found. Limit the read in
# case a large file was accidentally written over a shim.
if IFS= read -r -d '' -n "$PROTOTYPE_SHIM_READ_SIZE" shim_contents 2>/dev/null < "$file" || [[ $shim_contents != "$PROTOTYPE_SHIM_CONTENTS" ]]; then
rm -f "$file"
fi
fi fi
break [ -e "$file" ] || cp "$PROTOTYPE_SHIM_PATH" "$file"
done done
} }
@ -132,7 +142,10 @@ if ((${BASH_VERSINFO[0]} > 3)); then
# Registers the name of a shim to be generated. # Registers the name of a shim to be generated.
register_shim() { register_shim() {
registered_shims["$1"]=1 if [[ ! ${registered_shims["$1"]} ]]; then
install_shims "$1"
registered_shims["$1"]=1
fi
} }
# Install all shims registered via `make_shims` or `register_shim` directly. # Install all shims registered via `make_shims` or `register_shim` directly.
@ -162,7 +175,10 @@ else # Same for bash < 4.
registered_shims=" " registered_shims=" "
register_shim() { register_shim() {
registered_shims="${registered_shims}${1} " if [[ "$registered_shims" != *" ${1} "* ]]; then
install_shims "$1"
registered_shims="${registered_shims}${1} "
fi
} }
install_registered_shims() { install_registered_shims() {
@ -188,7 +204,6 @@ shopt -s nullglob
# Create the prototype shim, then register shims for all known # Create the prototype shim, then register shims for all known
# executables. # executables.
create_prototype_shim create_prototype_shim
remove_outdated_shims
# shellcheck disable=SC2046 # shellcheck disable=SC2046
make_shims $(pyenv-versions --executables) make_shims $(pyenv-versions --executables)

View File

@ -19,6 +19,25 @@ by the `xz` package).
## Commands ## Commands
### `pyenv binary install <version>`
Installs a matching published package from pyenv.github.io under `<version>`.
The command selects by OS, architecture and distribution; on macOS, an archive
built on an older major release can also be used. Available packages and their
definition checksums are recorded in `share/pyenv-binary/versions`. Add an entry
there when publishing a new package. The definition checks its system-library
requirements when an `ldconfig` cache is available; otherwise, it warns and
proceeds.
```sh
pyenv binary install 3.14.7
```
A definition with the selected package entry's name in a plugin's
`share/python-build` directory overrides the published definition. The normal
Python-Build search order applies, including `PYTHON_BUILD_DEFINITIONS`.
Local definitions are installed without downloading the stock definition.
### `pyenv binary package [-v|--verbose] <version>[:<entry>] --archive-base-url <url>` ### `pyenv binary package [-v|--verbose] <version>[:<entry>] --archive-base-url <url>`
Installs `<version>` from source under a separate name, packages that install Installs `<version>` from source under a separate name, packages that install
@ -55,12 +74,13 @@ pyenv binary package-name 3.12.7
# 3.12.7-debian-12-x86_64 # 3.12.7-debian-12-x86_64
``` ```
### `pyenv binary save <version> [<output-dir>] [--name <name>]` ### `pyenv binary save <version> [<output-dir>] [--name <name>] [--source-version <version>]`
Packs an installed version into `<version>-<platform>.tar.xz` (relative paths) Packs an installed version into `<version>-<platform>.tar.xz` (relative paths)
and writes `<version>-<platform>.meta` describing the build platform (OS, arch, and writes `<version>-<platform>.meta` describing the build platform (OS, arch,
distro and libc version) and the system libraries the build links against. Use distro and libc version) and the system libraries the build links against. Use
`--name` to set a different base name for both files. `--name` to set a different base name for both files. `--source-version` records
the source version when the installed version has a different name.
```sh ```sh
pyenv binary save 3.12.7 ./dist pyenv binary save 3.12.7 ./dist
@ -87,11 +107,12 @@ pyenv binary generate-installer ./dist/3.12.7-linux-x86_64.meta \
pyenv install 3.12.7-linux-x86_64 pyenv install 3.12.7-linux-x86_64
``` ```
### `pyenv binary relocate <prefix>` ### `pyenv binary relocate <prefix> [<build-prefix>]`
Rewrites the rpaths of a Python tree unpacked into `<prefix>` so the interpreter Rewrites the rpaths of a Python tree unpacked into `<prefix>` so the interpreter
and its extension modules load the bundled libraries from there rather than from and its extension modules load the bundled libraries from there rather than from
the path the archive was built at. Uses `patchelf`. The generated definition the path the archive was built at. Linux and FreeBSD use `patchelf`; macOS
calls this; you rarely run it by hand. requires the original `<build-prefix>`. The generated definition calls this;
you rarely run it by hand.
Relocation is implemented for Linux; macOS is not wired up yet. Relocation is implemented for Linux, FreeBSD and macOS.

View File

@ -0,0 +1,130 @@
#!/usr/bin/env bash
#
# Summary: Install a published binary package
#
# Usage: pyenv binary install <version>
#
# Selects a compatible package from pyenv.github.io and installs it under
# <version>. Ordinary `pyenv install' is unchanged.
#
set -e
[ -n "$PYENV_DEBUG" ] && set -x
if [ "$1" = "--complete" ]; then
exit
fi
if [ "$#" -ne 1 ]; then
pyenv-help --usage binary-install >&2
exit 1
fi
case "$1" in
*/* | .. | . | *[[:cntrl:]]* )
echo "pyenv-binary: invalid version name \`$1'" >&2
exit 1
;;
esac
requested="$1"
os="$(uname -s)"
arch="$(uname -m)"
case "$os" in
Linux )
if [ -r /etc/os-release ]; then
distro="$(. /etc/os-release && printf '%s %s' "${ID:-}" "${VERSION_ID:-}")"
elif type -p lsb_release >/dev/null; then
distro="$(lsb_release -si) $(lsb_release -sr)"
fi
distro="$(printf '%s' "$distro" | tr '[:upper:]' '[:lower:]')"
;;
Darwin )
distro="macos $(sw_vers -productVersion)"
;;
esac
tmpdir="$(mktemp -d)"
trap 'rm -rf "$tmpdir"' EXIT
base_url="https://pyenv.github.io/pythons/binaries"
manifest_dir="$(dirname "${BASH_SOURCE[0]}")/../share/pyenv-binary/versions"
case "$requested" in
*.*.* ) manifests=( "$manifest_dir/${requested%.*}" ) ;;
*.* ) manifests=( "$manifest_dir/$requested" ) ;;
* ) manifests=( "$manifest_dir/$requested".* ) ;;
esac
matches="$tmpdir/matches"
: > "$matches"
for manifest in "${manifests[@]}"; do
[ -f "$manifest" ] || continue
while IFS=$'\t' read -r source_version name target_os target_arch target_distro sha256; do
case "$source_version" in
"$requested" | "$requested".* ) ;;
* ) continue ;;
esac
[[ "$source_version" =~ ^[0-9]+(\.[0-9]+){1,2}$ ]] || continue
[ "$target_os" = "$os" ] && [ "$target_arch" = "$arch" ] || continue
case "$name" in
"" | . | .. | *[!A-Za-z0-9._-]* ) continue ;;
esac
case "$os" in
Linux ) [ "$(printf '%s' "$target_distro" | tr '[:upper:]' '[:lower:]')" = "$distro" ] || continue ;;
Darwin )
target_version="${target_distro#macos }"
[ "$target_version" != "$target_distro" ] || continue
host_version="${distro#macos }"
[[ "$target_version" =~ ^[0-9]+(\.[0-9]+){1,2}$ ]] || continue
[[ "$host_version" =~ ^[0-9]+(\.[0-9]+){1,2}$ ]] || continue
IFS=. read -r target_major target_minor target_patch <<< "$target_version"
IFS=. read -r host_major host_minor host_patch <<< "$host_version"
target_patch="${target_patch:-0}"
host_patch="${host_patch:-0}"
[ "$host_major" -ge "$target_major" ] || continue
if [ "$host_major" -eq "$target_major" ]; then
[ "$host_minor" -ge "$target_minor" ] || continue
if [ "$host_minor" -eq "$target_minor" ]; then
[ "$host_patch" -ge "$target_patch" ] || continue
fi
fi
;;
* ) continue ;;
esac
printf '%s\t%s\t%s\n' "$source_version" "$name" "$sha256" >> "$matches"
done < "$manifest"
done
selection="$(sort -t. -k1,1nr -k2,2nr -k3,3nr "$matches" | head -n1)"
IFS=$'\t' read -r version entry expected_sha <<< "$selection"
if [ -z "$entry" ]; then
echo "pyenv-binary: no binary available for $requested on $os/$arch" >&2
exit 1
fi
definitions="$(pyenv-install --list --bare)" || definitions=""
if printf '%s\n' "$definitions" | grep -qxF -- "$entry"; then
pyenv-install "$entry:$version"
exit
fi
if ! [[ "$expected_sha" =~ ^[0-9a-fA-F]{64}$ ]]; then
echo "pyenv-binary: invalid checksum for $entry" >&2
exit 1
fi
expected_sha="$(printf '%s' "$expected_sha" | tr '[:upper:]' '[:lower:]')"
curl -fsSL -o "$tmpdir/$entry" "$base_url/$entry"
if command -v sha256sum >/dev/null 2>&1; then
actual_sha="$(sha256sum "$tmpdir/$entry")"; actual_sha="${actual_sha%% *}"
elif command -v shasum >/dev/null 2>&1; then
actual_sha="$(shasum -a 256 "$tmpdir/$entry")"; actual_sha="${actual_sha%% *}"
elif command -v openssl >/dev/null 2>&1; then
actual_sha="$(openssl dgst -sha256 "$tmpdir/$entry")"; actual_sha="${actual_sha##* }"
else
echo "pyenv-binary: need sha256sum, shasum or openssl to verify $entry" >&2
exit 1
fi
if [ "$actual_sha" != "$expected_sha" ]; then
echo "pyenv-binary: checksum mismatch for $entry" >&2
exit 1
fi
pyenv-install "$tmpdir/$entry:$version"

View File

@ -77,7 +77,9 @@ esac
# `pyenv install' puts a `<version>:<alias>' build under versions/<alias>. # `pyenv install' puts a `<version>:<alias>' build under versions/<alias>.
pyenv-install ${verbose:+--verbose} "$spec" pyenv-install ${verbose:+--verbose} "$spec"
pyenv-binary-save "$entry" "$PWD" --name "$entry" source_version="$(pyenv-latest -f -k "${spec%%:*}")"
source_version="${source_version##*/}"
pyenv-binary-save "$entry" "$PWD" --name "$entry" --source-version "$source_version"
pyenv-binary-generate-installer "${entry}.meta" \ pyenv-binary-generate-installer "${entry}.meta" \
--archive-url "${archive_base_url%/}/${entry}.tar.xz" -o "$entry" --archive-url "${archive_base_url%/}/${entry}.tar.xz" -o "$entry"

View File

@ -100,6 +100,22 @@ if [ "$(uname -s)" = "Darwin" ]; then
while IFS= read -r so; do while IFS= read -r so; do
relocate_macho "$so" '@loader_path/../..' relocate_macho "$so" '@loader_path/../..'
done < <(find "$prefix" -type f -path '*/lib/python*/lib-dynload/*.so') done < <(find "$prefix" -type f -path '*/lib/python*/lib-dynload/*.so')
# CPython records its installation prefix in generated scripts and build
# metadata. Bytecode can also retain source filenames from the build tree.
build_prefix_pattern="$(printf '%s\n' "$build_prefix" | sed 's/[][\\.^$*|]/\\&/g')"
prefix_replacement="$(printf '%s\n' "$prefix" | sed 's/[\\&|]/\\&/g')"
while IFS= read -r file; do
if LC_ALL=C grep -IqF "$build_prefix" "$file"; then
sed -i.bak "s|${build_prefix_pattern}|${prefix_replacement}|g" "$file"
rm -f "${file}.bak"
fi
done < <(find "$prefix" -type f ! -name '*.pyc' ! -name '*.pyo')
while IFS= read -r file; do
if LC_ALL=C grep -aqF "$build_prefix" "$file"; then
rm -f "$file"
fi
done < <(find "$prefix" -type f \( -name '*.pyc' -o -name '*.pyo' \))
exit exit
fi fi

View File

@ -2,7 +2,7 @@
# #
# Summary: Save an installed Python version as a relocatable archive # Summary: Save an installed Python version as a relocatable archive
# #
# Usage: pyenv binary save <version> [<output-dir>] [--name <name>] # Usage: pyenv binary save <version> [<output-dir>] [--name <name>] [--source-version <version>]
# #
# Packs an installed version into a relocatable .tar.xz (relative paths) and # Packs an installed version into a relocatable .tar.xz (relative paths) and
# writes a metadata file listing the build platform and the system libraries # writes a metadata file listing the build platform and the system libraries
@ -12,6 +12,7 @@
# <output-dir> Where to write the archive and metadata (default: `.'). # <output-dir> Where to write the archive and metadata (default: `.').
# --name <name> Use <name> as the archive and metadata base name instead of # --name <name> Use <name> as the archive and metadata base name instead of
# <version>-<platform>. # <version>-<platform>.
# --source-version <version> Record the version used to build a renamed install.
# #
set -e set -e
[ -n "$PYENV_DEBUG" ] && set -x [ -n "$PYENV_DEBUG" ] && set -x
@ -19,18 +20,23 @@ set -e
# Provide pyenv completions # Provide pyenv completions
if [ "$1" = "--complete" ]; then if [ "$1" = "--complete" ]; then
echo --name echo --name
echo --source-version
exec pyenv-versions --bare exec pyenv-versions --bare
fi fi
version="" version=""
output_dir="" output_dir=""
package_name="" package_name=""
source_version=""
while [ $# -gt 0 ]; do while [ $# -gt 0 ]; do
case "$1" in case "$1" in
--name ) --name )
[ $# -ge 2 ] && [ -n "$2" ] || { echo "pyenv-binary: --name needs a value" >&2; exit 1; } [ $# -ge 2 ] && [ -n "$2" ] || { echo "pyenv-binary: --name needs a value" >&2; exit 1; }
package_name="$2"; shift 2 ;; package_name="$2"; shift 2 ;;
--source-version )
[ $# -ge 2 ] && [ -n "$2" ] && [ "${2#-}" = "$2" ] || { echo "pyenv-binary: --source-version needs a value" >&2; exit 1; }
source_version="$2"; shift 2 ;;
-* ) -* )
echo "pyenv-binary: unknown option \`$1'" >&2; exit 1 ;; echo "pyenv-binary: unknown option \`$1'" >&2; exit 1 ;;
* ) * )
@ -49,7 +55,7 @@ done
output_dir="${output_dir:-$PWD}" output_dir="${output_dir:-$PWD}"
if [ -z "$version" ]; then if [ -z "$version" ]; then
echo "Usage: pyenv binary save <version> [<output-dir>] [--name <name>]" >&2 echo "Usage: pyenv binary save <version> [<output-dir>] [--name <name>] [--source-version <version>]" >&2
exit 1 exit 1
fi fi
@ -69,6 +75,14 @@ case "$package_name" in
;; ;;
esac esac
source_version="${source_version:-$version}"
case "$source_version" in
*/* | .. | . | *[[:cntrl:]]* )
echo "pyenv-binary: invalid source version \`${source_version}'" >&2
exit 1
;;
esac
prefix="${PYENV_ROOT}/versions/${version}" prefix="${PYENV_ROOT}/versions/${version}"
if [ ! -d "${prefix}/bin" ]; then if [ ! -d "${prefix}/bin" ]; then
echo "pyenv-binary: version \`${version}' is not installed" >&2 echo "pyenv-binary: version \`${version}' is not installed" >&2
@ -142,6 +156,7 @@ tar -C "$(dirname "$prefix")" -cJf "${output_dir}/${archive}" "$(basename "$pref
{ {
echo "# pyenv-binary metadata" echo "# pyenv-binary metadata"
echo "version=${version}" echo "version=${version}"
echo "source_version=${source_version}"
echo "os=${os}" echo "os=${os}"
echo "arch=${arch}" echo "arch=${arch}"
echo "platform=${platform}" echo "platform=${platform}"

View File

@ -0,0 +1,3 @@
source_version entry os arch distro sha256
3.14.7 3.14.7-macos-15-arm64 Darwin arm64 macos 15.7.9 8a8ff86b520c3b5da00b49e04a5345b7a28f2f9e8da5a9ae43b8ac309e8f3e55
3.14.7 3.14.7-ubuntu-24.04-x86_64 Linux x86_64 ubuntu 24.04 e63dbcb981ec9ba83a2bc9b4d8b369620cec4aa45394559d719c5606ee9ff718

View File

@ -0,0 +1,203 @@
#!/usr/bin/env bats
load test_helper
host_distro() {
if [ -r /etc/os-release ]; then
. /etc/os-release
printf '%s %s' "$ID" "$VERSION_ID" | tr '[:upper:]' '[:lower:]'
else
printf '%s %s' "$(lsb_release -si)" "$(lsb_release -sr)" | tr '[:upper:]' '[:lower:]'
fi
}
use_manifest() {
local plugin="${BATS_TEST_TMPDIR}/plugin"
mkdir -p "$plugin/libexec" "$plugin/share/pyenv-binary/versions"
cp "${BATS_TEST_DIRNAME}/../libexec/pyenv-binary-install" "$plugin/libexec/"
PATH="$plugin/libexec:$PATH"
printf 'source_version\tentry\tos\tarch\tdistro\tsha256\n' > "$plugin/share/pyenv-binary/versions/3.14"
definition_sha="4c4ed1afbfdaa1e4c3bf7bbb82d730cecb7e384da91eea4f3cc093fd545524d6"
}
stub_downloads() {
create_stub curl <<'STUB'
output=""
while [ "$#" -gt 0 ]; do
case "$1" in
-o ) output="$2"; shift ;;
http* ) url="$1" ;;
esac
shift
done
case "$url" in
*/3.14.7-ubuntu-24.04-x86_64 | */3.14.7-macos-15-arm64 | */3.14.10-ubuntu-24.04-x86_64 ) printf definition > "$output" ;;
* ) exit 1 ;;
esac
STUB
}
@test "rejects a modified published definition" {
create_stub lsb_release 'case "$1" in -si) echo Ubuntu;; -sr) echo 24.04;; esac'
use_manifest
printf '3.14.7\t3.14.7-ubuntu-24.04-x86_64\tLinux\tx86_64\t%s\t%064d\n' \
"$(host_distro)" 0 >> "$BATS_TEST_TMPDIR/plugin/share/pyenv-binary/versions/3.14"
stub_downloads
create_stub uname 'case "$1" in -s) echo Linux;; -m) echo x86_64;; esac'
create_stub pyenv-install '[ "$1" = --list ] && exit; echo installed'
run pyenv-binary-install 3.14.7
assert_failure
[[ "$output" == *'checksum mismatch'* ]]
}
@test "completion does not offer source-only versions" {
create_stub pyenv-install 'echo 3.14.7'
run pyenv-binary-install --complete
assert_success ""
}
@test "a plugin definition overrides a published binary without its checksum" {
create_stub lsb_release 'case "$1" in -si) echo Ubuntu;; -sr) echo 24.04;; esac'
use_manifest
export TMPDIR="$BATS_TEST_TMPDIR/temp"
mkdir -p "$TMPDIR"
local entry="3.14.7-ubuntu-24.04-x86_64"
printf '3.14.7\t%s\tLinux\tx86_64\t%s\t%s\n' "$entry" \
"$(host_distro)" "" >> "$BATS_TEST_TMPDIR/plugin/share/pyenv-binary/versions/3.14"
create_stub uname 'case "$1" in -s) echo Linux;; -m) echo x86_64;; esac'
create_stub curl 'touch "$BATS_TEST_TMPDIR/downloaded"; exit 1'
PATH="${BATS_TEST_DIRNAME}/../../python-build/bin:$PATH"
mkdir -p "$PYENV_ROOT/plugins/first/share/python-build" "$PYENV_ROOT/plugins/second/share/python-build"
printf '%s\n' 'mkdir -p "$PREFIX_PATH"; echo first > "$PREFIX_PATH/marker"' \
> "$PYENV_ROOT/plugins/first/share/python-build/$entry"
echo 'exit 1' > "$PYENV_ROOT/plugins/second/share/python-build/$entry"
run pyenv-binary-install 3.14
assert_success ""
assert_equal first "$(cat "$PYENV_ROOT/versions/3.14.7/marker")"
[ ! -e "$BATS_TEST_TMPDIR/downloaded" ]
assert_equal "" "$(find "$TMPDIR" -mindepth 1 -maxdepth 1 -type d)"
}
@test "an explicit definition path takes precedence over a plugin definition" {
create_stub lsb_release 'case "$1" in -si) echo Ubuntu;; -sr) echo 24.04;; esac'
use_manifest
local entry="3.14.7-ubuntu-24.04-x86_64"
printf '3.14.7\t%s\tLinux\tx86_64\t%s\t%s\n' "$entry" \
"$(host_distro)" "$definition_sha" >> "$BATS_TEST_TMPDIR/plugin/share/pyenv-binary/versions/3.14"
create_stub uname 'case "$1" in -s) echo Linux;; -m) echo x86_64;; esac'
create_stub curl 'touch "$BATS_TEST_TMPDIR/downloaded"; exit 1'
PATH="${BATS_TEST_DIRNAME}/../../python-build/bin:$PATH"
export PYTHON_BUILD_DEFINITIONS="$BATS_TEST_TMPDIR/custom definitions"
mkdir -p "$PYTHON_BUILD_DEFINITIONS" "$PYENV_ROOT/plugins/custom/share/python-build"
printf '%s\n' 'mkdir -p "$PREFIX_PATH"; echo custom > "$PREFIX_PATH/marker"' \
> "$PYTHON_BUILD_DEFINITIONS/$entry"
echo 'exit 1' > "$PYENV_ROOT/plugins/custom/share/python-build/$entry"
run pyenv-binary-install 3.14.7
assert_success ""
assert_equal custom "$(cat "$PYENV_ROOT/versions/3.14.7/marker")"
[ ! -e "$BATS_TEST_TMPDIR/downloaded" ]
}
@test "rejects an invalid published checksum when definition lookup fails" {
create_stub lsb_release 'case "$1" in -si) echo Ubuntu;; -sr) echo 24.04;; esac'
use_manifest
printf '3.14.7\t3.14.7-ubuntu-24.04-x86_64\tLinux\tx86_64\t%s\tinvalid\n' \
"$(host_distro)" >> "$BATS_TEST_TMPDIR/plugin/share/pyenv-binary/versions/3.14"
create_stub uname 'case "$1" in -s) echo Linux;; -m) echo x86_64;; esac'
create_stub pyenv-install 'exit 1'
create_stub curl 'touch "$BATS_TEST_TMPDIR/downloaded"; exit 1'
run pyenv-binary-install 3.14.7
assert_failure "pyenv-binary: invalid checksum for 3.14.7-ubuntu-24.04-x86_64"
[ ! -e "$BATS_TEST_TMPDIR/downloaded" ]
}
@test "installs a matching published binary with an uppercase checksum" {
create_stub lsb_release 'case "$1" in -si) echo Ubuntu;; -sr) echo 24.04;; esac'
use_manifest
local uppercase_sha="$(printf '%s' "$definition_sha" | tr '[:lower:]' '[:upper:]')"
printf '3.14.7\t3.14.7-macos-15-arm64\tDarwin\tarm64\tmacos 15.7.9\t%s\n' \
"$definition_sha" >> "$BATS_TEST_TMPDIR/plugin/share/pyenv-binary/versions/3.14"
printf '3.14.7\t3.14.7-ubuntu-24.04-x86_64\tLinux\tx86_64\t%s\t%s\n' \
"$(host_distro | tr '[:lower:]' '[:upper:]')" "$uppercase_sha" \
>> "$BATS_TEST_TMPDIR/plugin/share/pyenv-binary/versions/3.14"
stub_downloads
create_stub uname 'case "$1" in -s) echo Linux;; -m) echo x86_64;; esac'
create_stub pyenv-install <<'STUB'
[ "$1" = --list ] && exit
definition="${1%:*}"
printf '%s:%s\n' "${definition##*/}" "${1##*:}"
cat "$definition"
STUB
run pyenv-binary-install 3.14
assert_success "3.14.7-ubuntu-24.04-x86_64:3.14.7
definition"
}
@test "a version prefix selects the latest published binary" {
create_stub lsb_release 'case "$1" in -si) echo Ubuntu;; -sr) echo 24.04;; esac'
use_manifest
printf '3.14.10\t3.14.10-ubuntu-24.04-x86_64\tLinux\tx86_64\t%s\t%s\n' \
"$(host_distro)" "$definition_sha" >> "$BATS_TEST_TMPDIR/plugin/share/pyenv-binary/versions/3.14"
printf '3.14.7\t3.14.7-ubuntu-24.04-x86_64\tLinux\tx86_64\t%s\t%s\n' \
"$(host_distro)" "$definition_sha" >> "$BATS_TEST_TMPDIR/plugin/share/pyenv-binary/versions/3.14"
stub_downloads
create_stub uname 'case "$1" in -s) echo Linux;; -m) echo x86_64;; esac'
create_stub pyenv-install '[ "$1" = --list ] && exit; echo "${1##*:}"'
run pyenv-binary-install 3.14
assert_success "3.14.10"
}
@test "fails when no published binary matches the host" {
use_manifest
printf '3.14.7\t3.14.7-macos-15-arm64\tDarwin\tarm64\tmacos 15.7.9\t%s\n' \
"$definition_sha" >> "$BATS_TEST_TMPDIR/plugin/share/pyenv-binary/versions/3.14"
create_stub uname 'case "$1" in -s) echo Linux;; -m) echo x86_64;; esac'
run pyenv-binary-install 3.14.7
assert_failure "pyenv-binary: no binary available for 3.14.7 on Linux/x86_64"
}
@test "does not select a package for another Linux release" {
create_stub lsb_release 'case "$1" in -si) echo Ubuntu;; -sr) echo 22.04;; esac'
use_manifest
local other_release="ubuntu 24.04"
[ "$(host_distro)" = "$other_release" ] && other_release="ubuntu 22.04"
printf '3.14.7\t3.14.7-ubuntu-24.04-x86_64\tLinux\tx86_64\t%s\t%s\n' \
"$other_release" "$definition_sha" >> "$BATS_TEST_TMPDIR/plugin/share/pyenv-binary/versions/3.14"
create_stub uname 'case "$1" in -s) echo Linux;; -m) echo x86_64;; esac'
run pyenv-binary-install 3.14.7
assert_failure "pyenv-binary: no binary available for 3.14.7 on Linux/x86_64"
}
@test "uses a macOS binary built on an older release" {
use_manifest
printf '3.14.7\t3.14.7-macos-15-arm64\tDarwin\tarm64\tmacos 15.7.9\t%s\n' \
"$definition_sha" >> "$BATS_TEST_TMPDIR/plugin/share/pyenv-binary/versions/3.14"
stub_downloads
create_stub uname 'case "$1" in -s) echo Darwin;; -m) echo arm64;; esac'
create_stub sw_vers 'echo 26.6.2'
create_stub pyenv-install '[ "$1" = --list ] && exit; echo "${1##*:}"'
run pyenv-binary-install 3.14.7
assert_success "3.14.7"
}
@test "rejects a macOS binary built on a newer patch release" {
use_manifest
printf '3.14.7\t3.14.7-macos-15-arm64\tDarwin\tarm64\tmacos 15.7.9\t%s\n' \
"$definition_sha" >> "$BATS_TEST_TMPDIR/plugin/share/pyenv-binary/versions/3.14"
create_stub uname 'case "$1" in -s) echo Darwin;; -m) echo arm64;; esac'
create_stub sw_vers 'echo 15.7.8'
create_stub pyenv-install '[ "$1" = --list ] && exit; echo installed'
run pyenv-binary-install 3.14.7
assert_failure "pyenv-binary: no binary available for 3.14.7 on Darwin/arm64"
}

View File

@ -68,10 +68,24 @@ pyenv-install --list --bare
assert [ -d "${PYENV_ROOT}/versions/3.12.7-debian-12-x86_64" ] assert [ -d "${PYENV_ROOT}/versions/3.12.7-debian-12-x86_64" ]
assert [ -f "${BATS_TEST_TMPDIR}/3.12.7-debian-12-x86_64.tar.xz" ] assert [ -f "${BATS_TEST_TMPDIR}/3.12.7-debian-12-x86_64.tar.xz" ]
assert [ -f "${BATS_TEST_TMPDIR}/3.12.7-debian-12-x86_64.meta" ] assert [ -f "${BATS_TEST_TMPDIR}/3.12.7-debian-12-x86_64.meta" ]
run grep '^source_version=' "${BATS_TEST_TMPDIR}/3.12.7-debian-12-x86_64.meta"
assert_success "source_version=3.12.7"
run grep '^ARCHIVE_URL=' "${BATS_TEST_TMPDIR}/3.12.7-debian-12-x86_64" run grep '^ARCHIVE_URL=' "${BATS_TEST_TMPDIR}/3.12.7-debian-12-x86_64"
assert_success "ARCHIVE_URL=http://example.com/binaries/3.12.7-debian-12-x86_64.tar.xz" assert_success "ARCHIVE_URL=http://example.com/binaries/3.12.7-debian-12-x86_64.tar.xz"
} }
@test "records the definition name when packaging from a file" {
stub_build_environment
cd "${BATS_TEST_TMPDIR}"
printf 'install_package "foo"\n' > custom-python
run pyenv-binary-package "${BATS_TEST_TMPDIR}/custom-python:custom-build" \
--archive-base-url http://example.com/binaries
assert_success
run grep '^source_version=' custom-build.meta
assert_success "source_version=custom-python"
}
@test "rejects an entry name containing a slash" { @test "rejects an entry name containing a slash" {
run pyenv-binary-package "3.12.7:foo/bar" --archive-base-url http://x/b run pyenv-binary-package "3.12.7:foo/bar" --archive-base-url http://x/b
assert_failure "pyenv-binary: invalid entry name \`foo/bar'" assert_failure "pyenv-binary: invalid entry name \`foo/bar'"
@ -84,6 +98,7 @@ pyenv-install --list --bare
@test "packages on macOS" { @test "packages on macOS" {
create_stub uname 'case "$1" in -s) echo Darwin;; -m) echo arm64;; esac' create_stub uname 'case "$1" in -s) echo Darwin;; -m) echo arm64;; esac'
create_stub pyenv-latest 'echo 3.12.7'
create_stub pyenv-install 'echo install' create_stub pyenv-install 'echo install'
create_stub pyenv-binary-save 'echo save' create_stub pyenv-binary-save 'echo save'
create_stub pyenv-binary-generate-installer 'echo generate-installer' create_stub pyenv-binary-generate-installer 'echo generate-installer'

View File

@ -23,11 +23,25 @@ create_interpreter() {
} }
create_macos_tree() { create_macos_tree() {
local prefix="${BATS_TEST_TMPDIR}/prefix" local prefix="${BATS_TEST_TMPDIR}/prefix&target"
local lib="${prefix}/lib/python3.12" local lib="${prefix}/lib/python3.12"
mkdir -p "${prefix}/bin" "${lib}/lib-dynload" "${lib}/site-packages/numpy" local old="/build prefix/3.12.7"
mkdir -p \
"${prefix}/bin" \
"${prefix}/lib/pkgconfig" \
"${lib}/__pycache__" \
"${lib}/lib-dynload" \
"${lib}/site-packages/numpy"
printf '#!/bin/sh\n' > "${prefix}/bin/python3.12" printf '#!/bin/sh\n' > "${prefix}/bin/python3.12"
chmod +x "${prefix}/bin/python3.12" chmod +x "${prefix}/bin/python3.12"
printf '#!%s/bin/python3.12\n' "$old" > "${prefix}/bin/pip3"
chmod +x "${prefix}/bin/pip3"
printf 'prefix=%s\n' "$old" > "${prefix}/lib/pkgconfig/python-3.12.pc"
printf 'prefix=/build prefix/3x12x7\n' > "${prefix}/lib/pkgconfig/unrelated.pc"
printf 'prefix = "%s"\n' "$old" > "${lib}/_sysconfigdata.py"
printf '\0bytecode:%s/module.py\n' "$old" > "${lib}/__pycache__/module.cpython-312.pyc"
printf '\0bytecode:%s/legacy.py\n' "$old" > "${lib}/legacy.pyo"
printf '\0sourceless bytecode\n' > "${lib}/sourceless.pyc"
touch "${prefix}/lib/libpython3.12.dylib" touch "${prefix}/lib/libpython3.12.dylib"
touch "${lib}/lib-dynload/_ssl.cpython-312-darwin.so" touch "${lib}/lib-dynload/_ssl.cpython-312-darwin.so"
touch "${lib}/site-packages/numpy/_multiarray.so" touch "${lib}/site-packages/numpy/_multiarray.so"
@ -45,6 +59,9 @@ case "$1" in
-L ) -L )
echo "${file}:" echo "${file}:"
case "$file" in case "$file" in
*/bin/pip3 )
exit 1
;;
*/bin/python3.12 ) */bin/python3.12 )
if [ -n "$OTOOL_RELOCATED" ]; then if [ -n "$OTOOL_RELOCATED" ]; then
echo " @rpath/libpython3.12.dylib (compatibility version 3.12.0, current version 3.12.0)" echo " @rpath/libpython3.12.dylib (compatibility version 3.12.0, current version 3.12.0)"
@ -179,7 +196,7 @@ STUB
} }
@test "relocates macOS load commands without changing unrelated entries" { @test "relocates macOS load commands without changing unrelated entries" {
local prefix="${BATS_TEST_TMPDIR}/prefix" local prefix="${BATS_TEST_TMPDIR}/prefix&target"
local old="/build prefix/3.12.7" local old="/build prefix/3.12.7"
local lib="${prefix}/lib/python3.12" local lib="${prefix}/lib/python3.12"
create_macos_tree create_macos_tree
@ -197,10 +214,21 @@ STUB
EOF EOF
run grep -F "${lib}/site-packages/numpy/_multiarray.so" "${BATS_TEST_TMPDIR}/otool.log" run grep -F "${lib}/site-packages/numpy/_multiarray.so" "${BATS_TEST_TMPDIR}/otool.log"
assert_failure assert_failure
run head -n 1 "${prefix}/bin/pip3"
assert_output "#!${prefix}/bin/python3.12"
run cat "${prefix}/lib/pkgconfig/python-3.12.pc"
assert_output "prefix=${prefix}"
run cat "${prefix}/lib/pkgconfig/unrelated.pc"
assert_output "prefix=/build prefix/3x12x7"
run cat "${lib}/_sysconfigdata.py"
assert_output "prefix = \"${prefix}\""
assert [ ! -e "${lib}/__pycache__/module.cpython-312.pyc" ]
assert [ ! -e "${lib}/legacy.pyo" ]
assert [ -e "${lib}/sourceless.pyc" ]
} }
@test "skips already relocated macOS load commands" { @test "skips already relocated macOS load commands" {
local prefix="${BATS_TEST_TMPDIR}/prefix" local prefix="${BATS_TEST_TMPDIR}/prefix&target"
create_macos_tree create_macos_tree
stub_macos_tools stub_macos_tools
export OTOOL_RELOCATED=1 export OTOOL_RELOCATED=1
@ -211,7 +239,7 @@ EOF
} }
@test "fails when install_name_tool cannot modify a selected file" { @test "fails when install_name_tool cannot modify a selected file" {
local prefix="${BATS_TEST_TMPDIR}/prefix" local prefix="${BATS_TEST_TMPDIR}/prefix&target"
create_macos_tree create_macos_tree
stub_macos_tools stub_macos_tools
create_path_executable install_name_tool 'exit 1' create_path_executable install_name_tool 'exit 1'

View File

@ -12,7 +12,7 @@ platform() {
@test "fails with no version given" { @test "fails with no version given" {
run pyenv-binary-save run pyenv-binary-save
assert_failure "Usage: pyenv binary save <version> [<output-dir>] [--name <name>]" assert_failure "Usage: pyenv binary save <version> [<output-dir>] [--name <name>] [--source-version <version>]"
} }
@test "fails for a version that is not installed" { @test "fails for a version that is not installed" {
@ -55,6 +55,28 @@ platform() {
assert_success "archive=custom.tar.xz" assert_success "archive=custom.tar.xz"
} }
@test "records the source version for a renamed build" {
create_version "3.12.7-ubuntu-24.04-x86_64"
local out="${BATS_TEST_TMPDIR}/dist"
run pyenv-binary-save "3.12.7-ubuntu-24.04-x86_64" "$out" \
--name "3.12.7-ubuntu-24.04-x86_64" --source-version "3.12.7"
assert_success
run grep '^source_version=' "${out}/3.12.7-ubuntu-24.04-x86_64.meta"
assert_success "source_version=3.12.7"
}
@test "rejects an option as the source version" {
run pyenv-binary-save "3.12.7" --source-version --name custom
assert_failure "pyenv-binary: --source-version needs a value"
}
@test "rejects control characters in the default source version" {
run pyenv-binary-save $'3.12.7\nsource_version=other'
assert_failure
[[ "$output" == "pyenv-binary: invalid source version"* ]]
}
@test "fails when --name has no value" { @test "fails when --name has no value" {
run pyenv-binary-save "3.12.7" --name run pyenv-binary-save "3.12.7" --name
assert_failure "pyenv-binary: --name needs a value" assert_failure "pyenv-binary: --name needs a value"

View File

@ -261,7 +261,7 @@ for i in "${!DEFINITIONS[@]}"; do
PYENV_BOOTSTRAP_VERSION="${PYENV_RPYTHON_VERSION}" PYENV_BOOTSTRAP_VERSION="${PYENV_RPYTHON_VERSION}"
else else
for version in $(pyenv-versions --bare | sort -r); do for version in $(pyenv-versions --bare | sort -r); do
if [[ "${version}" == "2.7"* ]]; then if [[ "${version}" =~ ^(2\.7|pypy2\.7) ]]; then
PYENV_BOOTSTRAP_VERSION="$version" PYENV_BOOTSTRAP_VERSION="$version"
break break
fi fi
@ -275,7 +275,7 @@ for i in "${!DEFINITIONS[@]}"; do
fi fi
done done
else else
echo "pyenv-install: $VERSION_NAME: PyPy requires Python 2.7 to build from source." >&2 echo "pyenv-install: $VERSION_NAME: PyPy requires Python 2.7 to build from source. You can specify the version to use by setting the PYENV_BOOTSTRAP_VERSION environment variable." >&2
exit 1 exit 1
fi fi
;; ;;

View File

@ -2,13 +2,16 @@
# #
# Summary: Install Python build prerequisites on Debian-based systems # Summary: Install Python build prerequisites on Debian-based systems
# #
# Usage: pyenv install-prerequisites # Usage: pyenv install-prerequisites [-a|--all]
#
# -a/--all Also install optional dependencies (for rarely used modules)
# #
set -e set -e
[ -n "$PYENV_DEBUG" ] && set -x [ -n "$PYENV_DEBUG" ] && set -x
# Provide pyenv completions # Provide pyenv completions
if [ "$1" = "--complete" ]; then if [ "$1" = "--complete" ]; then
echo --all
exit exit
fi fi
@ -17,11 +20,22 @@ usage() {
[ -z "$1" ] || exit "$1" [ -z "$1" ] || exit "$1"
} }
if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then all=
usage 0
fi
[ "$#" -eq 0 ] || usage 1 >&2 while (($#)); do
case "$1" in
-h|--help)
usage 0
;;
-a|--all)
all=1
;;
*)
usage 1 >&2
;;
esac
shift
done
if ! command -v apt-get >/dev/null; then if ! command -v apt-get >/dev/null; then
echo "pyenv: installing build prerequisites is not supported on this system" >&2 echo "pyenv: installing build prerequisites is not supported on this system" >&2
@ -33,6 +47,9 @@ prerequisites=(
libsqlite3-dev curl git llvm libncurses5-dev libncursesw5-dev xz-utils libsqlite3-dev curl git llvm libncurses5-dev libncursesw5-dev xz-utils
tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev libzstd-dev tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev libzstd-dev
) )
optional=(
libgdbm-dev
)
if [ "$(id -u)" -eq 0 ]; then if [ "$(id -u)" -eq 0 ]; then
apt_get=(apt-get) apt_get=(apt-get)
@ -44,4 +61,4 @@ else
fi fi
"${apt_get[@]}" update -q "${apt_get[@]}" update -q
"${apt_get[@]}" install -yq "${prerequisites[@]}" "${apt_get[@]}" install -yq "${prerequisites[@]}" ${all:+"${optional[@]}"}

View File

@ -14,7 +14,7 @@
# -g/--debug Build a debug version # -g/--debug Build a debug version
# #
PYTHON_BUILD_VERSION="2.8.6" PYTHON_BUILD_VERSION="2.8.7"
OLDIFS="$IFS" OLDIFS="$IFS"
@ -425,6 +425,18 @@ http_head_aria2c() {
aria2c --dry-run --no-conf=true ${ARIA2_OPTS} "$1" >&4 2>&1 aria2c --dry-run --no-conf=true ${ARIA2_OPTS} "$1" >&4 2>&1
} }
# Shows interactive output of a program
# while also logging it.
# Usage:
# command <switches forcing interactive output to non-terminal> 2>&1 | interactive_output; rc=${PIPESTATUS[0]}
interactive_output() {
if [ -n "$VERBOSE" ]; then
cat >> "$LOG_PATH"
else
tee -a "$LOG_PATH" >&3
fi
}
http_get_aria2c() { http_get_aria2c() {
# aria2c always treats -o argument as a relative path # aria2c always treats -o argument as a relative path
local out dir_out; local out dir_out;
@ -447,7 +459,26 @@ http_get_aria2c() {
dir_out="$HOME" dir_out="$HOME"
fi fi
if aria2c --allow-overwrite=true --no-conf=true -d "${dir_out}" -o "${out}" ${ARIA2_OPTS} "$1" >&4; then local aria2c_progress=
# aria2c prints status to stdout rather than stderr.
# As a result, when stdout is redirected, it becomes line-buffered,
# and status messages (which are divided by CRs) are not seen
# until a summary message with some LFs is printed.
# So we have to print summaries often as a crutch.
# But need to make the interval reasonable because each summary is
# several lines long which, made too often, becomes obnoxious.
[ -t 3 ] && aria2c_progress="--summary-interval=5"
local cmd
cmd=(aria2c --allow-overwrite=true --no-conf=true -d "${dir_out}" -o "${out}" ${aria2c_progress} ${ARIA2_OPTS} "$1")
if [ -t 3 ]; then
"${cmd[@]}" 2>&1 | interactive_output
ret=${PIPESTATUS[0]}
else
"${cmd[@]}" >&4
ret=$?
fi
if [ "$ret" -eq 0 ]; then
[ -n "$2" ] || cat "${dir_out:-.}/${out}" [ -n "$2" ] || cat "${dir_out:-.}/${out}"
else else
false false
@ -471,7 +502,21 @@ http_get_curl() {
local curl_is_snap; local curl_is_snap;
if [[ $(command -v curl) == "/snap/"* ]]; then curl_is_snap=1; fi if [[ $(command -v curl) == "/snap/"* ]]; then curl_is_snap=1; fi
if [[ -n $2 && -n $curl_is_snap ]]; then out="$HOME/$(basename "$2")"; else out="$2"; fi if [[ -n $2 && -n $curl_is_snap ]]; then out="$HOME/$(basename "$2")"; else out="$2"; fi
curl -q -o "${out:--}" -sSLf ${CURL_OPTS} "$1" || return $? local curl_progress=
if [ -t 3 ]; then
curl_progress="--no-silent"
fi
local cmd
cmd=(curl -q -o "${out:--}" -sSLf ${CURL_OPTS} ${curl_progress} "$1")
if [ -t 3 ]; then
exec 5>&1
"${cmd[@]}" 3>&1 1>&5 2>&3 3>&- | interactive_output
ret=${PIPESTATUS[0]}
exec 5>&-
[ "$ret" -eq 0 ] || return "$ret"
else
"${cmd[@]}" || return $?
fi
if [[ -n $out && -n $curl_is_snap ]]; then mv "$out" "$2"; fi if [[ -n $out && -n $curl_is_snap ]]; then mv "$out" "$2"; fi
} }
@ -480,7 +525,21 @@ http_head_wget() {
} }
http_get_wget() { http_get_wget() {
wget -nv ${WGET_OPTS} -O "${2:--}" "$1" local wget_progress="-nv"
if [ -t 3 ]; then
wget_progress="-nv --show-progress --progress=bar:force:noscroll"
fi
local cmd
cmd=(wget ${WGET_OPTS} ${wget_progress} -O "${2:--}" "$1")
if [ -t 3 ]; then
exec 5>&1
"${cmd[@]}" 3>&1 1>&5 2>&3 3>&- | interactive_output
ret=${PIPESTATUS[0]}
exec 5>&-
return "$ret"
else
"${cmd[@]}"
fi
} }
fetch_tarball() { fetch_tarball() {
@ -998,27 +1057,29 @@ build_package_jython_builder() {
( cd "dist" && build_package_jython ) ( cd "dist" && build_package_jython )
} }
build_package_pyston2_2() { build_package_pyston() {
# currently supported version 2.2 and 2.3
build_package_copy build_package_copy
mkdir -p "${PREFIX_PATH}/bin" "${PREFIX_PATH}/lib" # Pyston tarballs provide an executable with a version-specific naming scheme
local bin # and `pyston` and `pyston3` symlinks to it.
shopt -s nullglob make_python_symlinks pyston
for bin in "bin/"*; do
if [ -f "${bin}" ] && [ -x "${bin}" ] && [ ! -L "${bin}" ]; then
case "${bin##*/}" in
"pyston"* )
( cd "${PREFIX_PATH}/bin" && ln -fs "${bin##*/}" "python" )
;;
esac
fi
done
shopt -u nullglob
} }
build_package_pyston() { # Add missing `python', `pythonX' and `pythonX.Y' symlinks as per PEP 394.
# currently supported version 2.3.1v2 and higher make_python_symlinks() {
build_package_copy local seeder_basename version_suffix real_interpreter
local -a interpreter_names
seeder_basename="${1:?}"; shift
(($#)) && interpreter_names=("$@") || interpreter_names=(python)
local real_interpreter
real_interpreter=$(resolve_link "${PREFIX_PATH}/bin/$seeder_basename" || echo $seeder_basename)
# Use syntax accepted in both Py2 and Py3. Even though current Py2 holdouts (e.g. PyPy) support e.g. print()
version_suffix=$("${PREFIX_PATH}/bin/$seeder_basename" -c 'import sys; sys.stdout.write("%d.%d\n" % sys.version_info[:2])')
for interpreter_name in "${interpreter_names[@]}"; do
for name in "$interpreter_name" "$interpreter_name${version_suffix%.*}" "$interpreter_name${version_suffix}"; do
[[ -e "${PREFIX_PATH}/bin/$name" ]] || ln -fs "${real_interpreter}" "${PREFIX_PATH}/bin/$name"
done
done
} }
build_package_ironpython() { build_package_ironpython() {
@ -1114,30 +1175,38 @@ pyston_architecture() {
# Note: not used by graalpy >= 23.3.0 anymore # Note: not used by graalpy >= 23.3.0 anymore
build_package_graalpython() { build_package_graalpython() {
build_package_copy build_package_copy
ln -fs "${PREFIX_PATH}/bin/graalpython" "${PREFIX_PATH}/bin/python" make_python_symlinks graalpython
} }
build_package_pypy() { build_package_pypy() {
build_package_copy build_package_copy
mkdir -p "${PREFIX_PATH}/bin" "${PREFIX_PATH}/lib"
local bin local bin
shopt -s nullglob shopt -s nullglob
for bin in "bin/"*; do for bin in "bin/libpypy"*; do
if [ -f "${bin}" ] && [ -x "${bin}" ] && [ ! -L "${bin}" ]; then if [[ -f "${bin}" && -x "${bin}" && ! -L "${bin}" ]]; then
case "${bin##*/}" in ln -fs "../bin/${bin##*/}" "${PREFIX_PATH}/lib/${bin##*/}"
"libpypy"* ) fi
( cd "${PREFIX_PATH}/lib" && ln -fs "../bin/${bin##*/}" "${bin##*/}" ) done
;;
"pypy"* ) # PyPy source builds may create only a pypy* executable with a version-sepecific name
( cd "${PREFIX_PATH}/bin" && ln -fs "${bin##*/}" "python" ) local seeder= seeder_candidate
;; for seeder_candidate in "${PREFIX_PATH}/bin/"pypy*; do
esac if [[ -f $seeder_candidate && -x $seeder_candidate ]]; then
seeder="${seeder_candidate##*/}"
break
fi fi
done done
shopt -u nullglob shopt -u nullglob
[[ -n $seeder ]] || {
echo "python-build: Cannot find a valid PyPy executable in \`${PREFIX_PATH}/bin'" >&4
exit 1
}
make_python_symlinks "$seeder" pypy python
} }
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)"
@ -1261,7 +1330,7 @@ cleanup_builtin_patches() {
fix_directory_permissions() { fix_directory_permissions() {
# Ensure installed directories are not world-writable # Ensure installed directories are not world-writable
find "$PREFIX_PATH" -type d \( -perm -020 -o -perm -002 \) -exec chmod go-w {} \; find "$PREFIX_PATH" -type d \( -perm -020 -o -perm -002 \) -exec chmod go-w {} \+
} }
require_java7() { require_java7() {
@ -2769,7 +2838,8 @@ else
BUILD_PATH="$PYTHON_BUILD_BUILD_PATH" BUILD_PATH="$PYTHON_BUILD_BUILD_PATH"
fi fi
exec 4<> "$LOG_PATH" # open the log file at fd 4 # Append mode needed to be able to `tee` to it at the same time
exec 4>> "$LOG_PATH"
if [ -n "$VERBOSE" ]; then if [ -n "$VERBOSE" ]; then
tail -f "$LOG_PATH" & tail -f "$LOG_PATH" &
TAIL_PID=$! TAIL_PID=$!

View File

@ -0,0 +1,221 @@
#!/usr/bin/env python3
"""Rudimentary script to add PyPY releases automagically.
Requires requests-html.
Checks the PyPy download archives for new versions,
then writes a build script for any which do not exist locally,
saving it to plugins/python-build/share/python-build.
Written and tested in *CPython* 3.9.6. PyPy3 compatibility is not
guaranteed, but it should work.
"""
from pathlib import Path
import argparse
import logging
import re
import sys
from requests_html import HTMLSession
# https://downloads.python.org/pypy/versions.json doesn't contain
# checksums, so using checksums.html instead.
# More convenient than calculating them from downloads.
PYPY_REPO = "https://downloads.python.org/pypy/"
PYPY_CHECKSUMS = "https://pypy.org/checksums.html"
here = Path(__file__).resolve()
OUT_DIR: Path = here.parent.parent / "share" / "python-build"
EXCLUDED_RELEASES = [] # none for now
# Note: Remember to escape/unescape curly braces when editing the bash script
SCRIPT_BIN = """
VERSION='{version_pypy}'
PYVER='{version_python}'
# https://www.pypy.org/checksums.html
aarch64_hash={checksum_aarch64}
linux32_hash={checksum_linux32}
linux64_hash={checksum_linux64}
osarm64_hash={checksum_osarm64}
osx64_hash={checksum_osx64}
### 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.{file_ext}"
{{ 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 {file_ext}
local pkg="${{ARCH}}" # assume matches
local ext='tar.{file_ext}'
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}'
""".lstrip()
SCRIPT_SRC = """
VERSION='{version_pypy}'
PYVER='{version_python}'
# https://www.pypy.org/checksums.html
hash={checksum_src}
### end of manual settings - following lines same for every download
ver="pypy${{PYVER}}-v${{VERSION}}-src"
url="https://downloads.python.org/pypy/${{ver}}.tar.{file_ext}"
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}'
""".lstrip()
args = None
logger = logging.getLogger(__name__)
def main() -> bool:
html_session = HTMLSession()
response = html_session.get(PYPY_CHECKSUMS)
page = response.html
checksum_blocks = page.find("pre.literal-block")
for csum_block in checksum_blocks:
python_version, pypy_version = parse_pypy_ver(csum_block.text)
py_it = f"pypy{python_version}-{pypy_version}"
if py_it not in EXCLUDED_RELEASES:
vbin_path = OUT_DIR.joinpath(py_it)
vsrc_path = OUT_DIR.joinpath(py_it+"-src")
kwargs = None
for ps in ((vbin_path, SCRIPT_BIN), (vsrc_path, SCRIPT_SRC)):
if not ps[0].is_file():
kwargs = kwargs or parse_checksums_ext(csum_block.text)
code = ps[1].format(
version_pypy=pypy_version,
version_python=python_version,
ensurepip="ensurepip" if not python_version == "2.7" else "ensurepip_lt21",
**kwargs # which are:
# checksum_aarch64
# checksum_linux32
# checksum_linux64
# checksum_osarm64
# checksum_osx64
# checksum_src
# file_ext
)
if not args.dry_run:
with open(file=ps[0], mode="w", encoding="utf-8") as f:
f.write(code)
f.close()
else:
print(f"---- DRY RUN SCRIPT FOR {ps[0]} ----")
print(code)
def parse_pypy_ver(csum_block:str) -> tuple[str,str]:
"""Gets the PyPy name from the checksum block."""
match = re.findall(r"pypy([0-9]\.[0-9]+)\-v([0-9]\.[0-9]\.[0-9]+)", csum_block)
match = set(match)
if len(match) == 1:
return match.pop()
return ""
def parse_checksums_ext(csum_block:str) -> dict:
"""Gets the checksums and ext for each platform (excluding win64) from the checksum block."""
chksm_ex = {
r"aarch64": "",
r"linux32": "",
r"linux64": "",
r"macos_arm64": "",
r"macos_x86_64": "",
r"src": "",
}
ext = set()
for ex in chksm_ex:
match = re.findall(r"([a-z0-9]+) pypy[0-9]\.[0-9]+\-v[0-9]\.[0-9]\.[0-9]+-"+ex+r".tar.(gz|bz2)", csum_block)
chksm_ex[ex] = match[0][0]
ext.add(match[0][1])
# if both gz and bz2, prefer bz2
ext = ext.pop() if len(ext) == 1 else "bz2"
return {
"checksum_aarch64": chksm_ex["aarch64"],
"checksum_linux32": chksm_ex["linux32"],
"checksum_linux64": chksm_ex["linux64"],
"checksum_osarm64": chksm_ex["macos_arm64"],
"checksum_osx64": chksm_ex["macos_x86_64"],
"checksum_src": chksm_ex["src"],
"file_ext": ext
}
if __name__ == "__main__":
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument(
"-d", "--dry-run", action="store_true",
help="Do not write scripts, just report them to stdout",
)
args = parser.parse_args()
#sys.excepthook seems to have no effect in Github Actions
try:
sys.exit(main())
except Exception:
logging.exception("Unhandled exception occurred")
sys.exit(2)

View File

@ -0,0 +1,9 @@
prefer_openssl3
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
install_package "openssl-3.6.5" "https://github.com/openssl/openssl/releases/download/openssl-3.6.5/openssl-3.6.5.tar.gz#a2157c2830efdec3788939b00c9b0638306d3f0bbb76dc4832ee503bb397df98" mac_openssl --if has_broken_mac_openssl
install_package "readline-8.3" "https://ftpmirror.gnu.org/readline/readline-8.3.tar.gz#fe5383204467828cd495ee8d1d3c037a7eba1389c22bc6a041f627976f9061cc" mac_readline --if has_broken_mac_readline
if has_tar_xz_support; then
install_package "Python-3.10.22" "https://www.python.org/ftp/python/3.10.22/Python-3.10.22.tar.xz#c61fe9b1a1a7ec2a0b0388e664187c378a5325a89e3606d220abf5bdfccb2543" standard verify_py310 copy_python_gdb ensurepip
else
install_package "Python-3.10.22" "https://www.python.org/ftp/python/3.10.22/Python-3.10.22.tgz#9448b34d16f8e3db0964ac3ed9fb283197747543c2c021f283ffd2c8b7287357" standard verify_py310 copy_python_gdb ensurepip
fi

View File

@ -0,0 +1,11 @@
prefer_openssl3
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL_RPATH=1
export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1
install_package "openssl-3.6.5" "https://github.com/openssl/openssl/releases/download/openssl-3.6.5/openssl-3.6.5.tar.gz#a2157c2830efdec3788939b00c9b0638306d3f0bbb76dc4832ee503bb397df98" mac_openssl --if has_broken_mac_openssl
install_package "readline-8.3" "https://ftpmirror.gnu.org/readline/readline-8.3.tar.gz#fe5383204467828cd495ee8d1d3c037a7eba1389c22bc6a041f627976f9061cc" mac_readline --if has_broken_mac_readline
if has_tar_xz_support; then
install_package "Python-3.11.17" "https://www.python.org/ftp/python/3.11.17/Python-3.11.17.tar.xz#bfb74ad39efae27cda510f134ab408e00f9992c56851cfc0b1cdb5646da11599" standard verify_py311 copy_python_gdb ensurepip
else
install_package "Python-3.11.17" "https://www.python.org/ftp/python/3.11.17/Python-3.11.17.tgz#53cdee63ac4bf12387b7b33a53d3b1f8f4941cad73807a7b4fe91bb001ef004a" standard verify_py311 copy_python_gdb ensurepip
fi

View File

@ -0,0 +1,11 @@
prefer_openssl3
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL_RPATH=1
export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1
install_package "openssl-3.6.5" "https://github.com/openssl/openssl/releases/download/openssl-3.6.5/openssl-3.6.5.tar.gz#a2157c2830efdec3788939b00c9b0638306d3f0bbb76dc4832ee503bb397df98" mac_openssl --if has_broken_mac_openssl
install_package "readline-8.3" "https://ftpmirror.gnu.org/readline/readline-8.3.tar.gz#fe5383204467828cd495ee8d1d3c037a7eba1389c22bc6a041f627976f9061cc" mac_readline --if has_broken_mac_readline
if has_tar_xz_support; then
install_package "Python-3.12.15" "https://www.python.org/ftp/python/3.12.15/Python-3.12.15.tar.xz#c2c4321961fab0fb999d66e0cecf521c2ab3994c7992873ea99e306c1094fd5a" standard verify_py312 copy_python_gdb ensurepip
else
install_package "Python-3.12.15" "https://www.python.org/ftp/python/3.12.15/Python-3.12.15.tgz#de1a241a519e0a3374fea98988d0b52c886743f9d953f23be8269cc7b59c5fab" standard verify_py312 copy_python_gdb ensurepip
fi

View File

@ -0,0 +1,11 @@
prefer_openssl3
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL_RPATH=1
export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1
install_package "openssl-3.6.5" "https://github.com/openssl/openssl/releases/download/openssl-3.6.5/openssl-3.6.5.tar.gz#a2157c2830efdec3788939b00c9b0638306d3f0bbb76dc4832ee503bb397df98" mac_openssl --if has_broken_mac_openssl
install_package "readline-8.3" "https://ftpmirror.gnu.org/readline/readline-8.3.tar.gz#fe5383204467828cd495ee8d1d3c037a7eba1389c22bc6a041f627976f9061cc" mac_readline --if has_broken_mac_readline
if has_tar_xz_support; then
install_package "Python-3.13.16" "https://www.python.org/ftp/python/3.13.16/Python-3.13.16.tar.xz#f4b1bfb3c79b5bb11b8d228a12504163b4c0dab4d679828d8f5f26b6cb6ab35d" standard verify_py313 copy_python_gdb ensurepip
else
install_package "Python-3.13.16" "https://www.python.org/ftp/python/3.13.16/Python-3.13.16.tgz#cfac63bddf956deafb1172ca131ae5dcaafd6f95056086e233fca205593ed427" standard verify_py313 copy_python_gdb ensurepip
fi

View File

@ -0,0 +1,2 @@
export PYTHON_BUILD_FREE_THREADING=1
source "${BASH_SOURCE[0]%t}"

View File

@ -0,0 +1,11 @@
prefer_openssl3_to_4
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL_RPATH=1
export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1
install_package "openssl-4.0.3" "https://github.com/openssl/openssl/releases/download/openssl-4.0.3/openssl-4.0.3.tar.gz#325b5c806167c13b40b1ffeadfe0248197c00eccc4cf123ec1e28d2d2fd216d9" mac_openssl --if has_broken_mac_openssl
install_package "readline-8.3" "https://ftpmirror.gnu.org/readline/readline-8.3.tar.gz#fe5383204467828cd495ee8d1d3c037a7eba1389c22bc6a041f627976f9061cc" mac_readline --if has_broken_mac_readline
if has_tar_xz_support; then
install_package "Python-3.14.8" "https://www.python.org/ftp/python/3.14.8/Python-3.14.8.tar.xz#c2215904f02b175596dc49351585104f4bc20341e1c47378b26a2c274360ce73" standard verify_py314 copy_python_gdb ensurepip
else
install_package "Python-3.14.8" "https://www.python.org/ftp/python/3.14.8/Python-3.14.8.tgz#a65b20a728f169f4e66ae143f40b1bd3d33c38d770251663f627c9767b79b210" standard verify_py314 copy_python_gdb ensurepip
fi

View File

@ -0,0 +1,2 @@
export PYTHON_BUILD_FREE_THREADING=1
source "${BASH_SOURCE[0]%t}"

View File

@ -0,0 +1,50 @@
# Copyright (c) 2026, Oracle and/or its affiliates. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including without limitation the rights to
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
# of the Software, and to permit persons to whom the Software is furnished to do
# so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
VERSION='25.4.4'
RELEASE_TAG='graal-25.4.4'
colorize 1 "GraalPy 23.1 and later installed by python-build use the faster Oracle GraalVM distribution" && echo
colorize 1 "Oracle GraalVM uses the GFTC license, which is free for development and production use, see https://medium.com/graalvm/161527df3d76" && echo
colorize 1 "The GraalVM Community Edition variant of GraalPy is also available, under the name graalpy3.13-community-${VERSION}" && echo
graalpy_arch="$(graalpy_architecture 2>/dev/null || true)"
case "$graalpy_arch" in
"linux-amd64" )
checksum="8b72e6e513d06976e5c8e051228d69d541fde76d05d5f907eaef4bb31db83af4"
;;
"linux-aarch64" )
checksum="1323dc064583efd1d6b696d3a9f9e4b1ff8facd0f7cc2b69fe0a0bf7ef06ea1a"
;;
"macos-aarch64" )
checksum="aacd819b5c3b6889b6a6275d8009ec1e8e3fe27cf7b77265710a1c9ea931bedd"
;;
* )
{ echo
colorize 1 "ERROR"
echo ": No binary distribution of GraalPy is available for $(uname -sm)."
echo
} >&2
exit 1
;;
esac
install_package "graalpy3.13-${VERSION}" "https://github.com/oracle/graalpython/releases/download/${RELEASE_TAG}/graalpy3.13-${VERSION}-${graalpy_arch}.tar.gz#${checksum}" "copy" ensurepip

View File

@ -0,0 +1,45 @@
# Copyright (c) 2026, Oracle and/or its affiliates. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including without limitation the rights to
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
# of the Software, and to permit persons to whom the Software is furnished to do
# so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
VERSION='25.4.4'
RELEASE_TAG='graal-25.4.4'
graalpy_arch="$(graalpy_architecture 2>/dev/null || true)"
case "$graalpy_arch" in
"linux-amd64" )
checksum="a038c8fa650f3bd17046f3cb8609b271e07b0e21fdb8527f10726beee442b93d"
;;
"linux-aarch64" )
checksum="5d0fab1a2f541b387dbf3fbf6b123a5836a0bc99937076f34aeb29282ee246c1"
;;
"macos-aarch64" )
checksum="dce08327e8ccb48423cc50f72a5137d4ff8c9da8ff7319525a69e2e68ac637cd"
;;
* )
{ echo
colorize 1 "ERROR"
echo ": No binary distribution of GraalPy is available for $(uname -sm)."
echo
} >&2
exit 1
;;
esac
install_package "graalpy3.13-community-${VERSION}" "https://github.com/oracle/graalpython/releases/download/${RELEASE_TAG}/graalpy3.13-community-${VERSION}-${graalpy_arch}.tar.gz#${checksum}" "copy" ensurepip

View File

@ -0,0 +1,27 @@
From 3fec519d6b326918f39ceb142ef762042ce8365f Mon Sep 17 00:00:00 2001
From: Ivan Pozdeev <vano@mail.mipt.ru>
Date: Fri, 26 Dec 2025 13:39:21 +0300
Subject: [PATCH] Recognize an argument to -j in MAKEFLAGS
---
setup.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/setup.py b/setup.py
index ad8fb81b218..5666deaf67b 100644
--- a/setup.py
+++ b/setup.py
@@ -307,8 +307,8 @@ def __init__(self, dist):
self.failed_on_import = []
self.missing = []
self.disabled_configure = []
- if '-j' in os.environ.get('MAKEFLAGS', ''):
- self.parallel = True
+ if (m:=re.search(r'(?:^|\s)(?:-j|--jobs)(?:\s+|=)?(\d*)',os.environ.get('MAKEFLAGS', ''))) is not None:
+ self.parallel = int(m.group(1)) if m.group(1) else True
def add(self, ext):
self.extensions.append(ext)
--
2.36.1.windows.1

View File

@ -0,0 +1,109 @@
From cf8eba395ddf888ce7d9e5e4a257209841aff6a4 Mon Sep 17 00:00:00 2001
From: Ned Deily <nad@python.org>
Date: Wed, 5 Aug 2026 10:30:17 +0300
Subject: [PATCH] (downstream) [3.10] gh-153711: Avoid use of dup3 and pipe2
calls introduced in macOS 27 (#155211)
---
...-08-05-02-02-33.gh-issue-153711.pO9fFb.rst | 3 +++
configure | 23 +++++++++++++++++--
configure.ac | 11 +++++++--
3 files changed, 33 insertions(+), 4 deletions(-)
create mode 100644 Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
diff --git a/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
new file mode 100644
index 00000000000..90804c179a4
--- /dev/null
+++ b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
@@ -0,0 +1,3 @@
+On macOS, do not attempt to use the :manpage:`dup3(2)` and
+:manpage:`pipe2(2)` system calls introduced in
+macOS 27 to prevent problems when running on older systems.
diff --git a/configure b/configure
index 4b71c4e00f8..bfe3e819fff 100755
--- a/configure
+++ b/configure
@@ -11952,7 +11952,7 @@ fi
# checks for library functions
for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
- clock confstr close_range copy_file_range ctermid dup3 execv explicit_bzero \
+ clock confstr close_range copy_file_range ctermid execv explicit_bzero \
explicit_memset faccessat fchmod fchmodat fchown fchownat \
fdwalk fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
futimens futimes gai_strerror getentropy \
@@ -11962,7 +11962,7 @@ for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
if_nameindex \
initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
memrchr mbrtowc mkdirat mkfifo \
- madvise mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
+ madvise mkfifoat mknod mknodat mktime mremap nice openat pathconf pause plock poll \
posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
pthread_condattr_setclock pthread_init pthread_kill pwrite pwritev pwritev2 \
readlink readlinkat readv realpath renameat \
@@ -12005,6 +12005,25 @@ done
fi
+# macOS introduced dup3 and pipe2 in macOS 27, late in the
+# lifetime of this version of Python. Rather than adding weaklinking
+# support for them, just continue to ignore them.
+if test "$ac_sys_system" != "Darwin"; then
+ ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3"
+if test "x$ac_cv_func_dup3" = xyes
+then :
+ printf '%s\n' "#define HAVE_DUP3 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
+if test "x$ac_cv_func_pipe2" = xyes
+then :
+ printf '%s\n' "#define HAVE_PIPE2 1" >>confdefs.h
+
+fi
+
+fi
+
ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
#include <dirent.h>
"
diff --git a/configure.ac b/configure.ac
index ac3be3850a9..0b88132edfb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3708,7 +3708,7 @@ fi
# checks for library functions
AC_CHECK_FUNCS(alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
- clock confstr close_range copy_file_range ctermid dup3 execv explicit_bzero \
+ clock confstr close_range copy_file_range ctermid execv explicit_bzero \
explicit_memset faccessat fchmod fchmodat fchown fchownat \
fdwalk fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
futimens futimes gai_strerror getentropy \
@@ -3718,7 +3718,7 @@ AC_CHECK_FUNCS(alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
if_nameindex \
initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
memrchr mbrtowc mkdirat mkfifo \
- madvise mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
+ madvise mkfifoat mknod mknodat mktime mremap nice openat pathconf pause plock poll \
posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
pthread_condattr_setclock pthread_init pthread_kill pwrite pwritev pwritev2 \
readlink readlinkat readv realpath renameat \
@@ -3740,6 +3740,13 @@ if test "$MACHDEP" != linux; then
AC_CHECK_FUNCS(lchmod)
fi
+# macOS introduced dup3 and pipe2 in macOS 27, late in the
+# lifetime of this version of Python. Rather than adding weaklinking
+# support for them, just continue to ignore them.
+if test "$ac_sys_system" != "Darwin"; then
+ AC_CHECK_FUNCS([dup3 pipe2])
+fi
+
AC_CHECK_DECL(dirfd,
AC_DEFINE(HAVE_DIRFD, 1,
Define if you have the 'dirfd' function or macro.), ,
--
2.55.0.windows.3

View File

@ -0,0 +1,27 @@
From 3fec519d6b326918f39ceb142ef762042ce8365f Mon Sep 17 00:00:00 2001
From: Ivan Pozdeev <vano@mail.mipt.ru>
Date: Fri, 26 Dec 2025 13:39:21 +0300
Subject: [PATCH] Recognize an argument to -j in MAKEFLAGS
---
setup.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/setup.py b/setup.py
index ad8fb81b218..5666deaf67b 100644
--- a/setup.py
+++ b/setup.py
@@ -307,8 +307,8 @@ def __init__(self, dist):
self.failed_on_import = []
self.missing = []
self.disabled_configure = []
- if '-j' in os.environ.get('MAKEFLAGS', ''):
- self.parallel = True
+ if (m:=re.search(r'(?:^|\s)(?:-j|--jobs)(?:\s+|=)?(\d*)',os.environ.get('MAKEFLAGS', ''))) is not None:
+ self.parallel = int(m.group(1)) if m.group(1) else True
def add(self, ext):
self.extensions.append(ext)
--
2.36.1.windows.1

View File

@ -0,0 +1,64 @@
From cc13eabc7ce08accf49656e258ba500f74a1dae8 Mon Sep 17 00:00:00 2001
From: Ronald Oussoren <ronaldoussoren@mac.com>
Date: Thu, 28 Dec 2023 09:42:05 +0100
Subject: [PATCH] gh-110459: Make sure --with-openssl-rpath works on macOS
(#113441)
* gh-110459: Make sure --with-openssl-rpath works on macOS
On macOS the `-rpath` linker flag is spelled differently
than on on platforms.
---
.../macOS/2023-12-23-22-41-07.gh-issue-110459.NaMBJy.rst | 2 ++
configure | 7 ++++++-
configure.ac | 7 ++++++-
3 files changed, 14 insertions(+), 2 deletions(-)
create mode 100644 Misc/NEWS.d/next/macOS/2023-12-23-22-41-07.gh-issue-110459.NaMBJy.rst
diff --git a/Misc/NEWS.d/next/macOS/2023-12-23-22-41-07.gh-issue-110459.NaMBJy.rst b/Misc/NEWS.d/next/macOS/2023-12-23-22-41-07.gh-issue-110459.NaMBJy.rst
new file mode 100644
index 00000000000..44ffd857785
--- /dev/null
+++ b/Misc/NEWS.d/next/macOS/2023-12-23-22-41-07.gh-issue-110459.NaMBJy.rst
@@ -0,0 +1,2 @@
+Running ``configure ... --with-openssl-rpath=X/Y/Z`` no longer fails to detect
+OpenSSL on macOS.
diff --git a/configure b/configure
index 7e50abc29d0..6d65d3abc18 100755
--- a/configure
+++ b/configure
@@ -27478,7 +27478,12 @@ then :
else $as_nop
- rpath_arg="-Wl,-rpath="
+ if test "$ac_sys_system" = "Darwin"
+ then
+ rpath_arg="-Wl,-rpath,"
+ else
+ rpath_arg="-Wl,-rpath="
+ fi
fi
diff --git a/configure.ac b/configure.ac
index e064848af9e..bfdabc4474e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6808,7 +6808,12 @@ AX_CHECK_OPENSSL([have_openssl=yes],[have_openssl=no])
AS_VAR_IF([GNULD], [yes], [
rpath_arg="-Wl,--enable-new-dtags,-rpath="
], [
- rpath_arg="-Wl,-rpath="
+ if test "$ac_sys_system" = "Darwin"
+ then
+ rpath_arg="-Wl,-rpath,"
+ else
+ rpath_arg="-Wl,-rpath="
+ fi
])
AC_MSG_CHECKING([for --with-openssl-rpath])
--
2.46.2.windows.1

View File

@ -0,0 +1,109 @@
From 29e98f7040994fa86bf63845b00ab9a4d80f5931 Mon Sep 17 00:00:00 2001
From: Ned Deily <nad@python.org>
Date: Wed, 5 Aug 2026 10:30:17 +0300
Subject: [PATCH] (downstream) [3.11] gh-153711: Avoid use of dup3 and pipe2
calls introduced in macOS 27 (#155211)
---
...-08-05-02-02-33.gh-issue-153711.pO9fFb.rst | 3 +++
configure | 23 +++++++++++++++++--
configure.ac | 11 +++++++--
3 files changed, 33 insertions(+), 4 deletions(-)
create mode 100644 Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
diff --git a/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
new file mode 100644
index 00000000000..90804c179a4
--- /dev/null
+++ b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
@@ -0,0 +1,3 @@
+On macOS, do not attempt to use the :manpage:`dup3(2)` and
+:manpage:`pipe2(2)` system calls introduced in
+macOS 27 to prevent problems when running on older systems.
diff --git a/configure b/configure
index a1ad0ae2510..76a3eec37be 100755
--- a/configure
+++ b/configure
@@ -15209,7 +15209,7 @@ fi
# checks for library functions
for ac_func in \
accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \
- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \
+ copy_file_range ctermid dup execv explicit_bzero explicit_memset \
faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \
fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \
gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \
@@ -15219,7 +15219,7 @@ for ac_func in \
getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \
lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \
mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \
- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \
+ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \
pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \
pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \
rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \
@@ -15262,6 +15262,25 @@ done
fi
+# macOS introduced dup3 and pipe2 in macOS 27, late in the
+# lifetime of this version of Python. Rather than adding weaklinking
+# support for them, just continue to ignore them.
+if test "$ac_sys_system" != "Darwin"; then
+ ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3"
+if test "x$ac_cv_func_dup3" = xyes
+then :
+ printf '%s\n' "#define HAVE_DUP3 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
+if test "x$ac_cv_func_pipe2" = xyes
+then :
+ printf '%s\n' "#define HAVE_PIPE2 1" >>confdefs.h
+
+fi
+
+fi
+
ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
#include <dirent.h>
"
diff --git a/configure.ac b/configure.ac
index 7b4000fa9c3..44167040f3e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4594,7 +4594,7 @@ fi
# checks for library functions
AC_CHECK_FUNCS([ \
accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \
- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \
+ copy_file_range ctermid dup execv explicit_bzero explicit_memset \
faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \
fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \
gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \
@@ -4604,7 +4604,7 @@ AC_CHECK_FUNCS([ \
getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \
lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \
mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \
- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \
+ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \
pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \
pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \
rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \
@@ -4626,6 +4626,13 @@ if test "$MACHDEP" != linux; then
AC_CHECK_FUNCS(lchmod)
fi
+# macOS introduced dup3 and pipe2 in macOS 27, late in the
+# lifetime of this version of Python. Rather than adding weaklinking
+# support for them, just continue to ignore them.
+if test "$ac_sys_system" != "Darwin"; then
+ AC_CHECK_FUNCS([dup3 pipe2])
+fi
+
AC_CHECK_DECL(dirfd,
AC_DEFINE(HAVE_DIRFD, 1,
Define if you have the 'dirfd' function or macro.), ,
--
2.55.0.windows.3

View File

@ -0,0 +1,119 @@
From ac12d63bf188f9497f8453c0447b9bc599acbf22 Mon Sep 17 00:00:00 2001
From: Ned Deily <nad@python.org>
Date: Wed, 5 Aug 2026 10:30:17 +0300
Subject: [PATCH] (downstream) [3.12] gh-153711: Avoid use of dup3 and pipe2
calls introduced in macOS 27 (#155211)
---
...-08-05-02-02-33.gh-issue-153711.pO9fFb.rst | 3 ++
configure | 33 +++++++++++--------
configure.ac | 11 +++++--
3 files changed, 32 insertions(+), 15 deletions(-)
create mode 100644 Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
diff --git a/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
new file mode 100644
index 00000000000..90804c179a4
--- /dev/null
+++ b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
@@ -0,0 +1,3 @@
+On macOS, do not attempt to use the :manpage:`dup3(2)` and
+:manpage:`pipe2(2)` system calls introduced in
+macOS 27 to prevent problems when running on older systems.
diff --git a/configure b/configure
index b6f90bcd8c7..b93aab935ce 100755
--- a/configure
+++ b/configure
@@ -17552,13 +17552,7 @@ fi
ac_fn_c_check_func "$LINENO" "dup" "ac_cv_func_dup"
if test "x$ac_cv_func_dup" = xyes
then :
- printf "%s\n" "#define HAVE_DUP 1" >>confdefs.h
-
-fi
-ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3"
-if test "x$ac_cv_func_dup3" = xyes
-then :
- printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h
+ printf '%s\n' "#define HAVE_DUP 1" >>confdefs.h
fi
ac_fn_c_check_func "$LINENO" "execv" "ac_cv_func_execv"
@@ -18028,12 +18022,6 @@ if test "x$ac_cv_func_pipe" = xyes
then :
printf "%s\n" "#define HAVE_PIPE 1" >>confdefs.h
-fi
-ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
-if test "x$ac_cv_func_pipe2" = xyes
-then :
- printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h
-
fi
ac_fn_c_check_func "$LINENO" "plock" "ac_cv_func_plock"
if test "x$ac_cv_func_plock" = xyes
@@ -18608,6 +18596,25 @@ fi
fi
+# macOS introduced dup3 and pipe2 in macOS 27, late in the
+# lifetime of this version of Python. Rather than adding weaklinking
+# support for them, just continue to ignore them.
+if test "$ac_sys_system" != "Darwin"; then
+ ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3"
+if test "x$ac_cv_func_dup3" = xyes
+then :
+ printf '%s\n' "#define HAVE_DUP3 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
+if test "x$ac_cv_func_pipe2" = xyes
+then :
+ printf '%s\n' "#define HAVE_PIPE2 1" >>confdefs.h
+
+fi
+
+fi
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
if test ${ac_cv_c_undeclared_builtin_options+y}
diff --git a/configure.ac b/configure.ac
index ba768aea930..92049fb2889 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4860,7 +4860,7 @@ fi
# checks for library functions
AC_CHECK_FUNCS([ \
accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \
- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \
+ copy_file_range ctermid dup execv explicit_bzero explicit_memset \
faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \
fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \
gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \
@@ -4870,7 +4870,7 @@ AC_CHECK_FUNCS([ \
getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \
lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \
mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \
- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \
+ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \
pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \
pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \
rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \
@@ -4892,6 +4892,13 @@ if test "$MACHDEP" != linux; then
AC_CHECK_FUNCS([lchmod])
fi
+# macOS introduced dup3 and pipe2 in macOS 27, late in the
+# lifetime of this version of Python. Rather than adding weaklinking
+# support for them, just continue to ignore them.
+if test "$ac_sys_system" != "Darwin"; then
+ AC_CHECK_FUNCS([dup3 pipe2])
+fi
+
AC_CHECK_DECL([dirfd],
[AC_DEFINE([HAVE_DIRFD], [1],
[Define if you have the 'dirfd' function or macro.])],
--
2.55.0.windows.3

View File

@ -0,0 +1 @@
3.14.8

View File

@ -1,5 +1,6 @@
VERSION='7.3.10' VERSION='7.3.10'
PYVER='2.7' PYVER='2.7'
MIN_OSX_VERSION='10.14'
# https://www.pypy.org/checksums.html # https://www.pypy.org/checksums.html
aarch64_hash=274342f0e75e99d60ba7a0cfb0e13792e7664163e01450d2f7f2f7825603a0ae aarch64_hash=274342f0e75e99d60ba7a0cfb0e13792e7664163e01450d2f7f2f7825603a0ae
@ -52,11 +53,11 @@ function pypy_pkg_data {
pkg='macos_arm64' pkg='macos_arm64'
;; ;;
'osx64' ) 'osx64' )
if require_osx_version "10.13"; then if require_osx_version "${MIN_OSX_VERSION}"; then
hash="${osx64_hash}" hash="${osx64_hash}"
pkg='macos_x86_64' pkg='macos_x86_64'
else else
err_no_binary "${ARCH}, OS X < 10.13" err_no_binary "${ARCH}, OS X < ${MIN_OSX_VERSION}"
fi fi
;; ;;
's390x' ) 's390x' )

View File

@ -1,5 +1,6 @@
VERSION='7.3.11' VERSION='7.3.11'
PYVER='2.7' PYVER='2.7'
MIN_OSX_VERSION='10.15'
# https://www.pypy.org/checksums.html # https://www.pypy.org/checksums.html
aarch64_hash=ea924da1defe9325ef760e288b04f984614e405580f5321eb6a5c8f539bd415a aarch64_hash=ea924da1defe9325ef760e288b04f984614e405580f5321eb6a5c8f539bd415a
@ -52,11 +53,11 @@ function pypy_pkg_data {
pkg='macos_arm64' pkg='macos_arm64'
;; ;;
'osx64' ) 'osx64' )
if require_osx_version "10.13"; then if require_osx_version "${MIN_OSX_VERSION}"; then
hash="${osx64_hash}" hash="${osx64_hash}"
pkg='macos_x86_64' pkg='macos_x86_64'
else else
err_no_binary "${ARCH}, OS X < 10.13" err_no_binary "${ARCH}, OS X < ${MIN_OSX_VERSION}"
fi fi
;; ;;
's390x' ) 's390x' )

View File

@ -1,5 +1,6 @@
VERSION='7.3.12' VERSION='7.3.12'
PYVER='2.7' PYVER='2.7'
MIN_OSX_VERSION='10.15'
# https://www.pypy.org/checksums.html # https://www.pypy.org/checksums.html
aarch64_hash=e04dcb6286a7b4724ec3f0e50d3cc1ba8583301dd1658c06d7f37599e4201c59 aarch64_hash=e04dcb6286a7b4724ec3f0e50d3cc1ba8583301dd1658c06d7f37599e4201c59
@ -52,11 +53,11 @@ function pypy_pkg_data {
pkg='macos_arm64' pkg='macos_arm64'
;; ;;
'osx64' ) 'osx64' )
if require_osx_version "10.13"; then if require_osx_version "${MIN_OSX_VERSION}"; then
hash="${osx64_hash}" hash="${osx64_hash}"
pkg='macos_x86_64' pkg='macos_x86_64'
else else
err_no_binary "${ARCH}, OS X < 10.13" err_no_binary "${ARCH}, OS X < ${MIN_OSX_VERSION}"
fi fi
;; ;;
's390x' ) 's390x' )

View File

@ -1,5 +1,6 @@
VERSION='7.3.13' VERSION='7.3.13'
PYVER='2.7' PYVER='2.7'
MIN_OSX_VERSION='10.15'
# https://www.pypy.org/checksums.html # https://www.pypy.org/checksums.html
aarch64_hash=f1e20f833cc86a097c1f1318069fc17d01c3988678c1438fe27ed567fcb5cfd0 aarch64_hash=f1e20f833cc86a097c1f1318069fc17d01c3988678c1438fe27ed567fcb5cfd0
@ -52,11 +53,11 @@ function pypy_pkg_data {
pkg='macos_arm64' pkg='macos_arm64'
;; ;;
'osx64' ) 'osx64' )
if require_osx_version "10.13"; then if require_osx_version "${MIN_OSX_VERSION}"; then
hash="${osx64_hash}" hash="${osx64_hash}"
pkg='macos_x86_64' pkg='macos_x86_64'
else else
err_no_binary "${ARCH}, OS X < 10.13" err_no_binary "${ARCH}, OS X < ${MIN_OSX_VERSION}"
fi fi
;; ;;
's390x' ) 's390x' )

View File

@ -1,5 +1,6 @@
VERSION='7.3.14' VERSION='7.3.14'
PYVER='2.7' PYVER='2.7'
MIN_OSX_VERSION='10.15'
# https://www.pypy.org/checksums.html # https://www.pypy.org/checksums.html
aarch64_hash=98468f4cc704a2821401afdd001ebddd367e594e05a70c7767fb86f1364fb21a aarch64_hash=98468f4cc704a2821401afdd001ebddd367e594e05a70c7767fb86f1364fb21a
@ -52,11 +53,11 @@ function pypy_pkg_data {
pkg='macos_arm64' pkg='macos_arm64'
;; ;;
'osx64' ) 'osx64' )
if require_osx_version "10.13"; then if require_osx_version "${MIN_OSX_VERSION}"; then
hash="${osx64_hash}" hash="${osx64_hash}"
pkg='macos_x86_64' pkg='macos_x86_64'
else else
err_no_binary "${ARCH}, OS X < 10.13" err_no_binary "${ARCH}, OS X < ${MIN_OSX_VERSION}"
fi fi
;; ;;
's390x' ) 's390x' )

View File

@ -1,5 +1,6 @@
VERSION='7.3.15' VERSION='7.3.15'
PYVER='2.7' PYVER='2.7'
MIN_OSX_VERSION='10.15'
# https://www.pypy.org/checksums.html # https://www.pypy.org/checksums.html
aarch64_hash=31b41fca7280636d7818713b7a0fab8f34ece9c82cc88e51d305d43b3e6306d6 aarch64_hash=31b41fca7280636d7818713b7a0fab8f34ece9c82cc88e51d305d43b3e6306d6
@ -52,11 +53,11 @@ function pypy_pkg_data {
pkg='macos_arm64' pkg='macos_arm64'
;; ;;
'osx64' ) 'osx64' )
if require_osx_version "10.13"; then if require_osx_version "${MIN_OSX_VERSION}"; then
hash="${osx64_hash}" hash="${osx64_hash}"
pkg='macos_x86_64' pkg='macos_x86_64'
else else
err_no_binary "${ARCH}, OS X < 10.13" err_no_binary "${ARCH}, OS X < ${MIN_OSX_VERSION}"
fi fi
;; ;;
's390x' ) 's390x' )

View File

@ -1,5 +1,6 @@
VERSION='7.3.16' VERSION='7.3.16'
PYVER='2.7' PYVER='2.7'
MIN_OSX_VERSION='10.15'
# https://www.pypy.org/checksums.html # https://www.pypy.org/checksums.html
aarch64_hash=be44e65dd8c00d2388b2580dbe2af6a5179f951a8f4979efc74360f92f3c7e96 aarch64_hash=be44e65dd8c00d2388b2580dbe2af6a5179f951a8f4979efc74360f92f3c7e96
@ -52,11 +53,11 @@ function pypy_pkg_data {
pkg='macos_arm64' pkg='macos_arm64'
;; ;;
'osx64' ) 'osx64' )
if require_osx_version "10.13"; then if require_osx_version "${MIN_OSX_VERSION}"; then
hash="${osx64_hash}" hash="${osx64_hash}"
pkg='macos_x86_64' pkg='macos_x86_64'
else else
err_no_binary "${ARCH}, OS X < 10.13" err_no_binary "${ARCH}, OS X < ${MIN_OSX_VERSION}"
fi fi
;; ;;
's390x' ) 's390x' )

View File

@ -1,5 +1,6 @@
VERSION='7.3.17' VERSION='7.3.17'
PYVER='2.7' PYVER='2.7'
MIN_OSX_VERSION='10.15'
# https://www.pypy.org/checksums.html # https://www.pypy.org/checksums.html
aarch64_hash=a8df5ce1650f4756933f8780870c91a0a40e7c9870d74629bf241392bcb5c2e3 aarch64_hash=a8df5ce1650f4756933f8780870c91a0a40e7c9870d74629bf241392bcb5c2e3
@ -51,11 +52,11 @@ function pypy_pkg_data {
pkg='macos_arm64' pkg='macos_arm64'
;; ;;
'osx64' ) 'osx64' )
if require_osx_version "10.13"; then if require_osx_version "${MIN_OSX_VERSION}"; then
hash="${osx64_hash}" hash="${osx64_hash}"
pkg='macos_x86_64' pkg='macos_x86_64'
else else
err_no_binary "${ARCH}, OS X < 10.13" err_no_binary "${ARCH}, OS X < ${MIN_OSX_VERSION}"
fi fi
;; ;;
* ) * )

View File

@ -1,5 +1,6 @@
VERSION='7.3.18' VERSION='7.3.18'
PYVER='2.7' PYVER='2.7'
MIN_OSX_VERSION='10.15'
# https://www.pypy.org/checksums.html # https://www.pypy.org/checksums.html
aarch64_hash=d647cad5be915df65f44277fd051c8d52e708d22838b5cb21b2de033530acc80 aarch64_hash=d647cad5be915df65f44277fd051c8d52e708d22838b5cb21b2de033530acc80
@ -51,11 +52,11 @@ function pypy_pkg_data {
pkg='macos_arm64' pkg='macos_arm64'
;; ;;
'osx64' ) 'osx64' )
if require_osx_version "10.13"; then if require_osx_version "${MIN_OSX_VERSION}"; then
hash="${osx64_hash}" hash="${osx64_hash}"
pkg='macos_x86_64' pkg='macos_x86_64'
else else
err_no_binary "${ARCH}, OS X < 10.13" err_no_binary "${ARCH}, OS X < ${MIN_OSX_VERSION}"
fi fi
;; ;;
* ) * )

View File

@ -1,5 +1,6 @@
VERSION='7.3.19' VERSION='7.3.19'
PYVER='2.7' PYVER='2.7'
MIN_OSX_VERSION='10.15'
# https://www.pypy.org/checksums.html # https://www.pypy.org/checksums.html
aarch64_hash=fe89d4fd4af13f76dfe7315975003518cf176520e3ccec1544a88d174f50910e aarch64_hash=fe89d4fd4af13f76dfe7315975003518cf176520e3ccec1544a88d174f50910e
@ -51,11 +52,11 @@ function pypy_pkg_data {
pkg='macos_arm64' pkg='macos_arm64'
;; ;;
'osx64' ) 'osx64' )
if require_osx_version "10.13"; then if require_osx_version "${MIN_OSX_VERSION}"; then
hash="${osx64_hash}" hash="${osx64_hash}"
pkg='macos_x86_64' pkg='macos_x86_64'
else else
err_no_binary "${ARCH}, OS X < 10.13" err_no_binary "${ARCH}, OS X < ${MIN_OSX_VERSION}"
fi fi
;; ;;
* ) * )

View File

@ -1,5 +1,6 @@
VERSION='7.3.20' VERSION='7.3.20'
PYVER='2.7' PYVER='2.7'
MIN_OSX_VERSION='10.15'
# https://www.pypy.org/checksums.html # https://www.pypy.org/checksums.html
aarch64_hash=f22a1be607deeaa4f9be6bc63aae09fe4fb5b990d6a23aa4e7c5960dc5d93c96 aarch64_hash=f22a1be607deeaa4f9be6bc63aae09fe4fb5b990d6a23aa4e7c5960dc5d93c96
@ -51,11 +52,11 @@ function pypy_pkg_data {
pkg='macos_arm64' pkg='macos_arm64'
;; ;;
'osx64' ) 'osx64' )
if require_osx_version "10.13"; then if require_osx_version "${MIN_OSX_VERSION}"; then
hash="${osx64_hash}" hash="${osx64_hash}"
pkg='macos_x86_64' pkg='macos_x86_64'
else else
err_no_binary "${ARCH}, OS X < 10.13" err_no_binary "${ARCH}, OS X < ${MIN_OSX_VERSION}"
fi fi
;; ;;
* ) * )

View File

@ -0,0 +1,78 @@
VERSION='7.3.21'
PYVER='2.7'
MIN_OSX_VERSION='10.15'
# https://www.pypy.org/checksums.html
aarch64_hash=8aaed1e612e6874235ee9d5bd545a8dcc7b86c867d305351df37969390b0c47b
linux32_hash=14cb624e60b3012b4e5605571ab1477cea732a04e1c1385cc492d99f427a477f
linux64_hash=d560f4043180b0df5826396af17d060bd731e4fee34755167040924ece876f3e
osarm64_hash=7f69e5241ba7d10015e12d5b6dc1bb65458fcdc118385eee1ae0dde4e7f75776
osx64_hash=e73061b21fc56f16a4fa7a4a24ffe0304c3df95b249852ea56e5b39110abdd70
### 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 "${MIN_OSX_VERSION}"; then
hash="${osx64_hash}"
pkg='macos_x86_64'
else
err_no_binary "${ARCH}, OS X < ${MIN_OSX_VERSION}"
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,14 @@
VERSION='7.3.21'
PYVER='2.7'
# https://www.pypy.org/checksums.html
hash=23537c62e875ad1a3e675c64d4435eff392ea20843e20d690fd1400b79363d64
### end of manual settings - following lines same for every download
ver="pypy${PYVER}-v${VERSION}-src"
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_lt21'

View File

@ -1,5 +1,6 @@
VERSION='7.3.22' VERSION='7.3.22'
PYVER='2.7' PYVER='2.7'
MIN_OSX_VERSION='10.15'
# https://www.pypy.org/checksums.html # https://www.pypy.org/checksums.html
aarch64_hash=49829ef97a36d50870b0a4a7d6d67c4817d98a0bbd936e7a86ac6ef615b07205 aarch64_hash=49829ef97a36d50870b0a4a7d6d67c4817d98a0bbd936e7a86ac6ef615b07205
@ -51,11 +52,11 @@ function pypy_pkg_data {
pkg='macos_arm64' pkg='macos_arm64'
;; ;;
'osx64' ) 'osx64' )
if require_osx_version "10.13"; then if require_osx_version "${MIN_OSX_VERSION}"; then
hash="${osx64_hash}" hash="${osx64_hash}"
pkg='macos_x86_64' pkg='macos_x86_64'
else else
err_no_binary "${ARCH}, OS X < 10.13" err_no_binary "${ARCH}, OS X < ${MIN_OSX_VERSION}"
fi fi
;; ;;
* ) * )

View File

@ -0,0 +1,78 @@
VERSION='7.3.23'
PYVER='2.7'
MIN_OSX_VERSION='10.15'
# https://www.pypy.org/checksums.html
aarch64_hash=b0bec20c16b6ab2bd46bd4f5d6049b6070a22a53eaed437ee9ac36d842ceda74
linux32_hash=fa6499281775ec22f4742e9dd7b31c22b8fc6a700c1cf50aebc7ef24f61461c5
linux64_hash=7833be48244a6f4aa0720c6b98f151428291a52697da849ef6b3ca7d5bf45b96
osarm64_hash=f83d8fce9695f598dc55187c0f6c06c367dbf76d288d2bca7dbf040e4be15f37
osx64_hash=edbddb678c00f29c2361dbe6c6ea634f5d62e6854a775a9209c6b789bb0dc00b
### 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 "${MIN_OSX_VERSION}"; then
hash="${osx64_hash}"
pkg='macos_x86_64'
else
err_no_binary "${ARCH}, OS X < ${MIN_OSX_VERSION}"
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,14 @@
VERSION='7.3.23'
PYVER='2.7'
# https://www.pypy.org/checksums.html
hash=7aa8eaf414d25f916fe426365404759c56aa28aea6190e65967c4a45f64dc899
### end of manual settings - following lines same for every download
ver="pypy${PYVER}-v${VERSION}-src"
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_lt21'

View File

@ -1,8 +1,9 @@
VERSION='7.3.8' VERSION='7.3.8'
PYVER='2.7' PYVER='2.7'
MIN_OSX_VERSION='10.14'
# https://www.pypy.org/checksums.html # https://www.pypy.org/checksums.html
aarch64_hash=ca1f8d3146c83002ee97615906b0930e821297dcce3063b5b28933a0690ef298 aarch64_hash=b5edfc995d83feea8b4c8aeffccb89753b4b182f076126550bd07cc35faa6208
linux32_hash=7c84f173bbcd73d0eb10909259d11b5cc253d4c6ea4492e6da8f2532df9b3da5 linux32_hash=7c84f173bbcd73d0eb10909259d11b5cc253d4c6ea4492e6da8f2532df9b3da5
linux64_hash=1f2e84fb539ffce233c34769d2f11647955f894be091e85419e05f48011e8940 linux64_hash=1f2e84fb539ffce233c34769d2f11647955f894be091e85419e05f48011e8940
osx64_hash=e5c1ff39ad9916ea23e3deb8012fe42367b6b19284cf13b1a1ea2b2f53a43add osx64_hash=e5c1ff39ad9916ea23e3deb8012fe42367b6b19284cf13b1a1ea2b2f53a43add
@ -28,7 +29,7 @@ function pypy_pkg_data {
case "${pkg}" in case "${pkg}" in
'linux-aarch64' ) 'linux-aarch64' )
hash="${aarch64_hash}" hash="${aarch64_hash}"
url="${baseurl}-aarch64.tar.bz2" # diff url url="${baseurl}-aarch64-portable.tar.bz2" # diff url
;; ;;
'linux' ) 'linux' )
hash="${linux32_hash}" hash="${linux32_hash}"
@ -39,12 +40,12 @@ function pypy_pkg_data {
hash="${linux64_hash}" hash="${linux64_hash}"
;; ;;
'osx64' ) 'osx64' )
if require_osx_version "10.13"; then if require_osx_version "${MIN_OSX_VERSION}"; then
hash="${osx64_hash}" hash="${osx64_hash}"
else else
{ echo { echo
colorize 1 "ERROR" colorize 1 "ERROR"
echo ": The binary distribution of PyPy is not available for $(pypy_architecture 2>/dev/null || true), OS X < 10.13." echo ": The binary distribution of PyPy is not available for $(pypy_architecture 2>/dev/null || true), OS X < ${MIN_OSX_VERSION}."
echo "try '${basesrc}' to build from source." echo "try '${basesrc}' to build from source."
echo echo
} >&2 } >&2

View File

@ -1,5 +1,6 @@
VERSION='7.3.9' VERSION='7.3.9'
PYVER='2.7' PYVER='2.7'
MIN_OSX_VERSION='10.14'
# https://www.pypy.org/checksums.html # https://www.pypy.org/checksums.html
aarch64_hash=aff4e4dbab53448f662cd01acb2251571d60f836d2f48382a7d8da54ca5b3442 aarch64_hash=aff4e4dbab53448f662cd01acb2251571d60f836d2f48382a7d8da54ca5b3442
@ -48,10 +49,10 @@ function pypy_pkg_data {
hash="${linux64_hash}" hash="${linux64_hash}"
;; ;;
'osx64' ) 'osx64' )
if require_osx_version "10.13"; then if require_osx_version "${MIN_OSX_VERSION}"; then
hash="${osx64_hash}" hash="${osx64_hash}"
else else
err_no_binary "${ARCH}, OS X < 10.13" err_no_binary "${ARCH}, OS X < ${MIN_OSX_VERSION}"
fi fi
;; ;;
's390x' ) 's390x' )

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

@ -1,5 +1,6 @@
VERSION='7.3.12' VERSION='7.3.12'
PYVER='3.10' PYVER='3.10'
MIN_OSX_VERSION='10.15'
# https://www.pypy.org/checksums.html # https://www.pypy.org/checksums.html
aarch64_hash=26208b5a134d9860a08f74cce60960005758e82dc5f0e3566a48ed863a1f16a1 aarch64_hash=26208b5a134d9860a08f74cce60960005758e82dc5f0e3566a48ed863a1f16a1
@ -52,11 +53,11 @@ function pypy_pkg_data {
pkg='macos_arm64' pkg='macos_arm64'
;; ;;
'osx64' ) 'osx64' )
if require_osx_version "10.13"; then if require_osx_version "${MIN_OSX_VERSION}"; then
hash="${osx64_hash}" hash="${osx64_hash}"
pkg='macos_x86_64' pkg='macos_x86_64'
else else
err_no_binary "${ARCH}, OS X < 10.13" err_no_binary "${ARCH}, OS X < ${MIN_OSX_VERSION}"
fi fi
;; ;;
's390x' ) 's390x' )

View File

@ -1,5 +1,6 @@
VERSION='7.3.13' VERSION='7.3.13'
PYVER='3.10' PYVER='3.10'
MIN_OSX_VERSION='10.15'
# https://www.pypy.org/checksums.html # https://www.pypy.org/checksums.html
aarch64_hash=ac476f01c9653358404f2e4b52f62307b2f64ccdb8c96dadcbfe355824d81a63 aarch64_hash=ac476f01c9653358404f2e4b52f62307b2f64ccdb8c96dadcbfe355824d81a63
@ -52,11 +53,11 @@ function pypy_pkg_data {
pkg='macos_arm64' pkg='macos_arm64'
;; ;;
'osx64' ) 'osx64' )
if require_osx_version "10.13"; then if require_osx_version "${MIN_OSX_VERSION}"; then
hash="${osx64_hash}" hash="${osx64_hash}"
pkg='macos_x86_64' pkg='macos_x86_64'
else else
err_no_binary "${ARCH}, OS X < 10.13" err_no_binary "${ARCH}, OS X < ${MIN_OSX_VERSION}"
fi fi
;; ;;
's390x' ) 's390x' )

View File

@ -1,5 +1,6 @@
VERSION='7.3.14' VERSION='7.3.14'
PYVER='3.10' PYVER='3.10'
MIN_OSX_VERSION='10.15'
# https://www.pypy.org/checksums.html # https://www.pypy.org/checksums.html
aarch64_hash=fbef65dfc69dcd6006d843553d268b331f1b13dfc3938492bd35f0f477b5bcf4 aarch64_hash=fbef65dfc69dcd6006d843553d268b331f1b13dfc3938492bd35f0f477b5bcf4
@ -52,11 +53,11 @@ function pypy_pkg_data {
pkg='macos_arm64' pkg='macos_arm64'
;; ;;
'osx64' ) 'osx64' )
if require_osx_version "10.13"; then if require_osx_version "${MIN_OSX_VERSION}"; then
hash="${osx64_hash}" hash="${osx64_hash}"
pkg='macos_x86_64' pkg='macos_x86_64'
else else
err_no_binary "${ARCH}, OS X < 10.13" err_no_binary "${ARCH}, OS X < ${MIN_OSX_VERSION}"
fi fi
;; ;;
's390x' ) 's390x' )

View File

@ -1,5 +1,6 @@
VERSION='7.3.15' VERSION='7.3.15'
PYVER='3.10' PYVER='3.10'
MIN_OSX_VERSION='10.15'
# https://www.pypy.org/checksums.html # https://www.pypy.org/checksums.html
aarch64_hash=52146fccaf64e87e71d178dda8de63c01577ec3923073dc69e1519622bcacb74 aarch64_hash=52146fccaf64e87e71d178dda8de63c01577ec3923073dc69e1519622bcacb74
@ -52,11 +53,11 @@ function pypy_pkg_data {
pkg='macos_arm64' pkg='macos_arm64'
;; ;;
'osx64' ) 'osx64' )
if require_osx_version "10.13"; then if require_osx_version "${MIN_OSX_VERSION}"; then
hash="${osx64_hash}" hash="${osx64_hash}"
pkg='macos_x86_64' pkg='macos_x86_64'
else else
err_no_binary "${ARCH}, OS X < 10.13" err_no_binary "${ARCH}, OS X < ${MIN_OSX_VERSION}"
fi fi
;; ;;
's390x' ) 's390x' )

View File

@ -1,5 +1,6 @@
VERSION='7.3.16' VERSION='7.3.16'
PYVER='3.10' PYVER='3.10'
MIN_OSX_VERSION='10.15'
# https://www.pypy.org/checksums.html # https://www.pypy.org/checksums.html
aarch64_hash=fc720999bc5050e1d3706b3b6445e695cf42bfc71ebc7c88ed6bb88828b1d385 aarch64_hash=fc720999bc5050e1d3706b3b6445e695cf42bfc71ebc7c88ed6bb88828b1d385
@ -52,11 +53,11 @@ function pypy_pkg_data {
pkg='macos_arm64' pkg='macos_arm64'
;; ;;
'osx64' ) 'osx64' )
if require_osx_version "10.13"; then if require_osx_version "${MIN_OSX_VERSION}"; then
hash="${osx64_hash}" hash="${osx64_hash}"
pkg='macos_x86_64' pkg='macos_x86_64'
else else
err_no_binary "${ARCH}, OS X < 10.13" err_no_binary "${ARCH}, OS X < ${MIN_OSX_VERSION}"
fi fi
;; ;;
's390x' ) 's390x' )

View File

@ -1,5 +1,6 @@
VERSION='7.3.17' VERSION='7.3.17'
PYVER='3.10' PYVER='3.10'
MIN_OSX_VERSION='10.15'
# https://www.pypy.org/checksums.html # https://www.pypy.org/checksums.html
aarch64_hash=53b6e5907df869c49e4eae7aca09fba16d150741097efb245892c1477d2395f2 aarch64_hash=53b6e5907df869c49e4eae7aca09fba16d150741097efb245892c1477d2395f2
@ -51,11 +52,11 @@ function pypy_pkg_data {
pkg='macos_arm64' pkg='macos_arm64'
;; ;;
'osx64' ) 'osx64' )
if require_osx_version "10.13"; then if require_osx_version "${MIN_OSX_VERSION}"; then
hash="${osx64_hash}" hash="${osx64_hash}"
pkg='macos_x86_64' pkg='macos_x86_64'
else else
err_no_binary "${ARCH}, OS X < 10.13" err_no_binary "${ARCH}, OS X < ${MIN_OSX_VERSION}"
fi fi
;; ;;
* ) * )

View File

@ -1,5 +1,6 @@
VERSION='7.3.18' VERSION='7.3.18'
PYVER='3.10' PYVER='3.10'
MIN_OSX_VERSION='10.15'
# https://www.pypy.org/checksums.html # https://www.pypy.org/checksums.html
aarch64_hash=e843aecd48eb06b625af67891b99e3440313cfb64c6851fc37df1e5572c8ef9e aarch64_hash=e843aecd48eb06b625af67891b99e3440313cfb64c6851fc37df1e5572c8ef9e
@ -51,11 +52,11 @@ function pypy_pkg_data {
pkg='macos_arm64' pkg='macos_arm64'
;; ;;
'osx64' ) 'osx64' )
if require_osx_version "10.13"; then if require_osx_version "${MIN_OSX_VERSION}"; then
hash="${osx64_hash}" hash="${osx64_hash}"
pkg='macos_x86_64' pkg='macos_x86_64'
else else
err_no_binary "${ARCH}, OS X < 10.13" err_no_binary "${ARCH}, OS X < ${MIN_OSX_VERSION}"
fi fi
;; ;;
* ) * )

View File

@ -1,5 +1,6 @@
VERSION='7.3.19' VERSION='7.3.19'
PYVER='3.10' PYVER='3.10'
MIN_OSX_VERSION='10.15'
# https://www.pypy.org/checksums.html # https://www.pypy.org/checksums.html
aarch64_hash=af27a589178f11198e2244ab65ca510630ba97c131d7ccc4021eb5bc58de7f57 aarch64_hash=af27a589178f11198e2244ab65ca510630ba97c131d7ccc4021eb5bc58de7f57
@ -51,11 +52,11 @@ function pypy_pkg_data {
pkg='macos_arm64' pkg='macos_arm64'
;; ;;
'osx64' ) 'osx64' )
if require_osx_version "10.13"; then if require_osx_version "${MIN_OSX_VERSION}"; then
hash="${osx64_hash}" hash="${osx64_hash}"
pkg='macos_x86_64' pkg='macos_x86_64'
else else
err_no_binary "${ARCH}, OS X < 10.13" err_no_binary "${ARCH}, OS X < ${MIN_OSX_VERSION}"
fi fi
;; ;;
* ) * )

View File

@ -1,5 +1,6 @@
VERSION='7.3.18' VERSION='7.3.18'
PYVER='3.11' PYVER='3.11'
MIN_OSX_VERSION='10.15'
# https://www.pypy.org/checksums.html # https://www.pypy.org/checksums.html
aarch64_hash=95bc3021cb9be2aa766ecb776c215e97ae8c0dda99dd48840b40b5b87d90bc45 aarch64_hash=95bc3021cb9be2aa766ecb776c215e97ae8c0dda99dd48840b40b5b87d90bc45
@ -51,11 +52,11 @@ function pypy_pkg_data {
pkg='macos_arm64' pkg='macos_arm64'
;; ;;
'osx64' ) 'osx64' )
if require_osx_version "10.13"; then if require_osx_version "${MIN_OSX_VERSION}"; then
hash="${osx64_hash}" hash="${osx64_hash}"
pkg='macos_x86_64' pkg='macos_x86_64'
else else
err_no_binary "${ARCH}, OS X < 10.13" err_no_binary "${ARCH}, OS X < ${MIN_OSX_VERSION}"
fi fi
;; ;;
* ) * )

View File

@ -1,5 +1,6 @@
VERSION='7.3.19' VERSION='7.3.19'
PYVER='3.11' PYVER='3.11'
MIN_OSX_VERSION='10.15'
# https://www.pypy.org/checksums.html # https://www.pypy.org/checksums.html
aarch64_hash=13207dbf81ce24e96da760b1b863627b77bb20b1fb4c95191e02a0b72383df74 aarch64_hash=13207dbf81ce24e96da760b1b863627b77bb20b1fb4c95191e02a0b72383df74
@ -51,11 +52,11 @@ function pypy_pkg_data {
pkg='macos_arm64' pkg='macos_arm64'
;; ;;
'osx64' ) 'osx64' )
if require_osx_version "10.13"; then if require_osx_version "${MIN_OSX_VERSION}"; then
hash="${osx64_hash}" hash="${osx64_hash}"
pkg='macos_x86_64' pkg='macos_x86_64'
else else
err_no_binary "${ARCH}, OS X < 10.13" err_no_binary "${ARCH}, OS X < ${MIN_OSX_VERSION}"
fi fi
;; ;;
* ) * )

View File

@ -1,5 +1,6 @@
VERSION='7.3.20' VERSION='7.3.20'
PYVER='3.11' PYVER='3.11'
MIN_OSX_VERSION='10.15'
# https://www.pypy.org/checksums.html # https://www.pypy.org/checksums.html
aarch64_hash=9347fe691a07fd9df17a1b186554fb9d9e6210178ffef19520a579ce1f9eb741 aarch64_hash=9347fe691a07fd9df17a1b186554fb9d9e6210178ffef19520a579ce1f9eb741
@ -51,11 +52,11 @@ function pypy_pkg_data {
pkg='macos_arm64' pkg='macos_arm64'
;; ;;
'osx64' ) 'osx64' )
if require_osx_version "10.13"; then if require_osx_version "${MIN_OSX_VERSION}"; then
hash="${osx64_hash}" hash="${osx64_hash}"
pkg='macos_x86_64' pkg='macos_x86_64'
else else
err_no_binary "${ARCH}, OS X < 10.13" err_no_binary "${ARCH}, OS X < ${MIN_OSX_VERSION}"
fi fi
;; ;;
* ) * )

View File

@ -0,0 +1,78 @@
VERSION='7.3.21'
PYVER='3.11'
MIN_OSX_VERSION='10.15'
# https://www.pypy.org/checksums.html
aarch64_hash=6141f5c64dd96faf87e0a3f7f362521eadd26d5e3f851f90fc386a72208f8c18
linux32_hash=0c449ff3f20589e331f163807a0200a9bf5dd375c95f513a0f60bf7524795f02
linux64_hash=43f27af8ee6673932493f2696ab407321cbf79dbed94c03d8b39e603f8f5f765
osarm64_hash=a43f97ff9f6016aac09ee75eb626d806e8ad865608e7d8bc4d3c2fc37c2b4799
osx64_hash=60dfb37dda85d548cd6a4d7bdb12ff26e19162042001b741fd9b6a8ecee802a6
### 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 "${MIN_OSX_VERSION}"; then
hash="${osx64_hash}"
pkg='macos_x86_64'
else
err_no_binary "${ARCH}, OS X < ${MIN_OSX_VERSION}"
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,14 @@
VERSION='7.3.21'
PYVER='3.11'
# https://www.pypy.org/checksums.html
hash=e7c9d8236ef279dba51abb9e691401a6c805bbe3250c6842dc9bac98f8de688a
### end of manual settings - following lines same for every download
ver="pypy${PYVER}-v${VERSION}-src"
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'

View File

@ -1,5 +1,6 @@
VERSION='7.3.22' VERSION='7.3.22'
PYVER='3.11' PYVER='3.11'
MIN_OSX_VERSION='10.15'
# https://www.pypy.org/checksums.html # https://www.pypy.org/checksums.html
aarch64_hash=c29a8933e2084f52df74c829aa0d8f5652b9d5919f68e9fb89cab3afe35dd884 aarch64_hash=c29a8933e2084f52df74c829aa0d8f5652b9d5919f68e9fb89cab3afe35dd884
@ -51,11 +52,11 @@ function pypy_pkg_data {
pkg='macos_arm64' pkg='macos_arm64'
;; ;;
'osx64' ) 'osx64' )
if require_osx_version "10.13"; then if require_osx_version "${MIN_OSX_VERSION}"; then
hash="${osx64_hash}" hash="${osx64_hash}"
pkg='macos_x86_64' pkg='macos_x86_64'
else else
err_no_binary "${ARCH}, OS X < 10.13" err_no_binary "${ARCH}, OS X < ${MIN_OSX_VERSION}"
fi fi
;; ;;
* ) * )

View File

@ -0,0 +1,78 @@
VERSION='7.3.23'
PYVER='3.11'
MIN_OSX_VERSION='10.15'
# https://www.pypy.org/checksums.html
aarch64_hash=5433ac0ad526aeb35025ef8509bed65cd62ea35cb9e21ac649c69a5eff4eecb6
linux32_hash=c7e2ffb173dcadbe4708a2e606e0b705474c1c33f25a09a4084f265d538172e4
linux64_hash=16f9f56e82d1f4ec95a324c1a8cacfd78afc7f0656c0a809a18725ef4391453a
osarm64_hash=4747b3aceba4c1c6104cddc0fe5ea302101d32955f0957347b9ecc4fbd7aed05
osx64_hash=c95363c4e87235d11a6cec8128239c291b1eb67a752778fbcfe029a71da82b5e
### 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 "${MIN_OSX_VERSION}"; then
hash="${osx64_hash}"
pkg='macos_x86_64'
else
err_no_binary "${ARCH}, OS X < ${MIN_OSX_VERSION}"
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,14 @@
VERSION='7.3.23'
PYVER='3.11'
# https://www.pypy.org/checksums.html
hash=f15c9c41e03f3f7ecc25228c6c67427b8918f21ef2d694215994b1fade20f69b
### end of manual settings - following lines same for every download
ver="pypy${PYVER}-v${VERSION}-src"
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'

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'

View File

@ -1,8 +1,9 @@
VERSION='7.3.8' VERSION='7.3.8'
PYVER='3.7' PYVER='3.7'
MIN_OSX_VERSION='10.14'
# https://www.pypy.org/checksums.html # https://www.pypy.org/checksums.html
aarch64_hash=4fb2f8281f3aaca72e6fe62ecc5fc054fcc79cd061ca3e0eea730f7d82d610d4 aarch64_hash=639c76f128a856747aee23a34276fa101a7a157ea81e76394fbaf80b97dcf2f2
linux32_hash=38429ec6ea1aca391821ee4fbda7358ae86de4600146643f2af2fe2c085af839 linux32_hash=38429ec6ea1aca391821ee4fbda7358ae86de4600146643f2af2fe2c085af839
linux64_hash=409085db79a6d90bfcf4f576dca1538498e65937acfbe03bd4909bdc262ff378 linux64_hash=409085db79a6d90bfcf4f576dca1538498e65937acfbe03bd4909bdc262ff378
osx64_hash=76b8eef5b059a7e478f525615482d2a6e9feb83375e3f63c16381d80521a693f osx64_hash=76b8eef5b059a7e478f525615482d2a6e9feb83375e3f63c16381d80521a693f
@ -28,7 +29,7 @@ function pypy_pkg_data {
case "${pkg}" in case "${pkg}" in
'linux-aarch64' ) 'linux-aarch64' )
hash="${aarch64_hash}" hash="${aarch64_hash}"
url="${baseurl}-aarch64.tar.bz2" # diff url url="${baseurl}-aarch64-portable.tar.bz2" # diff url
;; ;;
'linux' ) 'linux' )
hash="${linux32_hash}" hash="${linux32_hash}"
@ -39,12 +40,12 @@ function pypy_pkg_data {
hash="${linux64_hash}" hash="${linux64_hash}"
;; ;;
'osx64' ) 'osx64' )
if require_osx_version "10.13"; then if require_osx_version "${MIN_OSX_VERSION}"; then
hash="${osx64_hash}" hash="${osx64_hash}"
else else
{ echo { echo
colorize 1 "ERROR" colorize 1 "ERROR"
echo ": The binary distribution of PyPy is not available for $(pypy_architecture 2>/dev/null || true), OS X < 10.13." echo ": The binary distribution of PyPy is not available for $(pypy_architecture 2>/dev/null || true), OS X < ${MIN_OSX_VERSION}."
echo "try '${basesrc}' to build from source." echo "try '${basesrc}' to build from source."
echo echo
} >&2 } >&2

View File

@ -1,5 +1,6 @@
VERSION='7.3.9' VERSION='7.3.9'
PYVER='3.7' PYVER='3.7'
MIN_OSX_VERSION='10.14'
# https://www.pypy.org/checksums.html # https://www.pypy.org/checksums.html
aarch64_hash=dfc62f2c453fb851d10a1879c6e75c31ffebbf2a44d181bb06fcac4750d023fc aarch64_hash=dfc62f2c453fb851d10a1879c6e75c31ffebbf2a44d181bb06fcac4750d023fc
@ -48,10 +49,10 @@ function pypy_pkg_data {
hash="${linux64_hash}" hash="${linux64_hash}"
;; ;;
'osx64' ) 'osx64' )
if require_osx_version "10.13"; then if require_osx_version "${MIN_OSX_VERSION}"; then
hash="${osx64_hash}" hash="${osx64_hash}"
else else
err_no_binary "${ARCH}, OS X < 10.13" err_no_binary "${ARCH}, OS X < ${MIN_OSX_VERSION}"
fi fi
;; ;;
's390x' ) 's390x' )

View File

@ -1,5 +1,6 @@
VERSION='7.3.10' VERSION='7.3.10'
PYVER='3.8' PYVER='3.8'
MIN_OSX_VERSION='10.14'
# https://www.pypy.org/checksums.html # https://www.pypy.org/checksums.html
aarch64_hash=e4caa1a545f22cfee87d5b9aa6f8852347f223643ad7d2562e0b2a2f4663ad98 aarch64_hash=e4caa1a545f22cfee87d5b9aa6f8852347f223643ad7d2562e0b2a2f4663ad98
@ -52,11 +53,11 @@ function pypy_pkg_data {
pkg='macos_arm64' pkg='macos_arm64'
;; ;;
'osx64' ) 'osx64' )
if require_osx_version "10.13"; then if require_osx_version "${MIN_OSX_VERSION}"; then
hash="${osx64_hash}" hash="${osx64_hash}"
pkg='macos_x86_64' pkg='macos_x86_64'
else else
err_no_binary "${ARCH}, OS X < 10.13" err_no_binary "${ARCH}, OS X < ${MIN_OSX_VERSION}"
fi fi
;; ;;
's390x' ) 's390x' )

View File

@ -1,5 +1,6 @@
VERSION='7.3.11' VERSION='7.3.11'
PYVER='3.8' PYVER='3.8'
MIN_OSX_VERSION='10.15'
# https://www.pypy.org/checksums.html # https://www.pypy.org/checksums.html
aarch64_hash=9a2fa0b8d92b7830aa31774a9a76129b0ff81afbd22cd5c41fbdd9119e859f55 aarch64_hash=9a2fa0b8d92b7830aa31774a9a76129b0ff81afbd22cd5c41fbdd9119e859f55
@ -52,11 +53,11 @@ function pypy_pkg_data {
pkg='macos_arm64' pkg='macos_arm64'
;; ;;
'osx64' ) 'osx64' )
if require_osx_version "10.13"; then if require_osx_version "${MIN_OSX_VERSION}"; then
hash="${osx64_hash}" hash="${osx64_hash}"
pkg='macos_x86_64' pkg='macos_x86_64'
else else
err_no_binary "${ARCH}, OS X < 10.13" err_no_binary "${ARCH}, OS X < ${MIN_OSX_VERSION}"
fi fi
;; ;;
's390x' ) 's390x' )

View File

@ -1,8 +1,9 @@
VERSION='7.3.8' VERSION='7.3.8'
PYVER='3.8' PYVER='3.8'
MIN_OSX_VERSION='10.14'
# https://www.pypy.org/checksums.html # https://www.pypy.org/checksums.html
aarch64_hash=fe41df391f87239925e573e195e631a9d03d37f471eb1479790ee13ca47a28af aarch64_hash=0210536e9f1841ba283c13b04783394050837bb3e6f4091c9f1bd9c7f2b94b55
linux32_hash=bea4b275decd492af6462157d293dd6fcf08a949859f8aec0959537b40afd032 linux32_hash=bea4b275decd492af6462157d293dd6fcf08a949859f8aec0959537b40afd032
linux64_hash=089f8e3e357d6130815964ddd3507c13bd53e4976ccf0a89b5c36a9a6775a188 linux64_hash=089f8e3e357d6130815964ddd3507c13bd53e4976ccf0a89b5c36a9a6775a188
osx64_hash=de1b283ff112d76395c0162a1cf11528e192bdc230ee3f1b237f7694c7518dee osx64_hash=de1b283ff112d76395c0162a1cf11528e192bdc230ee3f1b237f7694c7518dee
@ -28,7 +29,7 @@ function pypy_pkg_data {
case "${pkg}" in case "${pkg}" in
'linux-aarch64' ) 'linux-aarch64' )
hash="${aarch64_hash}" hash="${aarch64_hash}"
url="${baseurl}-aarch64.tar.bz2" # diff url url="${baseurl}-aarch64-portable.tar.bz2" # diff url
;; ;;
'linux' ) 'linux' )
hash="${linux32_hash}" hash="${linux32_hash}"
@ -39,12 +40,12 @@ function pypy_pkg_data {
hash="${linux64_hash}" hash="${linux64_hash}"
;; ;;
'osx64' ) 'osx64' )
if require_osx_version "10.13"; then if require_osx_version "${MIN_OSX_VERSION}"; then
hash="${osx64_hash}" hash="${osx64_hash}"
else else
{ echo { echo
colorize 1 "ERROR" colorize 1 "ERROR"
echo ": The binary distribution of PyPy is not available for $(pypy_architecture 2>/dev/null || true), OS X < 10.13." echo ": The binary distribution of PyPy is not available for $(pypy_architecture 2>/dev/null || true), OS X < ${MIN_OSX_VERSION}."
echo "try '${basesrc}' to build from source." echo "try '${basesrc}' to build from source."
echo echo
} >&2 } >&2

View File

@ -1,5 +1,6 @@
VERSION='7.3.9' VERSION='7.3.9'
PYVER='3.8' PYVER='3.8'
MIN_OSX_VERSION='10.14'
# https://www.pypy.org/checksums.html # https://www.pypy.org/checksums.html
aarch64_hash=5e124455e207425e80731dff317f0432fa0aba1f025845ffca813770e2447e32 aarch64_hash=5e124455e207425e80731dff317f0432fa0aba1f025845ffca813770e2447e32
@ -48,10 +49,10 @@ function pypy_pkg_data {
hash="${linux64_hash}" hash="${linux64_hash}"
;; ;;
'osx64' ) 'osx64' )
if require_osx_version "10.13"; then if require_osx_version "${MIN_OSX_VERSION}"; then
hash="${osx64_hash}" hash="${osx64_hash}"
else else
err_no_binary "${ARCH}, OS X < 10.13" err_no_binary "${ARCH}, OS X < ${MIN_OSX_VERSION}"
fi fi
;; ;;
's390x' ) 's390x' )

View File

@ -1,5 +1,6 @@
VERSION='7.3.10' VERSION='7.3.10'
PYVER='3.9' PYVER='3.9'
MIN_OSX_VERSION='10.14'
# https://www.pypy.org/checksums.html # https://www.pypy.org/checksums.html
aarch64_hash=657a04fd9a5a992a2f116a9e7e9132ea0c578721f59139c9fb2083775f71e514 aarch64_hash=657a04fd9a5a992a2f116a9e7e9132ea0c578721f59139c9fb2083775f71e514
@ -52,11 +53,11 @@ function pypy_pkg_data {
pkg='macos_arm64' pkg='macos_arm64'
;; ;;
'osx64' ) 'osx64' )
if require_osx_version "10.13"; then if require_osx_version "${MIN_OSX_VERSION}"; then
hash="${osx64_hash}" hash="${osx64_hash}"
pkg='macos_x86_64' pkg='macos_x86_64'
else else
err_no_binary "${ARCH}, OS X < 10.13" err_no_binary "${ARCH}, OS X < ${MIN_OSX_VERSION}"
fi fi
;; ;;
's390x' ) 's390x' )

View File

@ -1,5 +1,6 @@
VERSION='7.3.11' VERSION='7.3.11'
PYVER='3.9' PYVER='3.9'
MIN_OSX_VERSION='10.15'
# https://www.pypy.org/checksums.html # https://www.pypy.org/checksums.html
aarch64_hash=09175dc652ed895d98e9ad63d216812bf3ee7e398d900a9bf9eb2906ba8302b9 aarch64_hash=09175dc652ed895d98e9ad63d216812bf3ee7e398d900a9bf9eb2906ba8302b9
@ -52,11 +53,11 @@ function pypy_pkg_data {
pkg='macos_arm64' pkg='macos_arm64'
;; ;;
'osx64' ) 'osx64' )
if require_osx_version "10.13"; then if require_osx_version "${MIN_OSX_VERSION}"; then
hash="${osx64_hash}" hash="${osx64_hash}"
pkg='macos_x86_64' pkg='macos_x86_64'
else else
err_no_binary "${ARCH}, OS X < 10.13" err_no_binary "${ARCH}, OS X < ${MIN_OSX_VERSION}"
fi fi
;; ;;
's390x' ) 's390x' )

View File

@ -1,5 +1,6 @@
VERSION='7.3.12' VERSION='7.3.12'
PYVER='3.9' PYVER='3.9'
MIN_OSX_VERSION='10.15'
# https://www.pypy.org/checksums.html # https://www.pypy.org/checksums.html
aarch64_hash=e9327fb9edaf2ad91935d5b8563ec5ff24193bddb175c1acaaf772c025af1824 aarch64_hash=e9327fb9edaf2ad91935d5b8563ec5ff24193bddb175c1acaaf772c025af1824
@ -52,11 +53,11 @@ function pypy_pkg_data {
pkg='macos_arm64' pkg='macos_arm64'
;; ;;
'osx64' ) 'osx64' )
if require_osx_version "10.13"; then if require_osx_version "${MIN_OSX_VERSION}"; then
hash="${osx64_hash}" hash="${osx64_hash}"
pkg='macos_x86_64' pkg='macos_x86_64'
else else
err_no_binary "${ARCH}, OS X < 10.13" err_no_binary "${ARCH}, OS X < ${MIN_OSX_VERSION}"
fi fi
;; ;;
's390x' ) 's390x' )

View File

@ -1,5 +1,6 @@
VERSION='7.3.13' VERSION='7.3.13'
PYVER='3.9' PYVER='3.9'
MIN_OSX_VERSION='10.15'
# https://www.pypy.org/checksums.html # https://www.pypy.org/checksums.html
aarch64_hash=317d7876c5825a086f854253648b967a432b993ce87695d2895d3ad6ed0d2716 aarch64_hash=317d7876c5825a086f854253648b967a432b993ce87695d2895d3ad6ed0d2716
@ -52,11 +53,11 @@ function pypy_pkg_data {
pkg='macos_arm64' pkg='macos_arm64'
;; ;;
'osx64' ) 'osx64' )
if require_osx_version "10.13"; then if require_osx_version "${MIN_OSX_VERSION}"; then
hash="${osx64_hash}" hash="${osx64_hash}"
pkg='macos_x86_64' pkg='macos_x86_64'
else else
err_no_binary "${ARCH}, OS X < 10.13" err_no_binary "${ARCH}, OS X < ${MIN_OSX_VERSION}"
fi fi
;; ;;
's390x' ) 's390x' )

View File

@ -1,5 +1,6 @@
VERSION='7.3.14' VERSION='7.3.14'
PYVER='3.9' PYVER='3.9'
MIN_OSX_VERSION='10.15'
# https://www.pypy.org/checksums.html # https://www.pypy.org/checksums.html
aarch64_hash=14b842f32f60ce2d9d130971f9bcbdb6875824a0e78fac36806d267e0982179c aarch64_hash=14b842f32f60ce2d9d130971f9bcbdb6875824a0e78fac36806d267e0982179c
@ -52,11 +53,11 @@ function pypy_pkg_data {
pkg='macos_arm64' pkg='macos_arm64'
;; ;;
'osx64' ) 'osx64' )
if require_osx_version "10.13"; then if require_osx_version "${MIN_OSX_VERSION}"; then
hash="${osx64_hash}" hash="${osx64_hash}"
pkg='macos_x86_64' pkg='macos_x86_64'
else else
err_no_binary "${ARCH}, OS X < 10.13" err_no_binary "${ARCH}, OS X < ${MIN_OSX_VERSION}"
fi fi
;; ;;
's390x' ) 's390x' )

View File

@ -1,5 +1,6 @@
VERSION='7.3.15' VERSION='7.3.15'
PYVER='3.9' PYVER='3.9'
MIN_OSX_VERSION='10.15'
# https://www.pypy.org/checksums.html # https://www.pypy.org/checksums.html
aarch64_hash=03e35fcba290454bb0ccf7ee57fb42d1e63108d10d593776a382c0a2fe355de0 aarch64_hash=03e35fcba290454bb0ccf7ee57fb42d1e63108d10d593776a382c0a2fe355de0
@ -52,11 +53,11 @@ function pypy_pkg_data {
pkg='macos_arm64' pkg='macos_arm64'
;; ;;
'osx64' ) 'osx64' )
if require_osx_version "10.13"; then if require_osx_version "${MIN_OSX_VERSION}"; then
hash="${osx64_hash}" hash="${osx64_hash}"
pkg='macos_x86_64' pkg='macos_x86_64'
else else
err_no_binary "${ARCH}, OS X < 10.13" err_no_binary "${ARCH}, OS X < ${MIN_OSX_VERSION}"
fi fi
;; ;;
's390x' ) 's390x' )

View File

@ -1,5 +1,6 @@
VERSION='7.3.16' VERSION='7.3.16'
PYVER='3.9' PYVER='3.9'
MIN_OSX_VERSION='10.15'
# https://www.pypy.org/checksums.html # https://www.pypy.org/checksums.html
aarch64_hash=de3f2ed3581b30555ac0dd3e4df78a262ec736a36fb2e8f28259f8539b278ef4 aarch64_hash=de3f2ed3581b30555ac0dd3e4df78a262ec736a36fb2e8f28259f8539b278ef4
@ -52,11 +53,11 @@ function pypy_pkg_data {
pkg='macos_arm64' pkg='macos_arm64'
;; ;;
'osx64' ) 'osx64' )
if require_osx_version "10.13"; then if require_osx_version "${MIN_OSX_VERSION}"; then
hash="${osx64_hash}" hash="${osx64_hash}"
pkg='macos_x86_64' pkg='macos_x86_64'
else else
err_no_binary "${ARCH}, OS X < 10.13" err_no_binary "${ARCH}, OS X < ${MIN_OSX_VERSION}"
fi fi
;; ;;
's390x' ) 's390x' )

View File

@ -1,8 +1,9 @@
VERSION='7.3.8' VERSION='7.3.8'
PYVER='3.9' PYVER='3.9'
MIN_OSX_VERSION='10.14'
# https://www.pypy.org/checksums.html # https://www.pypy.org/checksums.html
aarch64_hash=89d7ee12a8c416e83fae80af82482531fc6502321e75e5b7a0cc01d756ee5f0e aarch64_hash=b7282bc4484bceae5bc4cc04e05ee4faf51cb624c8fc7a69d92e5fdf0d0c96aa
linux32_hash=0894c468e7de758c509a602a28ef0ba4fbf197ccdf946c7853a7283d9bb2a345 linux32_hash=0894c468e7de758c509a602a28ef0ba4fbf197ccdf946c7853a7283d9bb2a345
linux64_hash=129a055032bba700cd1d0acacab3659cf6b7180e25b1b2f730e792f06d5b3010 linux64_hash=129a055032bba700cd1d0acacab3659cf6b7180e25b1b2f730e792f06d5b3010
osx64_hash=95bd88ac8d6372cd5b7b5393de7b7d5c615a0c6e42fdb1eb67f2d2d510965aee osx64_hash=95bd88ac8d6372cd5b7b5393de7b7d5c615a0c6e42fdb1eb67f2d2d510965aee
@ -28,7 +29,7 @@ function pypy_pkg_data {
case "${pkg}" in case "${pkg}" in
'linux-aarch64' ) 'linux-aarch64' )
hash="${aarch64_hash}" hash="${aarch64_hash}"
url="${baseurl}-aarch64.tar.bz2" # diff url url="${baseurl}-aarch64-portable.tar.bz2" # diff url
;; ;;
'linux' ) 'linux' )
hash="${linux32_hash}" hash="${linux32_hash}"
@ -39,12 +40,12 @@ function pypy_pkg_data {
hash="${linux64_hash}" hash="${linux64_hash}"
;; ;;
'osx64' ) 'osx64' )
if require_osx_version "10.13"; then if require_osx_version "${MIN_OSX_VERSION}"; then
hash="${osx64_hash}" hash="${osx64_hash}"
else else
{ echo { echo
colorize 1 "ERROR" colorize 1 "ERROR"
echo ": The binary distribution of PyPy is not available for $(pypy_architecture 2>/dev/null || true), OS X < 10.13." echo ": The binary distribution of PyPy is not available for $(pypy_architecture 2>/dev/null || true), OS X < ${MIN_OSX_VERSION}."
echo "try '${basesrc}' to build from source." echo "try '${basesrc}' to build from source."
echo echo
} >&2 } >&2

View File

@ -1,5 +1,6 @@
VERSION='7.3.9' VERSION='7.3.9'
PYVER='3.9' PYVER='3.9'
MIN_OSX_VERSION='10.14'
# https://www.pypy.org/checksums.html # https://www.pypy.org/checksums.html
aarch64_hash=2e1ae193d98bc51439642a7618d521ea019f45b8fb226940f7e334c548d2b4b9 aarch64_hash=2e1ae193d98bc51439642a7618d521ea019f45b8fb226940f7e334c548d2b4b9
@ -48,10 +49,10 @@ function pypy_pkg_data {
hash="${linux64_hash}" hash="${linux64_hash}"
;; ;;
'osx64' ) 'osx64' )
if require_osx_version "10.13"; then if require_osx_version "${MIN_OSX_VERSION}"; then
hash="${osx64_hash}" hash="${osx64_hash}"
else else
err_no_binary "${ARCH}, OS X < 10.13" err_no_binary "${ARCH}, OS X < ${MIN_OSX_VERSION}"
fi fi
;; ;;
's390x' ) 's390x' )

View File

@ -6,7 +6,7 @@ echo
case "$(pyston_architecture 2>/dev/null || true)" in case "$(pyston_architecture 2>/dev/null || true)" in
"linux64" ) "linux64" )
install_package "pyston_2.2" "https://github.com/pyston/pyston/releases/download/pyston_2.2/pyston_2.2_portable.tar.gz#d113cc4d1f6821c0f117f7a84978823d8ac751d7970fa7841eb994663ec5a59f" "pyston2_2" verify_py38 get_pip install_package "pyston_2.2" "https://github.com/pyston/pyston/releases/download/pyston_2.2/pyston_2.2_portable.tar.gz#d113cc4d1f6821c0f117f7a84978823d8ac751d7970fa7841eb994663ec5a59f" pyston verify_py38 get_pip
;; ;;
* ) * )
{ echo { echo

View File

@ -6,7 +6,7 @@ echo
case "$(pyston_architecture 2>/dev/null || true)" in case "$(pyston_architecture 2>/dev/null || true)" in
"linux64" ) "linux64" )
install_package "pyston_2.3" "https://github.com/pyston/pyston/releases/download/v2.3/pyston_2.3_portable-v2.tar.gz#90185e29e4a1a19562c095f2bb4e81a5d0715150fa10eca363ec1188b5ba7ee7" "pyston2_2" verify_py38 get_pip install_package "pyston_2.3" "https://github.com/pyston/pyston/releases/download/v2.3/pyston_2.3_portable-v2.tar.gz#90185e29e4a1a19562c095f2bb4e81a5d0715150fa10eca363ec1188b5ba7ee7" pyston verify_py38 get_pip
;; ;;
* ) * )
{ echo { echo

View File

@ -6,7 +6,7 @@ echo
case "$(pyston_architecture 2>/dev/null || true)" in case "$(pyston_architecture 2>/dev/null || true)" in
"linux64" ) "linux64" )
install_package "pyston_2.3.1" "https://github.com/pyston/pyston/releases/download/pyston_2.3.1/pyston_2.3.1_portable_v2.tar.gz#4e16df1eaf5f226c0629f2db1e63033454c94cb9e29f50154177819662df5b15" "pyston" verify_py38 get_pip install_package "pyston_2.3.1" "https://github.com/pyston/pyston/releases/download/pyston_2.3.1/pyston_2.3.1_portable_v2.tar.gz#4e16df1eaf5f226c0629f2db1e63033454c94cb9e29f50154177819662df5b15" pyston verify_py38 get_pip
;; ;;
* ) * )
{ echo { echo

View File

@ -6,7 +6,7 @@ echo
case "$(pyston_architecture 2>/dev/null || true)" in case "$(pyston_architecture 2>/dev/null || true)" in
"linux64" ) "linux64" )
install_package "pyston_2.3.2" "https://github.com/pyston/pyston/releases/download/pyston_2.3.2/pyston_2.3.2_portable.tar.gz#80e71dd2db504e09951ee835e04c9e1183c79412da9aa11d98a6d3f44b95bec1" "pyston" verify_py38 get_pip install_package "pyston_2.3.2" "https://github.com/pyston/pyston/releases/download/pyston_2.3.2/pyston_2.3.2_portable.tar.gz#80e71dd2db504e09951ee835e04c9e1183c79412da9aa11d98a6d3f44b95bec1" pyston verify_py38 get_pip
;; ;;
* ) * )
{ echo { echo

View File

@ -1,9 +1,9 @@
case "$(pyston_architecture 2>/dev/null || true)" in case "$(pyston_architecture 2>/dev/null || true)" in
"linux64" ) "linux64" )
install_package "pyston_2.3.3_portable_amd64" "https://github.com/pyston/pyston/releases/download/pyston_2.3.3/pyston_2.3.3_portable_amd64.tar.gz#7a38e2bd2fed38e6daba4d513bae32af0d5ba6185cadf37cb1af6bcc4de0cb57" "pyston" verify_py38 get_pip install_package "pyston_2.3.3_portable_amd64" "https://github.com/pyston/pyston/releases/download/pyston_2.3.3/pyston_2.3.3_portable_amd64.tar.gz#7a38e2bd2fed38e6daba4d513bae32af0d5ba6185cadf37cb1af6bcc4de0cb57" pyston verify_py38 get_pip
;; ;;
"linux-aarch64" ) "linux-aarch64" )
install_package "pyston_2.3.3_portable_arm64" "https://github.com/pyston/pyston/releases/download/pyston_2.3.3/pyston_2.3.3_portable_arm64.tar.gz#f93f55b59120f576e5755bd8f86fa38361a30ca5389dbadc68450051ee2dccb1" "pyston" verify_py38 get_pip install_package "pyston_2.3.3_portable_arm64" "https://github.com/pyston/pyston/releases/download/pyston_2.3.3/pyston_2.3.3_portable_arm64.tar.gz#f93f55b59120f576e5755bd8f86fa38361a30ca5389dbadc68450051ee2dccb1" pyston verify_py38 get_pip
;; ;;
* ) * )
{ echo { echo

Some files were not shown because too many files have changed in this diff Show More