Compare commits

...

4 Commits

Author SHA1 Message Date
Kevin Squire
e4e21940ad
Merge b4b8f71dde into c6ea700cdf 2025-11-05 17:50:28 +10:00
Ivan Pozdeev
c6ea700cdf 2.6.12
Some checks failed
macos_build / macos_build (3.10) (push) Has been cancelled
macos_build / macos_build (3.11) (push) Has been cancelled
macos_build / macos_build (3.12) (push) Has been cancelled
macos_build / macos_build (3.13) (push) Has been cancelled
macos_build / macos_build (3.9) (push) Has been cancelled
pyenv_tests / pyenv_tests (macos-13) (push) Has been cancelled
pyenv_tests / pyenv_tests (macos-14) (push) Has been cancelled
pyenv_tests / pyenv_tests (ubuntu-22.04) (push) Has been cancelled
pyenv_tests / pyenv_tests (ubuntu-24.04) (push) Has been cancelled
ubuntu_build / ubuntu_build (3.10) (push) Has been cancelled
ubuntu_build / ubuntu_build (3.11) (push) Has been cancelled
ubuntu_build / ubuntu_build (3.12) (push) Has been cancelled
ubuntu_build / ubuntu_build (3.13) (push) Has been cancelled
ubuntu_build / ubuntu_build (3.9) (push) Has been cancelled
2025-10-31 23:27:18 +03:00
Ned Batchelder
97fd8f436d
Add CPython 3.9.25 (#3355) 2025-10-31 23:24:35 +03:00
Kevin Squire
b4b8f71dde Add version aliases
An older plugin, pyenv-alias, allowed naming the desired python version with
an alias, which allowed installing multiple versions of the same python
version.  This is particularly useful on Apple silicon if you want to install
both arm and x86_64 versions of python.

Unfortunately, the pyenv-alias plugin broke when the code was updated to
allow specifying multiple versions of Python to install at once, and the
current code is not amenable to modifying the version in place with another
plugin.
2024-05-21 11:32:47 -07:00
5 changed files with 57 additions and 5 deletions

View File

@ -1,5 +1,9 @@
# Version History
## Release v2.6.12
* Add graalpy-25.0.1 by @msimacek in https://github.com/pyenv/pyenv/pull/3350
* Add CPython 3.9.25 by @nedbat in https://github.com/pyenv/pyenv/pull/3355
## Release v2.6.11
* Support building against Homebrew Tcl/Tk 9 by @native-api in https://github.com/pyenv/pyenv/pull/3343
* Add CPython 3.13.9 by @nedbat in https://github.com/pyenv/pyenv/pull/3346

View File

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

View File

@ -123,6 +123,36 @@ DEFINITIONS=("${ARGUMENTS[@]}")
[[ "${#DEFINITIONS[*]}" -eq 0 ]] && DEFINITIONS=($(pyenv-local 2>/dev/null || true))
[[ "${#DEFINITIONS[*]}" -eq 0 ]] && usage 1 >&2
is_array() {
# no argument passed
[[ $# -ne 1 ]] && echo 'Supply a variable name as an argument'>&2 && return 2
local var=$1
# use a variable to avoid having to escape spaces
local regex="^declare -[aA] ${var}(=|$)"
[[ $(declare -p "$var" 2> /dev/null) =~ $regex ]] && return 0
}
# If VERSION_ALIAS exists, create a 1-element array, VERSION_ALIASES, from VERSION_ALIAS
if [ -n "${VERSION_ALIAS}" ]; then
# Make sure VERSION_ALIASES doesn't already exist
# If it does, print an error about defining only one of VERSION_ALIAS or VERSION_ALIASES
if is_array VERSION_ALIASES; then
echo "Define only one of VERSION_ALIAS or VERSION_ALIASES" >&2
exit 1
fi
VERSION_ALIASES=("${VERSION_ALIAS}")
fi
# If VERSION_ALIASES exists, make sure it has the same number of elements as DEFINITIONS
if is_array VERSION_ALIASES; then
if [[ "${#VERSION_ALIASES[@]}" -ne "${#DEFINITIONS[@]}" ]]; then
echo "VERSION_ALIASES must have the same number of elements as DEFINITIONS" >&2
exit 1
fi
fi
# Define `before_install` and `after_install` functions that allow
# plugin hooks to register a string of code for execution before or
# after the installation process.
@ -152,7 +182,12 @@ IFS="$OLDIFS"
for script in "${scripts[@]}"; do source "$script"; done
COMBINED_STATUS=0
for DEFINITION in "${DEFINITIONS[@]}"; do
for i in "${!DEFINITIONS[@]}"; do
DEFINITION="${DEFINITIONS[$i]}"
if is_array VERSION_ALIASES; then
VERSION_ALIAS="${VERSION_ALIASES[$i]}"
fi
STATUS=0
# Try to resolve a prefix if user indeed gave a prefix.
@ -160,8 +195,9 @@ for DEFINITION in "${DEFINITIONS[@]}"; do
# and hooks also see the resolved name
DEFINITION="$(pyenv-latest -f -k "$DEFINITION")"
# Set VERSION_NAME from $DEFINITION. Then compute the installation prefix.
VERSION_NAME="${DEFINITION##*/}"
# Set VERSION_NAME from $VERSION_ALIAS if it is defined, else $DEFINITION.
# Then compute the installation prefix.
VERSION_NAME="${VERSION_ALIAS:-$DEFINITION##*/}"
[ -n "$DEBUG" ] && VERSION_NAME="${VERSION_NAME}-debug"
PREFIX="${PYENV_ROOT}/versions/${VERSION_NAME}"

View File

@ -14,7 +14,7 @@
# -g/--debug Build a debug version
#
PYTHON_BUILD_VERSION="2.6.11"
PYTHON_BUILD_VERSION="2.6.12"
OLDIFS="$IFS"

View File

@ -0,0 +1,12 @@
prefer_openssl3
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
# Avoid a compilation error when linking against OpenSSL built with SSLv3 support (fixed in 3.10.0) (#2181)
export PYTHON_CFLAGS="-DOPENSSL_NO_SSL3${PYTHON_CFLAGS:+ $PYTHON_CFLAGS}"
install_package "openssl-3.0.16" "https://github.com/openssl/openssl/releases/download/openssl-3.0.16/openssl-3.0.16.tar.gz#57e03c50feab5d31b152af2b764f10379aecd8ee92f16c985983ce4a99f7ef86" mac_openssl --if has_broken_mac_openssl
install_package "readline-8.1" "https://ftpmirror.gnu.org/readline/readline-8.1.tar.gz#f8ceb4ee131e3232226a17f51b164afc46cd0b9e6cef344be87c65962cb82b02" mac_readline --if has_broken_mac_readline
if has_tar_xz_support; then
install_package "Python-3.9.25" "https://www.python.org/ftp/python/3.9.25/Python-3.9.25.tar.xz#00e07d7c0f2f0cc002432d1ee84d2a40dae404a99303e3f97701c10966c91834" standard verify_py39 copy_python_gdb ensurepip
else
install_package "Python-3.9.25" "https://www.python.org/ftp/python/3.9.25/Python-3.9.25.tgz#a7438eabd3a48139f42d4e058096af8d880b0bb6e8fb8c78838892e4ce5583f2" standard verify_py39 copy_python_gdb ensurepip
fi