Compare commits

...

4 Commits

Author SHA1 Message Date
rockandska
e48951db1a
Merge 715c939abf into a419b003b4 2025-10-10 09:08:09 +02:00
Ivan Pozdeev
a419b003b4 2.6.10
Some checks are pending
macos_build / macos_build (3.10) (push) Waiting to run
macos_build / macos_build (3.11) (push) Waiting to run
macos_build / macos_build (3.12) (push) Waiting to run
macos_build / macos_build (3.13) (push) Waiting to run
macos_build / macos_build (3.9) (push) Waiting to run
pyenv_tests / pyenv_tests (macos-13) (push) Waiting to run
pyenv_tests / pyenv_tests (macos-14) (push) Waiting to run
pyenv_tests / pyenv_tests (ubuntu-22.04) (push) Waiting to run
pyenv_tests / pyenv_tests (ubuntu-24.04) (push) Waiting to run
ubuntu_build / ubuntu_build (3.10) (push) Waiting to run
ubuntu_build / ubuntu_build (3.11) (push) Waiting to run
ubuntu_build / ubuntu_build (3.12) (push) Waiting to run
ubuntu_build / ubuntu_build (3.13) (push) Waiting to run
ubuntu_build / ubuntu_build (3.9) (push) Waiting to run
2025-10-10 04:14:38 +03:00
Ned Batchelder
1c05252dfc
Add CPython 3.12.12, 3.11.14, 3.10.19, 3.9.24 (#3344) 2025-10-10 04:12:44 +03:00
Tester
715c939abf PYENV_INSTALL_PATH created and exported 2025-09-18 15:17:05 +02:00
15 changed files with 70 additions and 20 deletions

View File

@ -1,5 +1,8 @@
# Version History # Version History
## Release v2.6.10
* Add CPython 3.12.12, 3.11.14, 3.10.19, 3.9.24 by @nedbat in https://github.com/pyenv/pyenv/pull/3344
## Release v2.6.9 ## Release v2.6.9
* CI: modified-scripts-build: fix CPython-specific jobs never firing by @tuzi3040 in https://github.com/pyenv/pyenv/pull/3338 * CI: modified-scripts-build: fix CPython-specific jobs never firing by @tuzi3040 in https://github.com/pyenv/pyenv/pull/3338
* CI: modified-scripts-build: fix output variable for CPython-specific workflows by @native-api in https://github.com/pyenv/pyenv/pull/3340 * CI: modified-scripts-build: fix output variable for CPython-specific workflows by @native-api in https://github.com/pyenv/pyenv/pull/3340

View File

@ -76,23 +76,27 @@ export PYENV_DIR
shopt -s nullglob shopt -s nullglob
bin_path="$(abs_dirname "$0")" PYENV_INSTALL_PATH="$(abs_dirname "$0")"
for plugin_bin in "${bin_path%/*}"/plugins/*/bin; do PYENV_INSTALL_PATH="${PYENV_INSTALL_PATH%/*}"
export PYENV_INSTALL_PATH
for plugin_bin in "${PYENV_INSTALL_PATH}"/plugins/*/bin; do
PATH="${plugin_bin}:${PATH}" PATH="${plugin_bin}:${PATH}"
done done
# PYENV_ROOT can be set to anything, so it may happen to be equal to the base path above, # PYENV_ROOT can be set to anything, so it may happen to be equal to the base path above,
# resulting in duplicate PATH entries # resulting in duplicate PATH entries
if [ "${bin_path%/*}" != "$PYENV_ROOT" ]; then if [ "${PYENV_INSTALL_PATH}" != "$PYENV_ROOT" ]; then
for plugin_bin in "${PYENV_ROOT}"/plugins/*/bin; do for plugin_bin in "${PYENV_ROOT}"/plugins/*/bin; do
PATH="${plugin_bin}:${PATH}" PATH="${plugin_bin}:${PATH}"
done done
fi fi
export PATH="${bin_path}:${PATH}" export PATH="${PYENV_INSTALL_PATH}/libexec:${PATH}"
PYENV_HOOK_PATH="${PYENV_HOOK_PATH}:${PYENV_ROOT}/pyenv.d" PYENV_HOOK_PATH="${PYENV_HOOK_PATH}:${PYENV_ROOT}/pyenv.d"
if [ "${bin_path%/*}" != "$PYENV_ROOT" ]; then if [ "${PYENV_INSTALL_PATH}" != "$PYENV_ROOT" ]; then
# Add pyenv's own `pyenv.d` unless pyenv was cloned to PYENV_ROOT # Add pyenv's own `pyenv.d` unless pyenv was cloned to PYENV_ROOT
PYENV_HOOK_PATH="${PYENV_HOOK_PATH}:${bin_path%/*}/pyenv.d" PYENV_HOOK_PATH="${PYENV_HOOK_PATH}:${PYENV_INSTALL_PATH}/pyenv.d"
fi fi
PYENV_HOOK_PATH="${PYENV_HOOK_PATH}:/usr/etc/pyenv.d:/usr/local/etc/pyenv.d:/etc/pyenv.d:/usr/lib/pyenv/hooks" PYENV_HOOK_PATH="${PYENV_HOOK_PATH}:/usr/etc/pyenv.d:/usr/local/etc/pyenv.d:/etc/pyenv.d:/usr/lib/pyenv/hooks"
for plugin_hook in "${PYENV_ROOT}/plugins/"*/etc/pyenv.d; do for plugin_hook in "${PYENV_ROOT}/plugins/"*/etc/pyenv.d; do

View File

@ -12,7 +12,7 @@
set -e set -e
[ -n "$PYENV_DEBUG" ] && set -x [ -n "$PYENV_DEBUG" ] && set -x
version="2.6.9" version="2.6.10"
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

@ -31,6 +31,7 @@ fi
PYENV_COMMAND_PATH="$(pyenv-which "$PYENV_COMMAND")" PYENV_COMMAND_PATH="$(pyenv-which "$PYENV_COMMAND")"
PYENV_BIN_PATH="${PYENV_COMMAND_PATH%/*}" PYENV_BIN_PATH="${PYENV_COMMAND_PATH%/*}"
export PYENV_VERSION export PYENV_VERSION
OLDIFS="$IFS" OLDIFS="$IFS"

View File

@ -241,7 +241,7 @@ function print_env() {
} }
function print_completion() { function print_completion() {
completion="${0%/*/*}/completions/pyenv.${shell}" completion="${PYENV_INSTALL_PATH}/completions/pyenv.${shell}"
if [ -r "$completion" ]; then if [ -r "$completion" ]; then
echo "source '$completion'" echo "source '$completion'"
fi fi

View File

@ -256,7 +256,6 @@ for DEFINITION in "${DEFINITIONS[@]}"; do
# Display a more helpful message if the definition wasn't found. # Display a more helpful message if the definition wasn't found.
if [ "$STATUS" == "2" ]; then if [ "$STATUS" == "2" ]; then
{ candidates="$(definitions "$DEFINITION")" { candidates="$(definitions "$DEFINITION")"
here="$(dirname "${0%/*}")/../.."
if [ -n "$candidates" ]; then if [ -n "$candidates" ]; then
echo echo
echo "The following versions contain \`$DEFINITION' in the name:" echo "The following versions contain \`$DEFINITION' in the name:"
@ -266,12 +265,12 @@ for DEFINITION in "${DEFINITIONS[@]}"; do
echo "See all available versions with \`pyenv install --list'." echo "See all available versions with \`pyenv install --list'."
echo echo
echo -n "If the version you need is missing, try upgrading pyenv" echo -n "If the version you need is missing, try upgrading pyenv"
if [ "$here" != "${here#$(brew --prefix 2>/dev/null)}" ]; then if [ "${PYENV_INSTALL_PATH}" != "${PYENV_INSTALL_PATH#$(brew --prefix 2>/dev/null)}" ]; then
printf ":\n\n" printf ":\n\n"
echo " brew update && brew upgrade pyenv" echo " brew update && brew upgrade pyenv"
elif [ -d "${here}/.git" ]; then elif [ -d "${PYENV_INSTALL_PATH}/.git" ]; then
printf ":\n\n" printf ":\n\n"
echo " cd ${here} && git pull && cd -" echo " cd ${PYENV_INSTALL_PATH} && git pull && cd -"
else else
printf ".\n" printf ".\n"
fi fi

View File

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

View File

@ -0,0 +1,9 @@
prefer_openssl3
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
install_package "openssl-3.2.4" "https://github.com/openssl/openssl/releases/download/openssl-3.2.4/openssl-3.2.4.tar.gz#b23ad7fd9f73e43ad1767e636040e88ba7c9e5775bfa5618436a0dd2c17c3716" 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.10.19" "https://www.python.org/ftp/python/3.10.19/Python-3.10.19.tar.xz#c8f4a596572201d81dd7df91f70e177e19a70f1d489968b54b5fbbf29a97c076" standard verify_py310 copy_python_gdb ensurepip
else
install_package "Python-3.10.19" "https://www.python.org/ftp/python/3.10.19/Python-3.10.19.tgz#a078fb2d7a216071ebbe2e34b5f5355dd6b6e9b0cd1bacc4a41c63990c5a0eec" standard verify_py310 copy_python_gdb ensurepip
fi

View File

@ -0,0 +1,10 @@
prefer_openssl3
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1
install_package "openssl-3.2.4" "https://github.com/openssl/openssl/releases/download/openssl-3.2.4/openssl-3.2.4.tar.gz#b23ad7fd9f73e43ad1767e636040e88ba7c9e5775bfa5618436a0dd2c17c3716" mac_openssl --if has_broken_mac_openssl
install_package "readline-8.2" "https://ftpmirror.gnu.org/readline/readline-8.2.tar.gz#3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35" mac_readline --if has_broken_mac_readline
if has_tar_xz_support; then
install_package "Python-3.11.14" "https://www.python.org/ftp/python/3.11.14/Python-3.11.14.tar.xz#8d3ed8ec5c88c1c95f5e558612a725450d2452813ddad5e58fdb1a53b1209b78" standard verify_py311 copy_python_gdb ensurepip
else
install_package "Python-3.11.14" "https://www.python.org/ftp/python/3.11.14/Python-3.11.14.tgz#563d2a1b2a5ba5d5409b5ecd05a0e1bf9b028cf3e6a6f0c87a5dc8dc3f2d9182" standard verify_py311 copy_python_gdb ensurepip
fi

View File

@ -0,0 +1,10 @@
prefer_openssl3
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1
install_package "openssl-3.5.1" "https://github.com/openssl/openssl/releases/download/openssl-3.5.1/openssl-3.5.1.tar.gz#529043b15cffa5f36077a4d0af83f3de399807181d607441d734196d889b641f" mac_openssl --if has_broken_mac_openssl
install_package "readline-8.2" "https://ftpmirror.gnu.org/readline/readline-8.2.tar.gz#3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35" mac_readline --if has_broken_mac_readline
if has_tar_xz_support; then
install_package "Python-3.12.12" "https://www.python.org/ftp/python/3.12.12/Python-3.12.12.tar.xz#fb85a13414b028c49ba18bbd523c2d055a30b56b18b92ce454ea2c51edc656c4" standard verify_py312 copy_python_gdb ensurepip
else
install_package "Python-3.12.12" "https://www.python.org/ftp/python/3.12.12/Python-3.12.12.tgz#487c908ddf4097a1b9ba859f25fe46d22ccaabfb335880faac305ac62bffb79b" standard verify_py312 copy_python_gdb ensurepip
fi

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.24" "https://www.python.org/ftp/python/3.9.24/Python-3.9.24.tar.xz#668391afabd5083faafa4543753d190f82f33ce6ba22d6e9ac728b43644b278a" standard verify_py39 copy_python_gdb ensurepip
else
install_package "Python-3.9.24" "https://www.python.org/ftp/python/3.9.24/Python-3.9.24.tgz#9a32cfc683aecaadbd9ed891ac2af9451ff37f48a00a2d8e1f4ecd9c2a1ffdcb" standard verify_py39 copy_python_gdb ensurepip
fi

View File

@ -140,7 +140,8 @@ OUT
stub_python_build 'echo ERROR >&2 && exit 2' stub_python_build 'echo ERROR >&2 && exit 2'
stub_python_build "--definitions : echo 2.6.9 2.7.9-rc1 2.7.9-rc2 3.4.2 | tr ' ' $'\\n'" stub_python_build "--definitions : echo 2.6.9 2.7.9-rc1 2.7.9-rc2 3.4.2 | tr ' ' $'\\n'"
run pyenv-install 2.7.9 mkdir "$BATS_TEST_TMPDIR/.git"
PYENV_INSTALL_PATH="$BATS_TEST_TMPDIR" run pyenv-install 2.7.9
assert_failure assert_failure
assert_output <<OUT assert_output <<OUT
ERROR ERROR
@ -153,19 +154,19 @@ See all available versions with \`pyenv install --list'.
If the version you need is missing, try upgrading pyenv: If the version you need is missing, try upgrading pyenv:
cd ${BATS_TEST_DIRNAME}/../../.. && git pull && cd - cd ${BATS_TEST_TMPDIR} && git pull && cd -
OUT OUT
unstub python-build unstub python-build
} }
@test "homebrew upgrade instructions given when pyenv is homebrew-installed" { @test "homebrew upgrade instructions given when pyenv is homebrew-installed" {
stub brew "--prefix : echo '${BATS_TEST_DIRNAME%/*}'" stub brew "--prefix : echo '${BATS_TEST_TMPDIR}'"
stub_python_build_lib stub_python_build_lib
stub_python_build 'echo ERROR >&2 && exit 2' \ stub_python_build 'echo ERROR >&2 && exit 2' \
"--definitions : true" "--definitions : true"
run pyenv-install 1.9.3 PYENV_INSTALL_PATH="$BATS_TEST_TMPDIR" run pyenv-install 1.9.3
assert_failure assert_failure
assert_output <<OUT assert_output <<OUT
ERROR ERROR

View File

@ -3,7 +3,7 @@
load test_helper load test_helper
_setup() { _setup() {
export GIT_DIR="${PYENV_TEST_DIR}/.git" export GIT_DIR="${HOME}/.git"
mkdir -p "$HOME" mkdir -p "$HOME"
git config --global user.name "Tester" git config --global user.name "Tester"
git config --global user.email "tester@test.local" git config --global user.email "tester@test.local"

View File

@ -37,7 +37,7 @@ create_executable() {
@test "setup shell completions" { @test "setup shell completions" {
exec_root="$(cd $BATS_TEST_DIRNAME/.. && pwd)" exec_root="$(cd $BATS_TEST_DIRNAME/.. && pwd)"
run pyenv-init - bash PYENV_INSTALL_PATH="${exec_root}" run pyenv-init - bash
assert_success assert_success
assert_line "source '${exec_root}/completions/pyenv.bash'" assert_line "source '${exec_root}/completions/pyenv.bash'"
} }
@ -63,7 +63,7 @@ OUT
@test "setup shell completions (fish)" { @test "setup shell completions (fish)" {
exec_root="$(cd $BATS_TEST_DIRNAME/.. && pwd)" exec_root="$(cd $BATS_TEST_DIRNAME/.. && pwd)"
run pyenv-init - fish PYENV_INSTALL_PATH="${exec_root}" run pyenv-init - fish
assert_success assert_success
assert_line "source '${exec_root}/completions/pyenv.fish'" assert_line "source '${exec_root}/completions/pyenv.fish'"
} }

View File

@ -19,6 +19,7 @@ setup() {
export BATS_TEST_TMPDIR="${bats_test_tmpdir}" export BATS_TEST_TMPDIR="${bats_test_tmpdir}"
export PYENV_TEST_DIR="${BATS_TEST_TMPDIR}/pyenv" export PYENV_TEST_DIR="${BATS_TEST_TMPDIR}/pyenv"
export PYENV_ROOT="${PYENV_TEST_DIR}/root" export PYENV_ROOT="${PYENV_TEST_DIR}/root"
export PYENV_INSTALL_PATH="${PYENV_TEST_DIR}"
export HOME="${PYENV_TEST_DIR}/home" export HOME="${PYENV_TEST_DIR}/home"
export PYENV_HOOK_PATH="${PYENV_ROOT}/pyenv.d" export PYENV_HOOK_PATH="${PYENV_ROOT}/pyenv.d"