From 1068875cc6cede15bbef187119d3be50c31bd21a Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Thu, 18 Sep 2025 08:15:02 -0400 Subject: [PATCH 01/55] Add CPython 3.14.0rc3 --- .../python-build/share/python-build/{3.14.0rc2 => 3.14.0rc3} | 4 ++-- .../share/python-build/{3.14.0rc2t => 3.14.0rc3t} | 0 2 files changed, 2 insertions(+), 2 deletions(-) rename plugins/python-build/share/python-build/{3.14.0rc2 => 3.14.0rc3} (59%) rename plugins/python-build/share/python-build/{3.14.0rc2t => 3.14.0rc3t} (100%) diff --git a/plugins/python-build/share/python-build/3.14.0rc2 b/plugins/python-build/share/python-build/3.14.0rc3 similarity index 59% rename from plugins/python-build/share/python-build/3.14.0rc2 rename to plugins/python-build/share/python-build/3.14.0rc3 index bedbd19e..a7f779a8 100644 --- a/plugins/python-build/share/python-build/3.14.0rc2 +++ b/plugins/python-build/share/python-build/3.14.0rc3 @@ -3,7 +3,7 @@ export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=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.14.0rc2" "https://www.python.org/ftp/python/3.14.0/Python-3.14.0rc2.tar.xz#bc62854cf232345bd22c9091a68464e01e056c6473a3fffa84572c8a342da656" standard verify_py314 copy_python_gdb ensurepip + install_package "Python-3.14.0rc3" "https://www.python.org/ftp/python/3.14.0/Python-3.14.0rc3.tar.xz#646dc945e49c73a141896deda12d43f3f293fd69426774c16fc43496180e8fcd" standard verify_py314 copy_python_gdb ensurepip else - install_package "Python-3.14.0rc2" "https://www.python.org/ftp/python/3.14.0/Python-3.14.0rc2.tgz#b336f5d76fcf2725b29108f253d4338fbe4cc6a17cd8baf059deebb5a343dd8f" standard verify_py314 copy_python_gdb ensurepip + install_package "Python-3.14.0rc3" "https://www.python.org/ftp/python/3.14.0/Python-3.14.0rc3.tgz#f52c3fa94a02adf9a6228abf53f6a53f09ce06aa168d879a332054c598179853" standard verify_py314 copy_python_gdb ensurepip fi diff --git a/plugins/python-build/share/python-build/3.14.0rc2t b/plugins/python-build/share/python-build/3.14.0rc3t similarity index 100% rename from plugins/python-build/share/python-build/3.14.0rc2t rename to plugins/python-build/share/python-build/3.14.0rc3t From 0052372fa307a269cf4145f6ba143da23965bdeb Mon Sep 17 00:00:00 2001 From: Ivan Pozdeev Date: Sun, 14 Sep 2025 08:05:11 +0300 Subject: [PATCH 02/55] Explicitly include Homebrew at /usr/local/include if passing -isysroot Apple CLang excludes it if -isysroot is passed --- plugins/python-build/bin/python-build | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/plugins/python-build/bin/python-build b/plugins/python-build/bin/python-build index 67191cd2..0e47c7f3 100755 --- a/plugins/python-build/bin/python-build +++ b/plugins/python-build/bin/python-build @@ -1508,7 +1508,9 @@ use_homebrew() { if command -v brew &>/dev/null; then local brew_prefix="$(brew --prefix 2>/dev/null || true)" # /usr/local/lib:/usr/lib is the default library search path - if [[ -n $brew_prefix && $brew_prefix != "/usr" && $brew_prefix != "/usr/local" ]]; then + if [[ -n $brew_prefix && ( ( $brew_prefix != "/usr" && $brew_prefix != "/usr/local" ) + #when -isysroot is passed to Apple CLang, /usr/(local) are excluded from the default search path + || ( is_mac && osx_using_default_compiler && $CFLAGS =~ (^|\ )-isysroot\ ) ) ]]; then export CPPFLAGS="${CPPFLAGS:+$CPPFLAGS }-I${brew_prefix}/include" append_ldflags_libs "-L${brew_prefix}/lib -Wl,-rpath,${brew_prefix}/lib" lock_in homebrew @@ -1842,7 +1844,7 @@ use_homebrew_zlib() { use_xcode_sdk_zlib() { # If a custom compiler is used, including XCode SDK will likely break it - [[ "${CC:-clang}" != "clang" || "$(command -v clang 2>/dev/null || true)" != "/usr/bin/clang" ]] && return 1 + osx_using_default_compiler || return 1 local sdkroot="$(xcrun --sdk macosx --show-sdk-path 2>/dev/null || true)" [[ -z ${sdkroot} || ! -d ${sdkroot} ]] && return 1 @@ -1862,6 +1864,10 @@ use_xcode_sdk_zlib() { return 0 } +osx_using_default_compiler() { + [[ "${CC:-clang}" == "clang" && "$(command -v clang 2>/dev/null || true)" == "/usr/bin/clang" ]] +} + use_macports_zlib() { can_use_macports || return 1 if [[ $(port -q installed zlib | awk '{print $3}') == "(active)" ]]; then From 8c3b705f04fda7fc8cbe7baf3ed8fe44a9c39304 Mon Sep 17 00:00:00 2001 From: Ivan Pozdeev Date: Sat, 13 Sep 2025 23:22:39 +0300 Subject: [PATCH 03/55] CI: modified-scripts-build: print config.log on build failure --- .github/workflows/modified_scripts_build.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/modified_scripts_build.yml b/.github/workflows/modified_scripts_build.yml index 88f28878..a06fd023 100644 --- a/.github/workflows/modified_scripts_build.yml +++ b/.github/workflows/modified_scripts_build.yml @@ -55,7 +55,8 @@ jobs: fi - run: | #build - pyenv --debug install ${{ matrix.python-version }} + pyenv --debug install ${{ matrix.python-version }} && rc=$? || rc=$? + if [[ $rc -ne 0 ]]; then echo config.log:; cat $TMPDIR/python-build*/*/config.log; false; fi pyenv global ${{ matrix.python-version }} # Micropython doesn't support --version - run: | @@ -116,7 +117,8 @@ jobs: fi - run: | #build - pyenv --debug install ${{ matrix.python-version }} + pyenv --debug install ${{ matrix.python-version }} && rc=$? || rc=$? + if [[ $rc -ne 0 ]]; then echo config.log:; cat $TMPDIR/python-build*/*/config.log; false; fi pyenv global ${{ matrix.python-version }} # Micropython doesn't support --version - run: | @@ -179,7 +181,8 @@ jobs: fi - run: | #build - pyenv install -v ${{ matrix.python-version }} + pyenv --debug install ${{ matrix.python-version }} && rc=$? || rc=$? + if [[ $rc -ne 0 ]]; then echo config.log:; cat $TMPDIR/python-build*/*/config.log; false; fi pyenv global ${{ matrix.python-version }} # Micropython doesn't support --version - run: | @@ -238,7 +241,8 @@ jobs: fi - run: | #build - pyenv install -v ${{ matrix.python-version }} + pyenv --debug install ${{ matrix.python-version }} && rc=$? || rc=$? + if [[ $rc -ne 0 ]]; then echo config.log:; cat $TMPDIR/python-build*/*/config.log; false; fi pyenv global ${{ matrix.python-version }} # Micropython doesn't support --version - run: | From bbe6301f01140b1baa23fce8ff8cebd0fccd00b2 Mon Sep 17 00:00:00 2001 From: Ivan Pozdeev Date: Sat, 13 Sep 2025 21:25:56 +0300 Subject: [PATCH 04/55] Use TCLTK_* and pkg-config for 3.11+ instead of --with-tcl-* and pkg-config Fixes warnings "configure: WARNING: unrecognized options: --with-tcltk-libs, --with-tcltk-includes" fix script --- plugins/python-build/bin/python-build | 38 +++++++++---- .../python-build/share/python-build/3.12.0 | 1 + .../python-build/share/python-build/3.12.1 | 1 + .../python-build/share/python-build/3.12.10 | 1 + .../python-build/share/python-build/3.12.11 | 1 + .../python-build/share/python-build/3.12.2 | 1 + .../python-build/share/python-build/3.12.3 | 1 + .../python-build/share/python-build/3.12.4 | 1 + .../python-build/share/python-build/3.12.5 | 1 + .../python-build/share/python-build/3.12.6 | 1 + .../python-build/share/python-build/3.12.7 | 1 + .../python-build/share/python-build/3.12.8 | 1 + .../python-build/share/python-build/3.12.9 | 1 + .../python-build/share/python-build/3.13-dev | 1 + .../python-build/share/python-build/3.13.0 | 1 + .../python-build/share/python-build/3.13.1 | 1 + .../python-build/share/python-build/3.13.2 | 1 + .../python-build/share/python-build/3.13.3 | 1 + .../python-build/share/python-build/3.13.4 | 1 + .../python-build/share/python-build/3.13.5 | 1 + .../python-build/share/python-build/3.13.6 | 1 + .../python-build/share/python-build/3.13.7 | 1 + .../python-build/share/python-build/3.14-dev | 1 + .../python-build/share/python-build/3.14.0rc3 | 1 + .../python-build/share/python-build/3.15-dev | 1 + plugins/python-build/test/build.bats | 55 +++++++++++++++++-- 26 files changed, 100 insertions(+), 17 deletions(-) diff --git a/plugins/python-build/bin/python-build b/plugins/python-build/bin/python-build index 0e47c7f3..157833e6 100755 --- a/plugins/python-build/bin/python-build +++ b/plugins/python-build/bin/python-build @@ -1888,20 +1888,34 @@ use_homebrew_tcltk() { local tcltk_libdir="$(brew --prefix "${tcltk}" 2>/dev/null || true)" if [ -d "$tcltk_libdir" ]; then echo "python-build: use tcl-tk from homebrew" - if [[ -z "$PYTHON_BUILD_TCLTK_USE_PKGCONFIG" ]]; then - local tcltk_version="$(sh -c '. '"$tcltk_libdir"'/lib/tclConfig.sh; echo $TCL_VERSION')" - package_option python configure --with-tcltk-libs="-L$tcltk_libdir/lib -ltcl$tcltk_version -ltk$tcltk_version" - # In Homebrew Tcl/Tk 8.6.13, headers have been moved to the 'tcl-tk' subdir. - # We're not using tclConfig.sh here 'cuz it produces the version-specific path to /Cellar - # and we'd rather have rpath set to /opt/<...> to allow micro release upgrades without rebuilding - # XXX: do use tclConfig.sh and translate the paths if more path shenanigans appear in later releases - if [ -d "$tcltk_libdir/include/tcl-tk" ]; then - package_option python configure --with-tcltk-includes="-I$tcltk_libdir/include/tcl-tk" - else - package_option python configure --with-tcltk-includes="-I$tcltk_libdir/include" - fi + local tcltk_version="$(sh -c '. '"$tcltk_libdir"'/lib/tclConfig.sh; echo $TCL_VERSION')" + local tcltk_includes tcltk_libs + # In Homebrew Tcl/Tk 8.6.13, headers have been moved to the 'tcl-tk' subdir. + # We're not using tclConfig.sh here 'cuz it produces the version-specific path to /Cellar + # and we'd rather have rpath set to /opt/<...> to allow micro release upgrades without rebuilding + # XXX: do use tclConfig.sh and translate the paths if more shenanigans appear in later releases + if [ -d "$tcltk_libdir/include/tcl-tk" ]; then + tcltk_includes="-I$tcltk_libdir/include/tcl-tk" + else + tcltk_includes="-I$tcltk_libdir/include" fi + tcltk_libs="-L$tcltk_libdir/lib -ltcl$tcltk_version -ltk$tcltk_version" + # Since 2.7.6, 3.3.3, 3.4.0 (Issue #1584): --with-tcltk-includes + --with-tcltk-libs Configure options + # Since 3.11.0 (bpo-45847): `pkg-config` call, TCLTK_CFLAGS + TCLTK_LIBS override + if [[ -n "$PYTHON_BUILD_TCLTK_USE_PKGCONFIG" ]]; then + # pkg-config is not present out of the box in MacOS. + # There's no way to provide a fallback only if it's is not present + # and Configure's logic of detecting if it's present is complicated. + # So we just override it always + export TCLTK_CFLAGS="$tcltk_includes" + export TCLTK_LIBS="$tcltk_libs" + else + package_option python configure --with-tcltk-includes="$tcltk_includes" + package_option python configure --with-tcltk-libs="$tcltk_libs" + fi + #set in either case as a failsafe export PKG_CONFIG_PATH="${tcltk_libdir}/lib/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}" + lock_in homebrew return 0 fi diff --git a/plugins/python-build/share/python-build/3.12.0 b/plugins/python-build/share/python-build/3.12.0 index 605867fa..12ed1634 100644 --- a/plugins/python-build/share/python-build/3.12.0 +++ b/plugins/python-build/share/python-build/3.12.0 @@ -1,5 +1,6 @@ prefer_openssl3 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 install_package "openssl-3.1.2" "https://www.openssl.org/source/openssl-3.1.2.tar.gz#a0ce69b8b97ea6a35b96875235aa453b966ba3cba8af2de23657d8b6767d6539" 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 diff --git a/plugins/python-build/share/python-build/3.12.1 b/plugins/python-build/share/python-build/3.12.1 index 636724c9..907bfaf3 100644 --- a/plugins/python-build/share/python-build/3.12.1 +++ b/plugins/python-build/share/python-build/3.12.1 @@ -1,5 +1,6 @@ prefer_openssl3 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 install_package "openssl-3.1.2" "https://www.openssl.org/source/openssl-3.1.2.tar.gz#a0ce69b8b97ea6a35b96875235aa453b966ba3cba8af2de23657d8b6767d6539" 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 diff --git a/plugins/python-build/share/python-build/3.12.10 b/plugins/python-build/share/python-build/3.12.10 index 75258a1d..00ed1e90 100644 --- a/plugins/python-build/share/python-build/3.12.10 +++ b/plugins/python-build/share/python-build/3.12.10 @@ -1,5 +1,6 @@ prefer_openssl3 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 install_package "openssl-3.3.3" "https://github.com/openssl/openssl/releases/download/openssl-3.3.3/openssl-3.3.3.tar.gz#712590fd20aaa60ec75d778fe5b810d6b829ca7fb1e530577917a131f9105539" 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 diff --git a/plugins/python-build/share/python-build/3.12.11 b/plugins/python-build/share/python-build/3.12.11 index 85bd7d10..ee1c2668 100644 --- a/plugins/python-build/share/python-build/3.12.11 +++ b/plugins/python-build/share/python-build/3.12.11 @@ -1,5 +1,6 @@ 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 diff --git a/plugins/python-build/share/python-build/3.12.2 b/plugins/python-build/share/python-build/3.12.2 index cee4c606..cd7fbe7e 100644 --- a/plugins/python-build/share/python-build/3.12.2 +++ b/plugins/python-build/share/python-build/3.12.2 @@ -1,5 +1,6 @@ prefer_openssl3 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 install_package "openssl-3.2.1" "https://www.openssl.org/source/openssl-3.2.1.tar.gz#83c7329fe52c850677d75e5d0b0ca245309b97e8ecbcfdc1dfdc4ab9fac35b39" 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 diff --git a/plugins/python-build/share/python-build/3.12.3 b/plugins/python-build/share/python-build/3.12.3 index 2228238d..484d8b4d 100644 --- a/plugins/python-build/share/python-build/3.12.3 +++ b/plugins/python-build/share/python-build/3.12.3 @@ -1,5 +1,6 @@ prefer_openssl3 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 install_package "openssl-3.2.1" "https://www.openssl.org/source/openssl-3.2.1.tar.gz#83c7329fe52c850677d75e5d0b0ca245309b97e8ecbcfdc1dfdc4ab9fac35b39" 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 diff --git a/plugins/python-build/share/python-build/3.12.4 b/plugins/python-build/share/python-build/3.12.4 index b4016372..def8ffb2 100644 --- a/plugins/python-build/share/python-build/3.12.4 +++ b/plugins/python-build/share/python-build/3.12.4 @@ -1,5 +1,6 @@ prefer_openssl3 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 install_package "openssl-3.2.2" "https://www.openssl.org/source/openssl-3.2.2.tar.gz#197149c18d9e9f292c43f0400acaba12e5f52cacfe050f3d199277ea738ec2e7" 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 diff --git a/plugins/python-build/share/python-build/3.12.5 b/plugins/python-build/share/python-build/3.12.5 index d067a27e..4bc86ad7 100644 --- a/plugins/python-build/share/python-build/3.12.5 +++ b/plugins/python-build/share/python-build/3.12.5 @@ -1,5 +1,6 @@ prefer_openssl3 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 install_package "openssl-3.3.1" "https://www.openssl.org/source/openssl-3.3.1.tar.gz#777cd596284c883375a2a7a11bf5d2786fc5413255efab20c50d6ffe6d020b7e" 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 diff --git a/plugins/python-build/share/python-build/3.12.6 b/plugins/python-build/share/python-build/3.12.6 index 73e2f6eb..28742012 100644 --- a/plugins/python-build/share/python-build/3.12.6 +++ b/plugins/python-build/share/python-build/3.12.6 @@ -1,5 +1,6 @@ prefer_openssl3 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 install_package "openssl-3.3.2" "https://github.com/openssl/openssl/releases/download/openssl-3.3.2/openssl-3.3.2.tar.gz#2e8a40b01979afe8be0bbfb3de5dc1c6709fedb46d6c89c10da114ab5fc3d281" 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 diff --git a/plugins/python-build/share/python-build/3.12.7 b/plugins/python-build/share/python-build/3.12.7 index 00a35778..49d5e7db 100644 --- a/plugins/python-build/share/python-build/3.12.7 +++ b/plugins/python-build/share/python-build/3.12.7 @@ -1,5 +1,6 @@ prefer_openssl3 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 install_package "openssl-3.3.2" "https://github.com/openssl/openssl/releases/download/openssl-3.3.2/openssl-3.3.2.tar.gz#2e8a40b01979afe8be0bbfb3de5dc1c6709fedb46d6c89c10da114ab5fc3d281" 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 diff --git a/plugins/python-build/share/python-build/3.12.8 b/plugins/python-build/share/python-build/3.12.8 index 005117f6..42634f1a 100644 --- a/plugins/python-build/share/python-build/3.12.8 +++ b/plugins/python-build/share/python-build/3.12.8 @@ -1,5 +1,6 @@ prefer_openssl3 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 install_package "openssl-3.3.2" "https://github.com/openssl/openssl/releases/download/openssl-3.3.2/openssl-3.3.2.tar.gz#2e8a40b01979afe8be0bbfb3de5dc1c6709fedb46d6c89c10da114ab5fc3d281" 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 diff --git a/plugins/python-build/share/python-build/3.12.9 b/plugins/python-build/share/python-build/3.12.9 index 58c77022..c03fe919 100644 --- a/plugins/python-build/share/python-build/3.12.9 +++ b/plugins/python-build/share/python-build/3.12.9 @@ -1,5 +1,6 @@ prefer_openssl3 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 install_package "openssl-3.3.2" "https://github.com/openssl/openssl/releases/download/openssl-3.3.2/openssl-3.3.2.tar.gz#2e8a40b01979afe8be0bbfb3de5dc1c6709fedb46d6c89c10da114ab5fc3d281" 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 diff --git a/plugins/python-build/share/python-build/3.13-dev b/plugins/python-build/share/python-build/3.13-dev index 3fa7508a..4beb508f 100644 --- a/plugins/python-build/share/python-build/3.13-dev +++ b/plugins/python-build/share/python-build/3.13-dev @@ -1,6 +1,7 @@ prefer_openssl3 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 export PYTHON_BUILD_CONFIGURE_WITH_DSYMUTIL=1 install_package "openssl-3.5.1" "https://www.openssl.org/source/openssl-3.5.1.tar.gz#529043b15cffa5f36077a4d0af83f3de399807181d607441d734196d889b641f" mac_openssl --if has_broken_mac_openssl install_package "readline-8.0" "https://ftpmirror.gnu.org/readline/readline-8.0.tar.gz#e339f51971478d369f8a053a330a190781acb9864cf4c541060f12078948e461" mac_readline --if has_broken_mac_readline diff --git a/plugins/python-build/share/python-build/3.13.0 b/plugins/python-build/share/python-build/3.13.0 index 4f73ad83..e79fafa7 100644 --- a/plugins/python-build/share/python-build/3.13.0 +++ b/plugins/python-build/share/python-build/3.13.0 @@ -1,5 +1,6 @@ prefer_openssl3 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 install_package "openssl-3.3.2" "https://github.com/openssl/openssl/releases/download/openssl-3.3.2/openssl-3.3.2.tar.gz#2e8a40b01979afe8be0bbfb3de5dc1c6709fedb46d6c89c10da114ab5fc3d281" 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 diff --git a/plugins/python-build/share/python-build/3.13.1 b/plugins/python-build/share/python-build/3.13.1 index cfeff70f..a002addc 100644 --- a/plugins/python-build/share/python-build/3.13.1 +++ b/plugins/python-build/share/python-build/3.13.1 @@ -1,5 +1,6 @@ prefer_openssl3 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 install_package "openssl-3.4.0" "https://github.com/openssl/openssl/releases/download/openssl-3.4.0/openssl-3.4.0.tar.gz#e15dda82fe2fe8139dc2ac21a36d4ca01d5313c75f99f46c4e8a27709b7294bf" 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 diff --git a/plugins/python-build/share/python-build/3.13.2 b/plugins/python-build/share/python-build/3.13.2 index 1df925ce..9d8d205f 100644 --- a/plugins/python-build/share/python-build/3.13.2 +++ b/plugins/python-build/share/python-build/3.13.2 @@ -1,5 +1,6 @@ prefer_openssl3 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 install_package "openssl-3.4.0" "https://github.com/openssl/openssl/releases/download/openssl-3.4.0/openssl-3.4.0.tar.gz#e15dda82fe2fe8139dc2ac21a36d4ca01d5313c75f99f46c4e8a27709b7294bf" 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 diff --git a/plugins/python-build/share/python-build/3.13.3 b/plugins/python-build/share/python-build/3.13.3 index 32f5c79a..d37c1ff1 100644 --- a/plugins/python-build/share/python-build/3.13.3 +++ b/plugins/python-build/share/python-build/3.13.3 @@ -1,5 +1,6 @@ prefer_openssl3 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 install_package "openssl-3.4.1" "https://github.com/openssl/openssl/releases/download/openssl-3.4.1/openssl-3.4.1.tar.gz#002a2d6b30b58bf4bea46c43bdd96365aaf8daa6c428782aa4feee06da197df3" 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 diff --git a/plugins/python-build/share/python-build/3.13.4 b/plugins/python-build/share/python-build/3.13.4 index f07d8f32..58aecf3c 100644 --- a/plugins/python-build/share/python-build/3.13.4 +++ b/plugins/python-build/share/python-build/3.13.4 @@ -1,5 +1,6 @@ prefer_openssl3 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 install_package "openssl-3.4.1" "https://github.com/openssl/openssl/releases/download/openssl-3.4.1/openssl-3.4.1.tar.gz#002a2d6b30b58bf4bea46c43bdd96365aaf8daa6c428782aa4feee06da197df3" 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 diff --git a/plugins/python-build/share/python-build/3.13.5 b/plugins/python-build/share/python-build/3.13.5 index d867c4eb..1eba07fc 100644 --- a/plugins/python-build/share/python-build/3.13.5 +++ b/plugins/python-build/share/python-build/3.13.5 @@ -1,5 +1,6 @@ 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 diff --git a/plugins/python-build/share/python-build/3.13.6 b/plugins/python-build/share/python-build/3.13.6 index f474fcb4..40cfe8b4 100644 --- a/plugins/python-build/share/python-build/3.13.6 +++ b/plugins/python-build/share/python-build/3.13.6 @@ -1,5 +1,6 @@ prefer_openssl3 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 install_package "openssl-3.5.2" "https://github.com/openssl/openssl/releases/download/openssl-3.5.2/openssl-3.5.2.tar.gz#c53a47e5e441c930c3928cf7bf6fb00e5d129b630e0aa873b08258656e7345ec" mac_openssl --if has_broken_mac_openssl install_package "readline-8.3" "https://mirror.cs.odu.edu/gnu/readline/readline-8.3.tar.gz#fe5383204467828cd495ee8d1d3c037a7eba1389c22bc6a041f627976f9061cc" mac_readline --if has_broken_mac_readline if has_tar_xz_support; then diff --git a/plugins/python-build/share/python-build/3.13.7 b/plugins/python-build/share/python-build/3.13.7 index 8d9b3c1f..710ed2d2 100644 --- a/plugins/python-build/share/python-build/3.13.7 +++ b/plugins/python-build/share/python-build/3.13.7 @@ -1,5 +1,6 @@ prefer_openssl3 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 install_package "openssl-3.5.2" "https://github.com/openssl/openssl/releases/download/openssl-3.5.2/openssl-3.5.2.tar.gz#c53a47e5e441c930c3928cf7bf6fb00e5d129b630e0aa873b08258656e7345ec" mac_openssl --if has_broken_mac_openssl install_package "readline-8.3" "https://mirror.cs.odu.edu/gnu/readline/readline-8.3.tar.gz#fe5383204467828cd495ee8d1d3c037a7eba1389c22bc6a041f627976f9061cc" mac_readline --if has_broken_mac_readline if has_tar_xz_support; then diff --git a/plugins/python-build/share/python-build/3.14-dev b/plugins/python-build/share/python-build/3.14-dev index 8823e939..6fbd8403 100644 --- a/plugins/python-build/share/python-build/3.14-dev +++ b/plugins/python-build/share/python-build/3.14-dev @@ -1,6 +1,7 @@ prefer_openssl3 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 export PYTHON_BUILD_CONFIGURE_WITH_DSYMUTIL=1 install_package "openssl-3.5.1" "https://www.openssl.org/source/openssl-3.5.1.tar.gz#529043b15cffa5f36077a4d0af83f3de399807181d607441d734196d889b641f" mac_openssl --if has_broken_mac_openssl install_package "readline-8.0" "https://ftpmirror.gnu.org/readline/readline-8.0.tar.gz#e339f51971478d369f8a053a330a190781acb9864cf4c541060f12078948e461" mac_readline --if has_broken_mac_readline diff --git a/plugins/python-build/share/python-build/3.14.0rc3 b/plugins/python-build/share/python-build/3.14.0rc3 index a7f779a8..d7239f38 100644 --- a/plugins/python-build/share/python-build/3.14.0rc3 +++ b/plugins/python-build/share/python-build/3.14.0rc3 @@ -1,5 +1,6 @@ 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 diff --git a/plugins/python-build/share/python-build/3.15-dev b/plugins/python-build/share/python-build/3.15-dev index ce92a386..d9681694 100644 --- a/plugins/python-build/share/python-build/3.15-dev +++ b/plugins/python-build/share/python-build/3.15-dev @@ -1,6 +1,7 @@ prefer_openssl3 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 export PYTHON_BUILD_CONFIGURE_WITH_DSYMUTIL=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 diff --git a/plugins/python-build/test/build.bats b/plugins/python-build/test/build.bats index 300dbd7d..e87e1569 100644 --- a/plugins/python-build/test/build.bats +++ b/plugins/python-build/test/build.bats @@ -29,14 +29,24 @@ cached_tarball() { tarball() { local name="$1" + shift local path="$PWD/$name" - local configure="$path/${2:-configure}" - shift 1 + local configure="$1" + if [[ ${configure:0:1} == "-" ]]; then configure=""; fi + configure="$path/${configure:-configure}" + shift || true + local extra_vars var_name + if [[ $# -gt 0 ]]; then + for var_name in "$@"; do + extra_vars="${extra_vars:+$extra_vars }$var_name=\$$var_name" + done + fi executable "$configure" <> build.log -echo "$name: \$@" \${PYTHONOPT:+PYTHONOPT=\$PYTHONOPT} >> build.log +echo "$name:" "\$@" \${PYTHONOPT:+PYTHONOPT=\$PYTHONOPT} >> build.log +${extra_vars:+echo \"$name: $extra_vars\" >>build.log} OUT for file; do @@ -751,7 +761,7 @@ make install OUT } -@test "tcl-tk is linked from Homebrew" { +@test "tcl-tk is linked from Homebrew via --with-tcl-*" { cached_tarball "Python-3.6.2" tcl_tk_version=8.6 tcl_tk_libdir="$BATS_TEST_TMPDIR/homebrew-tcl-tk" @@ -778,7 +788,42 @@ DEF assert_build_log <>"$tcl_tk_libdir/lib/tclConfig.sh" + + stub uname '-s : echo Darwin' + stub sw_vers '-productVersion : echo 1010' + + stub brew "--prefix tcl-tk@8 : echo '$tcl_tk_libdir'" + for i in {1..4}; do stub brew false; done + + stub_make_install + + run_inline_definition < Date: Thu, 18 Sep 2025 19:41:50 +0300 Subject: [PATCH 05/55] Add PYTHON_BUILD_TCLTK_FORMULA to allow building against Tcl/Tk 9 Tcl/Tk 9.0 support was added in 3.13.0b3 and is not official as of 3.14.0; the build with Homebrew version fails as of this writing --- plugins/python-build/README.md | 1 + plugins/python-build/bin/python-build | 2 +- plugins/python-build/test/build.bats | 36 ++++++++++++++++++++++++++- 3 files changed, 37 insertions(+), 2 deletions(-) diff --git a/plugins/python-build/README.md b/plugins/python-build/README.md index 2b8852cf..22dc2420 100644 --- a/plugins/python-build/README.md +++ b/plugins/python-build/README.md @@ -175,6 +175,7 @@ You can set certain environment variables to control the build process. * `PYTHON_BUILD_SKIP_HOMEBREW`, if set, will not search for libraries installed by Homebrew when it would normally will. * `PYTHON_BUILD_USE_HOMEBREW`, if set, will search for libraries installed by Homebrew when it would normally not. * `PYTHON_BUILD_HOMEBREW_OPENSSL_FORMULA`, override the Homebrew OpenSSL formula to use. +* `PYTHON_BUILD_TCLTK_FORMULA`, override the Homebrew Tcl/Tk formula to use. * `PYTHON_BUILD_SKIP_MACPORTS`, if set, will not search for libraries installed by MacPorts when it would normally will. * `PYTHON_BUILD_USE_MACPORTS`, if set, will search for libraries installed by MacPorts when it would normally not. * `PYTHON_BUILD_ROOT` overrides the default location from where build definitions diff --git a/plugins/python-build/bin/python-build b/plugins/python-build/bin/python-build index 157833e6..082603e0 100755 --- a/plugins/python-build/bin/python-build +++ b/plugins/python-build/bin/python-build @@ -1884,7 +1884,7 @@ use_homebrew_tcltk() { # tcl-tk is 9.0 which is not compatible with CPython as of this writing # but we'll keep it as backup for cases like non-updated Homebrew local tcltk - for tcltk in "tcl-tk@8" "tcl-tk"; do + for tcltk in ${PYTHON_BUILD_TCLTK_FORMULA:-tcl-tk@8 tcl-tk}; do local tcltk_libdir="$(brew --prefix "${tcltk}" 2>/dev/null || true)" if [ -d "$tcltk_libdir" ]; then echo "python-build: use tcl-tk from homebrew" diff --git a/plugins/python-build/test/build.bats b/plugins/python-build/test/build.bats index e87e1569..d123103e 100644 --- a/plugins/python-build/test/build.bats +++ b/plugins/python-build/test/build.bats @@ -46,7 +46,7 @@ tarball() { #!$BASH echo "$name: CFLAGS=\\"\$CFLAGS\\" CPPFLAGS=\\"\$CPPFLAGS\\" LDFLAGS=\\"\$LDFLAGS\\" PKG_CONFIG_PATH=\\"\$PKG_CONFIG_PATH\\"" >> build.log echo "$name:" "\$@" \${PYTHONOPT:+PYTHONOPT=\$PYTHONOPT} >> build.log -${extra_vars:+echo \"$name: $extra_vars\" >>build.log} +${extra_vars:+echo $name: $extra_vars >>build.log} OUT for file; do @@ -794,6 +794,40 @@ make install OUT } +@test "tcl-tk is linked from Homebrew with PYTHON_BUILD_TCLTK_FORMULA" { + cached_tarball "Python-3.6.2" + tcl_tk_version=8.6 + tcl_tk_libdir="$BATS_TEST_TMPDIR/homebrew-tcl-tk" + mkdir -p "$tcl_tk_libdir/lib" + echo "TCL_VERSION='$tcl_tk_version'" >>"$tcl_tk_libdir/lib/tclConfig.sh" + + stub uname '-s : echo Darwin' + stub sw_vers '-productVersion : echo 1010' + + stub brew "--prefix tcl-tk-custom : echo '$tcl_tk_libdir'" + for i in {1..4}; do stub brew false; done + + stub_make_install + + run_inline_definition < Date: Fri, 19 Sep 2025 07:14:28 +0300 Subject: [PATCH 06/55] 2.6.8 --- CHANGELOG.md | 14 ++++++++++++++ libexec/pyenv---version | 2 +- plugins/python-build/bin/python-build | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8bcc10fc..47bb23fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Version History +## Release v2.6.8 +* Use Zlib from XCode SDK in a way compatible with XCode 16 and CLT by @JarheadStever in https://github.com/pyenv/pyenv/pull/3301 +* Add miniforge 25.3.0-1, 25.3.0-2, 25.3.0-3, 25.3.1-0, skip miniforge 25.3.0-0 by @native-api in https://github.com/pyenv/pyenv/pull/3306 +* Fix Readline and OpenSSL detection for MacPorts without the corresponding package by @native-api in https://github.com/pyenv/pyenv/pull/3317 +* Bump actions/checkout from 4 to 5 in the github-actions group by @dependabot[bot] in https://github.com/pyenv/pyenv/pull/3318 +* Fix rehash hook for pipx/pipx.x/pipx.xx by @rockandska in https://github.com/pyenv/pyenv/pull/3320 +* Add miniconda 25.7.0-2 by @native-api in https://github.com/pyenv/pyenv/pull/3323 +* Support curl from a snap by @native-api in https://github.com/pyenv/pyenv/pull/3329 +* CI: Bats test suite in docker by @rockandska in https://github.com/pyenv/pyenv/pull/3324 +* Add GraalPy 25.0.0 by @msimacek in https://github.com/pyenv/pyenv/pull/3331 +* Upgrade pip detetcion in pip-rehash to accept multiple variations by @rockandska in https://github.com/pyenv/pyenv/pull/3330 +* Add CPython 3.14.0rc3 by @nedbat in https://github.com/pyenv/pyenv/pull/3333 +* Use TCLTK_* and pkg-config for 3.11+ linking with Homebrew Tcl/Tk; add PYTHON_BUILD_TCLTK_FORMULA envvar by @native-api in https://github.com/pyenv/pyenv/pull/3327 + ## Release v2.6.7 * Skip Zlib from XCode for XCode 16+ by @native-api in https://github.com/pyenv/pyenv/pull/3298 * Don't fail the build if `xcodebuild` fails by @native-api in https://github.com/pyenv/pyenv/pull/3302 diff --git a/libexec/pyenv---version b/libexec/pyenv---version index 79f6db09..84db8629 100755 --- a/libexec/pyenv---version +++ b/libexec/pyenv---version @@ -12,7 +12,7 @@ set -e [ -n "$PYENV_DEBUG" ] && set -x -version="2.6.7" +version="2.6.8" git_revision="" if cd "${BASH_SOURCE%/*}" 2>/dev/null && git remote -v 2>/dev/null | grep -q pyenv; then diff --git a/plugins/python-build/bin/python-build b/plugins/python-build/bin/python-build index 082603e0..5c36426c 100755 --- a/plugins/python-build/bin/python-build +++ b/plugins/python-build/bin/python-build @@ -14,7 +14,7 @@ # -g/--debug Build a debug version # -PYTHON_BUILD_VERSION="2.6.7" +PYTHON_BUILD_VERSION="2.6.8" OLDIFS="$IFS" From 8e343263474fb6b1eaf6c136789c57d5fa4faad2 Mon Sep 17 00:00:00 2001 From: tuzi3040 <28290621+tuzi3040@users.noreply.github.com> Date: Wed, 8 Oct 2025 02:00:59 +0800 Subject: [PATCH 07/55] CI: modified-scripts-build: fix CPython-specific jobs never firing (#3338) --- .github/workflows/modified_scripts_build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/modified_scripts_build.yml b/.github/workflows/modified_scripts_build.yml index a06fd023..80216d08 100644 --- a/.github/workflows/modified_scripts_build.yml +++ b/.github/workflows/modified_scripts_build.yml @@ -5,6 +5,7 @@ jobs: runs-on: ubuntu-latest outputs: versions: ${{steps.modified-versions.outputs.versions}} + versions_cpython_only: ${{steps.modified-versions.outputs.versions_cpython_only}} steps: - uses: actions/checkout@v5 - run: git fetch origin "$GITHUB_BASE_REF" From ba968fda2d2f327d2f1fd9e64608bae12195ac0b Mon Sep 17 00:00:00 2001 From: native-api Date: Tue, 7 Oct 2025 21:31:45 +0300 Subject: [PATCH 08/55] CI: Fix output variable for CPython-specific workflows (#3340) --- .github/workflows/modified_scripts_build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/modified_scripts_build.yml b/.github/workflows/modified_scripts_build.yml index 80216d08..4c3b1fde 100644 --- a/.github/workflows/modified_scripts_build.yml +++ b/.github/workflows/modified_scripts_build.yml @@ -21,10 +21,10 @@ jobs: echo "$versions" >> $GITHUB_ENV; echo "$EOF" >> $GITHUB_ENV; - versions_cpython_only=$(grep -Ee '^[[:digit:]]' <<<"$version") + versions_cpython_only=$(grep -Ee '^[[:digit:]]' <<<"$versions") EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64); echo "versions_cpython_only<<$EOF" >> $GITHUB_ENV; - echo $versions_cpython_only >> $GITHUB_ENV; + echo "$versions_cpython_only" >> $GITHUB_ENV; echo "$EOF" >> $GITHUB_ENV; - id: modified-versions run: | From ce9d396cccb667b5d89717a0b92a62596af7822a Mon Sep 17 00:00:00 2001 From: James Date: Tue, 7 Oct 2025 15:26:47 -0400 Subject: [PATCH 09/55] Add CPython 3.14.0 (#3339) --------- Co-authored-by: Ivan Pozdeev --- plugins/python-build/share/python-build/3.14.0 | 10 ++++++++++ plugins/python-build/share/python-build/3.14.0rc3 | 10 ---------- .../share/python-build/{3.14.0rc3t => 3.14.0t} | 0 3 files changed, 10 insertions(+), 10 deletions(-) create mode 100644 plugins/python-build/share/python-build/3.14.0 delete mode 100644 plugins/python-build/share/python-build/3.14.0rc3 rename plugins/python-build/share/python-build/{3.14.0rc3t => 3.14.0t} (100%) diff --git a/plugins/python-build/share/python-build/3.14.0 b/plugins/python-build/share/python-build/3.14.0 new file mode 100644 index 00000000..d5eb1396 --- /dev/null +++ b/plugins/python-build/share/python-build/3.14.0 @@ -0,0 +1,10 @@ +prefer_openssl3 +export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 +install_package "openssl-3.6.0" "https://github.com/openssl/openssl/releases/download/openssl-3.6.0/openssl-3.6.0.tar.gz#b6a5f44b7eb69e3fa35dbf15524405b44837a481d43d81daddde3ff21fcbb8e9" mac_openssl --if has_broken_mac_openssl +install_package "readline-8.3" "https://mirror.cs.odu.edu/gnu/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.0" "https://www.python.org/ftp/python/3.14.0/Python-3.14.0.tar.xz#2299dae542d395ce3883aca00d3c910307cd68e0b2f7336098c8e7b7eee9f3e9" standard verify_py314 copy_python_gdb ensurepip +else + install_package "Python-3.14.0" "https://www.python.org/ftp/python/3.14.0/Python-3.14.0.tgz#88d2da4eed42fa9a5f42ff58a8bc8988881bd6c547e297e46682c2687638a851" standard verify_py314 copy_python_gdb ensurepip +fi diff --git a/plugins/python-build/share/python-build/3.14.0rc3 b/plugins/python-build/share/python-build/3.14.0rc3 deleted file mode 100644 index d7239f38..00000000 --- a/plugins/python-build/share/python-build/3.14.0rc3 +++ /dev/null @@ -1,10 +0,0 @@ -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.14.0rc3" "https://www.python.org/ftp/python/3.14.0/Python-3.14.0rc3.tar.xz#646dc945e49c73a141896deda12d43f3f293fd69426774c16fc43496180e8fcd" standard verify_py314 copy_python_gdb ensurepip -else - install_package "Python-3.14.0rc3" "https://www.python.org/ftp/python/3.14.0/Python-3.14.0rc3.tgz#f52c3fa94a02adf9a6228abf53f6a53f09ce06aa168d879a332054c598179853" standard verify_py314 copy_python_gdb ensurepip -fi diff --git a/plugins/python-build/share/python-build/3.14.0rc3t b/plugins/python-build/share/python-build/3.14.0t similarity index 100% rename from plugins/python-build/share/python-build/3.14.0rc3t rename to plugins/python-build/share/python-build/3.14.0t From faddc0d3fe656a7ecfbdeba77f31bbaaa62dc8c4 Mon Sep 17 00:00:00 2001 From: John Sirois Date: Tue, 7 Oct 2025 12:28:30 -0700 Subject: [PATCH 10/55] Add CPython 3.13.8 (#3341) --- plugins/python-build/share/python-build/3.13.8 | 10 ++++++++++ plugins/python-build/share/python-build/3.13.8t | 2 ++ 2 files changed, 12 insertions(+) create mode 100644 plugins/python-build/share/python-build/3.13.8 create mode 100644 plugins/python-build/share/python-build/3.13.8t diff --git a/plugins/python-build/share/python-build/3.13.8 b/plugins/python-build/share/python-build/3.13.8 new file mode 100644 index 00000000..775dc4b2 --- /dev/null +++ b/plugins/python-build/share/python-build/3.13.8 @@ -0,0 +1,10 @@ +prefer_openssl3 +export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 +install_package "openssl-3.6.0" "https://github.com/openssl/openssl/releases/download/openssl-3.6.0/openssl-3.6.0.tar.gz#b6a5f44b7eb69e3fa35dbf15524405b44837a481d43d81daddde3ff21fcbb8e9" mac_openssl --if has_broken_mac_openssl +install_package "readline-8.3" "https://mirror.cs.odu.edu/gnu/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.8" "https://www.python.org/ftp/python/3.13.8/Python-3.13.8.tar.xz#b9910730526b298299b46b35595ced9055722df60c06ad6301f6a4e2c728a252" standard verify_py313 copy_python_gdb ensurepip +else + install_package "Python-3.13.8" "https://www.python.org/ftp/python/3.13.8/Python-3.13.8.tgz#06108fe96f4089b7d9e0096cb4ca9c81ddcd5135f779a7de94cf59abcaa4b53f" standard verify_py313 copy_python_gdb ensurepip +fi diff --git a/plugins/python-build/share/python-build/3.13.8t b/plugins/python-build/share/python-build/3.13.8t new file mode 100644 index 00000000..518be93e --- /dev/null +++ b/plugins/python-build/share/python-build/3.13.8t @@ -0,0 +1,2 @@ +export PYTHON_BUILD_FREE_THREADING=1 +source "${BASH_SOURCE[0]%t}" From 8087e811cdd5cc2a9753332e74a46ccd90189c64 Mon Sep 17 00:00:00 2001 From: Ivan Pozdeev Date: Tue, 7 Oct 2025 22:33:22 +0300 Subject: [PATCH 11/55] 2.6.9 --- CHANGELOG.md | 6 ++++++ libexec/pyenv---version | 2 +- plugins/python-build/bin/python-build | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 47bb23fc..f6c6fb4b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Version History +## 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 output variable for CPython-specific workflows by @native-api in https://github.com/pyenv/pyenv/pull/3340 +* Add CPython 3.14.0 by @SnoopJ in https://github.com/pyenv/pyenv/pull/3339 +* Add CPython 3.13.8 by @jsirois in https://github.com/pyenv/pyenv/pull/3341 + ## Release v2.6.8 * Use Zlib from XCode SDK in a way compatible with XCode 16 and CLT by @JarheadStever in https://github.com/pyenv/pyenv/pull/3301 * Add miniforge 25.3.0-1, 25.3.0-2, 25.3.0-3, 25.3.1-0, skip miniforge 25.3.0-0 by @native-api in https://github.com/pyenv/pyenv/pull/3306 diff --git a/libexec/pyenv---version b/libexec/pyenv---version index 84db8629..0710759a 100755 --- a/libexec/pyenv---version +++ b/libexec/pyenv---version @@ -12,7 +12,7 @@ set -e [ -n "$PYENV_DEBUG" ] && set -x -version="2.6.8" +version="2.6.9" git_revision="" if cd "${BASH_SOURCE%/*}" 2>/dev/null && git remote -v 2>/dev/null | grep -q pyenv; then diff --git a/plugins/python-build/bin/python-build b/plugins/python-build/bin/python-build index 5c36426c..3c1e6ea4 100755 --- a/plugins/python-build/bin/python-build +++ b/plugins/python-build/bin/python-build @@ -14,7 +14,7 @@ # -g/--debug Build a debug version # -PYTHON_BUILD_VERSION="2.6.8" +PYTHON_BUILD_VERSION="2.6.9" OLDIFS="$IFS" From 1c05252dfcfb4230642b5baac5a050083db60e8c Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Thu, 9 Oct 2025 21:12:44 -0400 Subject: [PATCH 12/55] Add CPython 3.12.12, 3.11.14, 3.10.19, 3.9.24 (#3344) --- plugins/python-build/share/python-build/3.10.19 | 9 +++++++++ plugins/python-build/share/python-build/3.11.14 | 10 ++++++++++ plugins/python-build/share/python-build/3.12.12 | 10 ++++++++++ plugins/python-build/share/python-build/3.9.24 | 12 ++++++++++++ 4 files changed, 41 insertions(+) create mode 100644 plugins/python-build/share/python-build/3.10.19 create mode 100644 plugins/python-build/share/python-build/3.11.14 create mode 100644 plugins/python-build/share/python-build/3.12.12 create mode 100644 plugins/python-build/share/python-build/3.9.24 diff --git a/plugins/python-build/share/python-build/3.10.19 b/plugins/python-build/share/python-build/3.10.19 new file mode 100644 index 00000000..dd8466f1 --- /dev/null +++ b/plugins/python-build/share/python-build/3.10.19 @@ -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 diff --git a/plugins/python-build/share/python-build/3.11.14 b/plugins/python-build/share/python-build/3.11.14 new file mode 100644 index 00000000..9f862136 --- /dev/null +++ b/plugins/python-build/share/python-build/3.11.14 @@ -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 diff --git a/plugins/python-build/share/python-build/3.12.12 b/plugins/python-build/share/python-build/3.12.12 new file mode 100644 index 00000000..bdc66a18 --- /dev/null +++ b/plugins/python-build/share/python-build/3.12.12 @@ -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 diff --git a/plugins/python-build/share/python-build/3.9.24 b/plugins/python-build/share/python-build/3.9.24 new file mode 100644 index 00000000..42290d04 --- /dev/null +++ b/plugins/python-build/share/python-build/3.9.24 @@ -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 From a419b003b4615bef05098865bb97e0fbc428095e Mon Sep 17 00:00:00 2001 From: Ivan Pozdeev Date: Fri, 10 Oct 2025 04:14:38 +0300 Subject: [PATCH 13/55] 2.6.10 --- CHANGELOG.md | 3 +++ libexec/pyenv---version | 2 +- plugins/python-build/bin/python-build | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f6c6fb4b..c42ecb9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # 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 * 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 diff --git a/libexec/pyenv---version b/libexec/pyenv---version index 0710759a..c701b0bc 100755 --- a/libexec/pyenv---version +++ b/libexec/pyenv---version @@ -12,7 +12,7 @@ set -e [ -n "$PYENV_DEBUG" ] && set -x -version="2.6.9" +version="2.6.10" git_revision="" if cd "${BASH_SOURCE%/*}" 2>/dev/null && git remote -v 2>/dev/null | grep -q pyenv; then diff --git a/plugins/python-build/bin/python-build b/plugins/python-build/bin/python-build index 3c1e6ea4..bd0c9b5f 100755 --- a/plugins/python-build/bin/python-build +++ b/plugins/python-build/bin/python-build @@ -14,7 +14,7 @@ # -g/--debug Build a debug version # -PYTHON_BUILD_VERSION="2.6.9" +PYTHON_BUILD_VERSION="2.6.10" OLDIFS="$IFS" From 8d3bba2f92c17624ce3a59efa254abf837899ff9 Mon Sep 17 00:00:00 2001 From: native-api Date: Sat, 11 Oct 2025 00:19:06 +0300 Subject: [PATCH 14/55] Support building against Homebrew Tcl/Tk 9 (#3343) Use tclConfig.sh/tkConfig.sh for future-proofing 3.14.0 doesn't detect Tcl/Tk with external libtommath, have to do it ourselves --- plugins/python-build/bin/python-build | 37 ++++----- plugins/python-build/test/build.bats | 113 +++++++++++++++++++++----- 2 files changed, 111 insertions(+), 39 deletions(-) diff --git a/plugins/python-build/bin/python-build b/plugins/python-build/bin/python-build index bd0c9b5f..d6a77ed5 100755 --- a/plugins/python-build/bin/python-build +++ b/plugins/python-build/bin/python-build @@ -1880,26 +1880,24 @@ use_macports_zlib() { use_homebrew_tcltk() { can_use_homebrew || return 1 + local tcltk_formula # Since https://github.com/Homebrew/homebrew-core/commit/f10e88617b41555193c22fdcba6109fe82155ee2 (10.11.2024), - # tcl-tk is 9.0 which is not compatible with CPython as of this writing - # but we'll keep it as backup for cases like non-updated Homebrew - local tcltk - for tcltk in ${PYTHON_BUILD_TCLTK_FORMULA:-tcl-tk@8 tcl-tk}; do - local tcltk_libdir="$(brew --prefix "${tcltk}" 2>/dev/null || true)" - if [ -d "$tcltk_libdir" ]; then - echo "python-build: use tcl-tk from homebrew" - local tcltk_version="$(sh -c '. '"$tcltk_libdir"'/lib/tclConfig.sh; echo $TCL_VERSION')" - local tcltk_includes tcltk_libs + # tcl-tk is 9.0. It's supported in CPython since 3.14.0a1 (gh-124111) but is not officially supported as of 3.14.0 + # so we prefer 8 + for tcltk_formula in ${PYTHON_BUILD_TCLTK_FORMULA:-tcl-tk@8 tcl-tk}; do + local tcltk_prefix="$(brew --prefix "${tcltk_formula}" 2>/dev/null || true)" + if [ -d "$tcltk_prefix" ]; then + echo "python-build: use ${tcltk_formula} from homebrew" # In Homebrew Tcl/Tk 8.6.13, headers have been moved to the 'tcl-tk' subdir. - # We're not using tclConfig.sh here 'cuz it produces the version-specific path to /Cellar - # and we'd rather have rpath set to /opt/<...> to allow micro release upgrades without rebuilding - # XXX: do use tclConfig.sh and translate the paths if more shenanigans appear in later releases - if [ -d "$tcltk_libdir/include/tcl-tk" ]; then - tcltk_includes="-I$tcltk_libdir/include/tcl-tk" - else - tcltk_includes="-I$tcltk_libdir/include" + local tcltk_includes="$(sh -c 'cd '"$tcltk_prefix"'/lib; . ./tclConfig.sh; . ./tkConfig.sh; echo "$TCL_INCLUDE_SPEC $TK_INCLUDE_SPEC"')" + # Homebrew Tcl/Tk 9 is built with external libtommath. CPython's build as of 3.14.0 does not detect that and fails to link to tommath symbols + local tcltk_cflags + if sh -c '. '"$tcltk_prefix"'/lib/tclConfig.sh; echo "$TCL_DEFS"' | grep -qwFe '-DTCL_WITH_EXTERNAL_TOMMATH=1'; then + tcltk_cflags="-DTCL_WITH_EXTERNAL_TOMMATH=1" fi - tcltk_libs="-L$tcltk_libdir/lib -ltcl$tcltk_version -ltk$tcltk_version" + # For some reason, keg-only tcl-tk@8 successfully links with Tkinter without specifying rpath, with `/opt' rpath + # so no need to translate /Cellar path to /opt path + local tcltk_libs="$(sh -c 'cd '"$tcltk_prefix"'/lib; . ./tclConfig.sh; . ./tkConfig.sh; echo "$TCL_LIB_SPEC $TK_LIB_SPEC"')" # Since 2.7.6, 3.3.3, 3.4.0 (Issue #1584): --with-tcltk-includes + --with-tcltk-libs Configure options # Since 3.11.0 (bpo-45847): `pkg-config` call, TCLTK_CFLAGS + TCLTK_LIBS override if [[ -n "$PYTHON_BUILD_TCLTK_USE_PKGCONFIG" ]]; then @@ -1907,14 +1905,15 @@ use_homebrew_tcltk() { # There's no way to provide a fallback only if it's is not present # and Configure's logic of detecting if it's present is complicated. # So we just override it always - export TCLTK_CFLAGS="$tcltk_includes" + export TCLTK_CFLAGS="$tcltk_includes${tcltk_cflags:+ $tcltk_cflags}" export TCLTK_LIBS="$tcltk_libs" else package_option python configure --with-tcltk-includes="$tcltk_includes" package_option python configure --with-tcltk-libs="$tcltk_libs" + [[ -n $tcltk_cflags ]] && export CFLAGS="${tcltk_cflags}${CFLAGS:+ $CFLAGS}" fi #set in either case as a failsafe - export PKG_CONFIG_PATH="${tcltk_libdir}/lib/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}" + export PKG_CONFIG_PATH="${tcltk_prefix}/lib/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}" lock_in homebrew return 0 diff --git a/plugins/python-build/test/build.bats b/plugins/python-build/test/build.bats index d123103e..f59c4759 100644 --- a/plugins/python-build/test/build.bats +++ b/plugins/python-build/test/build.bats @@ -68,6 +68,20 @@ assert_build_log() { assert_output } +stub_tcltk() { + local tcltk_prefix="${1:?}" + mkdir -p "$tcltk_prefix/lib" + cat >"$tcltk_prefix/lib/tclConfig.sh" <"$tcltk_prefix/lib/tkConfig.sh" <>"$tcl_tk_libdir/lib/tclConfig.sh" + stub_tcltk "${tcl_tk_libdir:=$BATS_TEST_TMPDIR/homebrew-tcl-tk}" stub uname '-s : echo Darwin' stub sw_vers '-productVersion : echo 1010' @@ -788,7 +799,40 @@ DEF assert_build_log <>"$tcl_tk_libdir/lib/tclConfig.sh" <>"$tcl_tk_libdir/lib/tclConfig.sh" + stub_tcltk "${tcl_tk_libdir:=$BATS_TEST_TMPDIR/homebrew-tcl-tk}" stub uname '-s : echo Darwin' stub sw_vers '-productVersion : echo 1010' @@ -822,7 +863,7 @@ DEF assert_build_log <>"$tcl_tk_libdir/lib/tclConfig.sh" + stub_tcltk "${tcl_tk_libdir:=$BATS_TEST_TMPDIR/homebrew-tcl-tk}" stub uname '-s : echo Darwin' stub sw_vers '-productVersion : echo 1010' @@ -857,7 +895,42 @@ DEF assert_build_log <>"$tcl_tk_libdir/lib/tclConfig.sh" < Date: Tue, 14 Oct 2025 16:18:13 -0400 Subject: [PATCH 15/55] Add CPython 3.13.9 --- plugins/python-build/share/python-build/3.13.9 | 10 ++++++++++ plugins/python-build/share/python-build/3.13.9t | 2 ++ 2 files changed, 12 insertions(+) create mode 100644 plugins/python-build/share/python-build/3.13.9 create mode 100644 plugins/python-build/share/python-build/3.13.9t diff --git a/plugins/python-build/share/python-build/3.13.9 b/plugins/python-build/share/python-build/3.13.9 new file mode 100644 index 00000000..529e6c24 --- /dev/null +++ b/plugins/python-build/share/python-build/3.13.9 @@ -0,0 +1,10 @@ +prefer_openssl3 +export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 +install_package "openssl-3.6.0" "https://github.com/openssl/openssl/releases/download/openssl-3.6.0/openssl-3.6.0.tar.gz#b6a5f44b7eb69e3fa35dbf15524405b44837a481d43d81daddde3ff21fcbb8e9" mac_openssl --if has_broken_mac_openssl +install_package "readline-8.3" "https://mirror.cs.odu.edu/gnu/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.9" "https://www.python.org/ftp/python/3.13.9/Python-3.13.9.tar.xz#ed5ef34cda36cfa2f3a340f07cac7e7814f91c7f3c411f6d3562323a866c5c66" standard verify_py313 copy_python_gdb ensurepip +else + install_package "Python-3.13.9" "https://www.python.org/ftp/python/3.13.9/Python-3.13.9.tgz#c4c066af19c98fb7835d473bebd7e23be84f6e9874d47db9e39a68ee5d0ce35c" standard verify_py313 copy_python_gdb ensurepip +fi diff --git a/plugins/python-build/share/python-build/3.13.9t b/plugins/python-build/share/python-build/3.13.9t new file mode 100644 index 00000000..518be93e --- /dev/null +++ b/plugins/python-build/share/python-build/3.13.9t @@ -0,0 +1,2 @@ +export PYTHON_BUILD_FREE_THREADING=1 +source "${BASH_SOURCE[0]%t}" From c1c8646d759aca365fb68b5a1ceec01b84987f46 Mon Sep 17 00:00:00 2001 From: Ivan Pozdeev Date: Wed, 15 Oct 2025 13:10:13 +0300 Subject: [PATCH 16/55] Fix Readline 8.3 URLs https://www.gnu.org/server/mirror.html advises to use http://ftpmirror.gnu.org/ for automatic mirror selection --- plugins/python-build/share/python-build/3.13.6 | 2 +- plugins/python-build/share/python-build/3.13.7 | 2 +- plugins/python-build/share/python-build/3.13.8 | 2 +- plugins/python-build/share/python-build/3.13.9 | 2 +- plugins/python-build/share/python-build/3.14.0 | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/python-build/share/python-build/3.13.6 b/plugins/python-build/share/python-build/3.13.6 index 40cfe8b4..580cda50 100644 --- a/plugins/python-build/share/python-build/3.13.6 +++ b/plugins/python-build/share/python-build/3.13.6 @@ -2,7 +2,7 @@ prefer_openssl3 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 install_package "openssl-3.5.2" "https://github.com/openssl/openssl/releases/download/openssl-3.5.2/openssl-3.5.2.tar.gz#c53a47e5e441c930c3928cf7bf6fb00e5d129b630e0aa873b08258656e7345ec" mac_openssl --if has_broken_mac_openssl -install_package "readline-8.3" "https://mirror.cs.odu.edu/gnu/readline/readline-8.3.tar.gz#fe5383204467828cd495ee8d1d3c037a7eba1389c22bc6a041f627976f9061cc" mac_readline --if has_broken_mac_readline +install_package "readline-8.3" "http://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.6" "https://www.python.org/ftp/python/3.13.6/Python-3.13.6.tar.xz#17ba5508819d8736a14fbfc47d36e184946a877851b2e9c4b6c43acb44a3b104" standard verify_py313 copy_python_gdb ensurepip else diff --git a/plugins/python-build/share/python-build/3.13.7 b/plugins/python-build/share/python-build/3.13.7 index 710ed2d2..38165c17 100644 --- a/plugins/python-build/share/python-build/3.13.7 +++ b/plugins/python-build/share/python-build/3.13.7 @@ -2,7 +2,7 @@ prefer_openssl3 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 install_package "openssl-3.5.2" "https://github.com/openssl/openssl/releases/download/openssl-3.5.2/openssl-3.5.2.tar.gz#c53a47e5e441c930c3928cf7bf6fb00e5d129b630e0aa873b08258656e7345ec" mac_openssl --if has_broken_mac_openssl -install_package "readline-8.3" "https://mirror.cs.odu.edu/gnu/readline/readline-8.3.tar.gz#fe5383204467828cd495ee8d1d3c037a7eba1389c22bc6a041f627976f9061cc" mac_readline --if has_broken_mac_readline +install_package "readline-8.3" "http://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.7" "https://www.python.org/ftp/python/3.13.7/Python-3.13.7.tar.xz#5462f9099dfd30e238def83c71d91897d8caa5ff6ebc7a50f14d4802cdaaa79a" standard verify_py313 copy_python_gdb ensurepip else diff --git a/plugins/python-build/share/python-build/3.13.8 b/plugins/python-build/share/python-build/3.13.8 index 775dc4b2..f0cdd44f 100644 --- a/plugins/python-build/share/python-build/3.13.8 +++ b/plugins/python-build/share/python-build/3.13.8 @@ -2,7 +2,7 @@ prefer_openssl3 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 install_package "openssl-3.6.0" "https://github.com/openssl/openssl/releases/download/openssl-3.6.0/openssl-3.6.0.tar.gz#b6a5f44b7eb69e3fa35dbf15524405b44837a481d43d81daddde3ff21fcbb8e9" mac_openssl --if has_broken_mac_openssl -install_package "readline-8.3" "https://mirror.cs.odu.edu/gnu/readline/readline-8.3.tar.gz#fe5383204467828cd495ee8d1d3c037a7eba1389c22bc6a041f627976f9061cc" mac_readline --if has_broken_mac_readline +install_package "readline-8.3" "http://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.8" "https://www.python.org/ftp/python/3.13.8/Python-3.13.8.tar.xz#b9910730526b298299b46b35595ced9055722df60c06ad6301f6a4e2c728a252" standard verify_py313 copy_python_gdb ensurepip else diff --git a/plugins/python-build/share/python-build/3.13.9 b/plugins/python-build/share/python-build/3.13.9 index 529e6c24..f9b3436c 100644 --- a/plugins/python-build/share/python-build/3.13.9 +++ b/plugins/python-build/share/python-build/3.13.9 @@ -2,7 +2,7 @@ prefer_openssl3 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 install_package "openssl-3.6.0" "https://github.com/openssl/openssl/releases/download/openssl-3.6.0/openssl-3.6.0.tar.gz#b6a5f44b7eb69e3fa35dbf15524405b44837a481d43d81daddde3ff21fcbb8e9" mac_openssl --if has_broken_mac_openssl -install_package "readline-8.3" "https://mirror.cs.odu.edu/gnu/readline/readline-8.3.tar.gz#fe5383204467828cd495ee8d1d3c037a7eba1389c22bc6a041f627976f9061cc" mac_readline --if has_broken_mac_readline +install_package "readline-8.3" "http://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.9" "https://www.python.org/ftp/python/3.13.9/Python-3.13.9.tar.xz#ed5ef34cda36cfa2f3a340f07cac7e7814f91c7f3c411f6d3562323a866c5c66" standard verify_py313 copy_python_gdb ensurepip else diff --git a/plugins/python-build/share/python-build/3.14.0 b/plugins/python-build/share/python-build/3.14.0 index d5eb1396..8780899c 100644 --- a/plugins/python-build/share/python-build/3.14.0 +++ b/plugins/python-build/share/python-build/3.14.0 @@ -2,7 +2,7 @@ prefer_openssl3 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 install_package "openssl-3.6.0" "https://github.com/openssl/openssl/releases/download/openssl-3.6.0/openssl-3.6.0.tar.gz#b6a5f44b7eb69e3fa35dbf15524405b44837a481d43d81daddde3ff21fcbb8e9" mac_openssl --if has_broken_mac_openssl -install_package "readline-8.3" "https://mirror.cs.odu.edu/gnu/readline/readline-8.3.tar.gz#fe5383204467828cd495ee8d1d3c037a7eba1389c22bc6a041f627976f9061cc" mac_readline --if has_broken_mac_readline +install_package "readline-8.3" "http://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.0" "https://www.python.org/ftp/python/3.14.0/Python-3.14.0.tar.xz#2299dae542d395ce3883aca00d3c910307cd68e0b2f7336098c8e7b7eee9f3e9" standard verify_py314 copy_python_gdb ensurepip else From 76614378645bdba3d642c5f4b7c2797ee47a62f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez=20Mondrag=C3=B3n?= Date: Wed, 15 Oct 2025 05:38:53 -0600 Subject: [PATCH 17/55] Add CPython 3.15.0a1 (#3347) --- plugins/python-build/share/python-build/3.15-dev | 4 ++-- plugins/python-build/share/python-build/3.15.0a1 | 10 ++++++++++ plugins/python-build/share/python-build/3.15.0a1t | 2 ++ 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 plugins/python-build/share/python-build/3.15.0a1 create mode 100644 plugins/python-build/share/python-build/3.15.0a1t diff --git a/plugins/python-build/share/python-build/3.15-dev b/plugins/python-build/share/python-build/3.15-dev index d9681694..71d8d739 100644 --- a/plugins/python-build/share/python-build/3.15-dev +++ b/plugins/python-build/share/python-build/3.15-dev @@ -3,6 +3,6 @@ export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 export PYTHON_BUILD_CONFIGURE_WITH_DSYMUTIL=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 +install_package "openssl-3.6.0" "https://github.com/openssl/openssl/releases/download/openssl-3.6.0/openssl-3.6.0.tar.gz#b6a5f44b7eb69e3fa35dbf15524405b44837a481d43d81daddde3ff21fcbb8e9" 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 install_git "Python-3.15-dev" "https://github.com/python/cpython" main standard verify_py315 copy_python_gdb ensurepip diff --git a/plugins/python-build/share/python-build/3.15.0a1 b/plugins/python-build/share/python-build/3.15.0a1 new file mode 100644 index 00000000..43a43940 --- /dev/null +++ b/plugins/python-build/share/python-build/3.15.0a1 @@ -0,0 +1,10 @@ +prefer_openssl3 +export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 +install_package "openssl-3.6.0" "https://github.com/openssl/openssl/releases/download/openssl-3.6.0/openssl-3.6.0.tar.gz#b6a5f44b7eb69e3fa35dbf15524405b44837a481d43d81daddde3ff21fcbb8e9" 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.15.0a1" "https://www.python.org/ftp/python/3.15.0/Python-3.15.0a1.tar.xz#3194939d488eeaeefdcf990d35542d9ad1ce788789c4e2305a2060eb7058e5a4" standard verify_py314 copy_python_gdb ensurepip +else + install_package "Python-3.15.0a1" "https://www.python.org/ftp/python/3.15.0/Python-3.15.0a1.tgz#d70f3895c97db60d058bbdfa3a55fadd385bcb1c1269e686040858e3c109c993" standard verify_py314 copy_python_gdb ensurepip +fi diff --git a/plugins/python-build/share/python-build/3.15.0a1t b/plugins/python-build/share/python-build/3.15.0a1t new file mode 100644 index 00000000..518be93e --- /dev/null +++ b/plugins/python-build/share/python-build/3.15.0a1t @@ -0,0 +1,2 @@ +export PYTHON_BUILD_FREE_THREADING=1 +source "${BASH_SOURCE[0]%t}" From 94071a937429c1923e12f8e57bc109aeebe7a0ff Mon Sep 17 00:00:00 2001 From: Ivan Pozdeev Date: Wed, 15 Oct 2025 14:40:44 +0300 Subject: [PATCH 18/55] 2.6.11 --- CHANGELOG.md | 5 +++++ libexec/pyenv---version | 2 +- plugins/python-build/bin/python-build | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c42ecb9f..eca8c861 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Version History +## 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 +* Add CPython 3.15.0a1 by @edgarrmondragon in https://github.com/pyenv/pyenv/pull/3347 + ## 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 diff --git a/libexec/pyenv---version b/libexec/pyenv---version index c701b0bc..9406f96b 100755 --- a/libexec/pyenv---version +++ b/libexec/pyenv---version @@ -12,7 +12,7 @@ set -e [ -n "$PYENV_DEBUG" ] && set -x -version="2.6.10" +version="2.6.11" git_revision="" if cd "${BASH_SOURCE%/*}" 2>/dev/null && git remote -v 2>/dev/null | grep -q pyenv; then diff --git a/plugins/python-build/bin/python-build b/plugins/python-build/bin/python-build index d6a77ed5..8e3f5a0f 100755 --- a/plugins/python-build/bin/python-build +++ b/plugins/python-build/bin/python-build @@ -14,7 +14,7 @@ # -g/--debug Build a debug version # -PYTHON_BUILD_VERSION="2.6.10" +PYTHON_BUILD_VERSION="2.6.11" OLDIFS="$IFS" From 74fea7edc6e479b6b351b29925ac29d76e7703c1 Mon Sep 17 00:00:00 2001 From: Ivan Pozdeev Date: Wed, 15 Oct 2025 15:00:43 +0300 Subject: [PATCH 19/55] Fix leftover commented-out test code --- plugins/python-build/test/build.bats | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/python-build/test/build.bats b/plugins/python-build/test/build.bats index f59c4759..7d787eab 100644 --- a/plugins/python-build/test/build.bats +++ b/plugins/python-build/test/build.bats @@ -230,11 +230,11 @@ install_package "Python-3.6.2" "http://python.org/ftp/python/3.6.2/Python-3.6.2. DEF assert_success -# unstub uname -# unstub sw_vers -# unstub brew -# unstub port -# unstub make + unstub uname + unstub sw_vers + unstub brew + unstub port + unstub make assert_build_log < Date: Wed, 22 Oct 2025 01:28:06 +0200 Subject: [PATCH 20/55] Add graalpy-25.0.1 (#3350) --- .../share/python-build/graalpy-25.0.1 | 64 +++++++++++++++++++ .../python-build/graalpy-community-25.0.1 | 54 ++++++++++++++++ 2 files changed, 118 insertions(+) create mode 100644 plugins/python-build/share/python-build/graalpy-25.0.1 create mode 100644 plugins/python-build/share/python-build/graalpy-community-25.0.1 diff --git a/plugins/python-build/share/python-build/graalpy-25.0.1 b/plugins/python-build/share/python-build/graalpy-25.0.1 new file mode 100644 index 00000000..8d4e3aba --- /dev/null +++ b/plugins/python-build/share/python-build/graalpy-25.0.1 @@ -0,0 +1,64 @@ +# Copyright (c) 2025, 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.0.1' +BUILD='' + +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 graalpy-community-${VERSION}" && echo + + +graalpy_arch="$(graalpy_architecture 2>/dev/null || true)" + +case "$graalpy_arch" in +"linux-amd64" ) + checksum="b5baff786753ebb774300fcf68a9bca4d14cbb8099f055637bee11786abb2d57" + ;; +"linux-aarch64" ) + checksum="f3315d1a3f13e7fcd785d0ca9b954d251da5f5d0dedae094c28a0566a239e4fd" + ;; +"macos-amd64" ) + checksum="10b0721d52397f0cc85f038900318da2203711cbcfae7899e3faed49d3dc6221" + ;; +"macos-aarch64" ) + checksum="389e0732f4d79e30335b70d41b6e8a2d769b435512fcb41675eb3dce4fc4d014" + ;; +* ) + { echo + colorize 1 "ERROR" + echo ": No binary distribution of GraalPy is available for $(uname -sm)." + echo + } >&2 + exit 1 + ;; +esac + +if [ -n "${BUILD}" ]; then + { echo + colorize 1 "ERROR" + echo "Oracle GraalPy currently doesn't provide snapshot builds. Use graalpy-community if you need snapshots." + echo + } >&2 + exit 1 +fi + +url="https://github.com/oracle/graalpython/releases/download/graal-${VERSION}/graalpy-${VERSION}-${graalpy_arch}.tar.gz#${checksum}" + +install_package "graalpy-${VERSION}" "${url}" "copy" ensurepip diff --git a/plugins/python-build/share/python-build/graalpy-community-25.0.1 b/plugins/python-build/share/python-build/graalpy-community-25.0.1 new file mode 100644 index 00000000..abd55565 --- /dev/null +++ b/plugins/python-build/share/python-build/graalpy-community-25.0.1 @@ -0,0 +1,54 @@ +# Copyright (c) 2025, 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.0.1' +BUILD='' + +graalpy_arch="$(graalpy_architecture 2>/dev/null || true)" + +case "$graalpy_arch" in +"linux-amd64" ) + checksum="5ac049e3e13a9b04eead81851e59dfc794278ffec1933ff429378c1a70c88d32" + ;; +"linux-aarch64" ) + checksum="2ea15f932e6e25b21edd0a2713b294ce91c1dca571414fcdff297028f1313de5" + ;; +"macos-amd64" ) + checksum="f7834df0a7c5087de746ae0b0143eda8cfc456c34ddccdc64817491a10e5294b" + ;; +"macos-aarch64" ) + checksum="f89b15b75f456240089dd50e06128aa7357371ee85098a04dc4a4cd34a65f0c9" + ;; +* ) + { echo + colorize 1 "ERROR" + echo ": No binary distribution of GraalPy is available for $(uname -sm)." + echo + } >&2 + exit 1 + ;; +esac + +if [ -n "${BUILD}" ]; then + url="https://github.com/graalvm/graalvm-ce-dev-builds/releases/download/${VERSION}-dev-${BUILD}/graalpy-community-dev-${graalpy_arch}.tar.gz" +else + url="https://github.com/oracle/graalpython/releases/download/graal-${VERSION}/graalpy-community-${VERSION}-${graalpy_arch}.tar.gz#${checksum}" +fi + +install_package "graalpy-community-${VERSION}${BUILD}" "${url}" "copy" ensurepip From 97fd8f436d74c83956f8e79a4391a05bac5a5647 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Fri, 31 Oct 2025 16:24:35 -0400 Subject: [PATCH 21/55] Add CPython 3.9.25 (#3355) --- plugins/python-build/share/python-build/3.9.25 | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 plugins/python-build/share/python-build/3.9.25 diff --git a/plugins/python-build/share/python-build/3.9.25 b/plugins/python-build/share/python-build/3.9.25 new file mode 100644 index 00000000..367381bf --- /dev/null +++ b/plugins/python-build/share/python-build/3.9.25 @@ -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 From c6ea700cdf38ad3474b047f2586ae6a8be44d78a Mon Sep 17 00:00:00 2001 From: Ivan Pozdeev Date: Fri, 31 Oct 2025 23:27:18 +0300 Subject: [PATCH 22/55] 2.6.12 --- CHANGELOG.md | 4 ++++ libexec/pyenv---version | 2 +- plugins/python-build/bin/python-build | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eca8c861..5f9cd3c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/libexec/pyenv---version b/libexec/pyenv---version index 9406f96b..b0823aeb 100755 --- a/libexec/pyenv---version +++ b/libexec/pyenv---version @@ -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 diff --git a/plugins/python-build/bin/python-build b/plugins/python-build/bin/python-build index 8e3f5a0f..81927e9b 100755 --- a/plugins/python-build/bin/python-build +++ b/plugins/python-build/bin/python-build @@ -14,7 +14,7 @@ # -g/--debug Build a debug version # -PYTHON_BUILD_VERSION="2.6.11" +PYTHON_BUILD_VERSION="2.6.12" OLDIFS="$IFS" From 032022dace10772a92d7a282d1b4f1e3caa5b194 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez=20Mondrag=C3=B3n?= Date: Wed, 5 Nov 2025 13:10:29 -0600 Subject: [PATCH 23/55] Replace macos-13 with macos-15-intel (#3356) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit > The macOS 13 Ventura based runner images will begin deprecation on September 22nd and will be fully unsupported by December 4th for GitHub and ADO. https://github.com/actions/runner-images/issues/13046 Signed-off-by: Edgar Ramírez Mondragón --- .github/workflows/modified_scripts_build.yml | 4 ++-- .github/workflows/pyenv_tests.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/modified_scripts_build.yml b/.github/workflows/modified_scripts_build.yml index 4c3b1fde..e8367cd9 100644 --- a/.github/workflows/modified_scripts_build.yml +++ b/.github/workflows/modified_scripts_build.yml @@ -37,7 +37,7 @@ jobs: fail-fast: false matrix: python-version: ${{fromJson(needs.discover_modified_scripts.outputs.versions)}} - os: ["macos-13", "macos-14", "macos-15"] + os: ["macos-14", "macos-15", "macos-15-intel"] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v5 @@ -98,7 +98,7 @@ jobs: fail-fast: false matrix: python-version: ${{fromJson(needs.discover_modified_scripts.outputs.versions_cpython_only)}} - os: ["macos-13", "macos-14", "macos-15"] + os: ["macos-14", "macos-15", "macos-15-intel"] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v5 diff --git a/.github/workflows/pyenv_tests.yml b/.github/workflows/pyenv_tests.yml index f4ef12f2..90972858 100644 --- a/.github/workflows/pyenv_tests.yml +++ b/.github/workflows/pyenv_tests.yml @@ -12,8 +12,8 @@ jobs: os: - ubuntu-24.04 - ubuntu-22.04 + - macos-15-intel - macos-14 - - macos-13 runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v5 From 2afd1733a40307296bb925c5a70a7a88589c55cc Mon Sep 17 00:00:00 2001 From: binbjz <8213913+binbjz@users.noreply.github.com> Date: Sat, 8 Nov 2025 19:35:44 +0800 Subject: [PATCH 24/55] Add Miniconda3-25.9.1-1 (#3357) --- .../python-build/miniconda3-3.10-25.9.1-1 | 19 +++++++++++++++++++ .../python-build/miniconda3-3.11-25.9.1-1 | 19 +++++++++++++++++++ .../python-build/miniconda3-3.12-25.9.1-1 | 19 +++++++++++++++++++ .../python-build/miniconda3-3.13-25.9.1-1 | 19 +++++++++++++++++++ .../python-build/miniconda3-3.9-25.9.1-1 | 19 +++++++++++++++++++ 5 files changed, 95 insertions(+) create mode 100644 plugins/python-build/share/python-build/miniconda3-3.10-25.9.1-1 create mode 100644 plugins/python-build/share/python-build/miniconda3-3.11-25.9.1-1 create mode 100644 plugins/python-build/share/python-build/miniconda3-3.12-25.9.1-1 create mode 100644 plugins/python-build/share/python-build/miniconda3-3.13-25.9.1-1 create mode 100644 plugins/python-build/share/python-build/miniconda3-3.9-25.9.1-1 diff --git a/plugins/python-build/share/python-build/miniconda3-3.10-25.9.1-1 b/plugins/python-build/share/python-build/miniconda3-3.10-25.9.1-1 new file mode 100644 index 00000000..04992009 --- /dev/null +++ b/plugins/python-build/share/python-build/miniconda3-3.10-25.9.1-1 @@ -0,0 +1,19 @@ +case "$(anaconda_architecture 2>/dev/null || true)" in +"Linux-aarch64" ) + install_script "Miniconda3-py310_25.9.1-1-Linux-aarch64" "https://repo.anaconda.com/miniconda/Miniconda3-py310_25.9.1-1-Linux-aarch64.sh#28fc3db9c7ee63cedab38b0e6006409f1f448be7ffc57b270623efd4422b0608" "miniconda" verify_py310 + ;; +"Linux-x86_64" ) + install_script "Miniconda3-py310_25.9.1-1-Linux-x86_64" "https://repo.anaconda.com/miniconda/Miniconda3-py310_25.9.1-1-Linux-x86_64.sh#04a8b03d8b0ec062d923e592201a6fd88b7247c309ef8848afb25c424c40ac39" "miniconda" verify_py310 + ;; +"MacOSX-arm64" ) + install_script "Miniconda3-py310_25.9.1-1-MacOSX-arm64" "https://repo.anaconda.com/miniconda/Miniconda3-py310_25.9.1-1-MacOSX-arm64.sh#fb3fbef60259b36b0248c73fecdd974f8554d5fccfe0a7b8a45eb06dedbe8a85" "miniconda" verify_py310 + ;; +* ) + { echo + colorize 1 "ERROR" + echo ": The binary distribution of Miniconda is not available for $(anaconda_architecture 2>/dev/null || true)." + echo + } >&2 + exit 1 + ;; +esac diff --git a/plugins/python-build/share/python-build/miniconda3-3.11-25.9.1-1 b/plugins/python-build/share/python-build/miniconda3-3.11-25.9.1-1 new file mode 100644 index 00000000..f017ac35 --- /dev/null +++ b/plugins/python-build/share/python-build/miniconda3-3.11-25.9.1-1 @@ -0,0 +1,19 @@ +case "$(anaconda_architecture 2>/dev/null || true)" in +"Linux-aarch64" ) + install_script "Miniconda3-py311_25.9.1-1-Linux-aarch64" "https://repo.anaconda.com/miniconda/Miniconda3-py311_25.9.1-1-Linux-aarch64.sh#4e0723b9d76aa491cf22511dac36f4fdec373e41d2a243ff875e19b8df39bf94" "miniconda" verify_py311 + ;; +"Linux-x86_64" ) + install_script "Miniconda3-py311_25.9.1-1-Linux-x86_64" "https://repo.anaconda.com/miniconda/Miniconda3-py311_25.9.1-1-Linux-x86_64.sh#238abad23f8d4d8ba89dd05df0b0079e278909a36e06955f12bbef4aa94e6131" "miniconda" verify_py311 + ;; +"MacOSX-arm64" ) + install_script "Miniconda3-py311_25.9.1-1-MacOSX-arm64" "https://repo.anaconda.com/miniconda/Miniconda3-py311_25.9.1-1-MacOSX-arm64.sh#5d5f58477f40d23e491394a7114a318724f1f9161e2b8bd08c5845c47b036b72" "miniconda" verify_py311 + ;; +* ) + { echo + colorize 1 "ERROR" + echo ": The binary distribution of Miniconda is not available for $(anaconda_architecture 2>/dev/null || true)." + echo + } >&2 + exit 1 + ;; +esac diff --git a/plugins/python-build/share/python-build/miniconda3-3.12-25.9.1-1 b/plugins/python-build/share/python-build/miniconda3-3.12-25.9.1-1 new file mode 100644 index 00000000..52243e05 --- /dev/null +++ b/plugins/python-build/share/python-build/miniconda3-3.12-25.9.1-1 @@ -0,0 +1,19 @@ +case "$(anaconda_architecture 2>/dev/null || true)" in +"Linux-aarch64" ) + install_script "Miniconda3-py312_25.9.1-1-Linux-aarch64" "https://repo.anaconda.com/miniconda/Miniconda3-py312_25.9.1-1-Linux-aarch64.sh#11ab86931679e6d9b15112f2e866dad1fcbd89a039a6442c0bce7b86fd282f0a" "miniconda" verify_py312 + ;; +"Linux-x86_64" ) + install_script "Miniconda3-py312_25.9.1-1-Linux-x86_64" "https://repo.anaconda.com/miniconda/Miniconda3-py312_25.9.1-1-Linux-x86_64.sh#a0def9c732d94b156529ef7db8edd6e1862cee784a27a4961870dca86e89fba4" "miniconda" verify_py312 + ;; +"MacOSX-arm64" ) + install_script "Miniconda3-py312_25.9.1-1-MacOSX-arm64" "https://repo.anaconda.com/miniconda/Miniconda3-py312_25.9.1-1-MacOSX-arm64.sh#6bf3d8cac26587f6e53f05cd781f9201d2918c37dc3ef20677b383e250568100" "miniconda" verify_py312 + ;; +* ) + { echo + colorize 1 "ERROR" + echo ": The binary distribution of Miniconda is not available for $(anaconda_architecture 2>/dev/null || true)." + echo + } >&2 + exit 1 + ;; +esac diff --git a/plugins/python-build/share/python-build/miniconda3-3.13-25.9.1-1 b/plugins/python-build/share/python-build/miniconda3-3.13-25.9.1-1 new file mode 100644 index 00000000..1a7e9902 --- /dev/null +++ b/plugins/python-build/share/python-build/miniconda3-3.13-25.9.1-1 @@ -0,0 +1,19 @@ +case "$(anaconda_architecture 2>/dev/null || true)" in +"Linux-aarch64" ) + install_script "Miniconda3-py313_25.9.1-1-Linux-aarch64" "https://repo.anaconda.com/miniconda/Miniconda3-py313_25.9.1-1-Linux-aarch64.sh#a0de4562c368a8b5ca4385843f405684c79bea7aa3b75d7513ff99c0c6435d51" "miniconda" verify_py313 + ;; +"Linux-x86_64" ) + install_script "Miniconda3-py313_25.9.1-1-Linux-x86_64" "https://repo.anaconda.com/miniconda/Miniconda3-py313_25.9.1-1-Linux-x86_64.sh#6022714da22986097bbefa13dab3d957257fef04e1c37d1ebd3645b5b99bc9d4" "miniconda" verify_py313 + ;; +"MacOSX-arm64" ) + install_script "Miniconda3-py313_25.9.1-1-MacOSX-arm64" "https://repo.anaconda.com/miniconda/Miniconda3-py313_25.9.1-1-MacOSX-arm64.sh#491f35ab841c99225e5680209d5455a2f5278551378781c0dfeaf2586d7ae3df" "miniconda" verify_py313 + ;; +* ) + { echo + colorize 1 "ERROR" + echo ": The binary distribution of Miniconda is not available for $(anaconda_architecture 2>/dev/null || true)." + echo + } >&2 + exit 1 + ;; +esac diff --git a/plugins/python-build/share/python-build/miniconda3-3.9-25.9.1-1 b/plugins/python-build/share/python-build/miniconda3-3.9-25.9.1-1 new file mode 100644 index 00000000..a192f5ef --- /dev/null +++ b/plugins/python-build/share/python-build/miniconda3-3.9-25.9.1-1 @@ -0,0 +1,19 @@ +case "$(anaconda_architecture 2>/dev/null || true)" in +"Linux-aarch64" ) + install_script "Miniconda3-py39_25.9.1-1-Linux-aarch64" "https://repo.anaconda.com/miniconda/Miniconda3-py39_25.9.1-1-Linux-aarch64.sh#983ef280dec1d0f965b6b6133c585ce902e07136105d4977aa5de3aa027cfa55" "miniconda" verify_py39 + ;; +"Linux-x86_64" ) + install_script "Miniconda3-py39_25.9.1-1-Linux-x86_64" "https://repo.anaconda.com/miniconda/Miniconda3-py39_25.9.1-1-Linux-x86_64.sh#d8d13344b46a057659397b9ca1a948d184bf59f04efa8864df8c01f7557e2baa" "miniconda" verify_py39 + ;; +"MacOSX-arm64" ) + install_script "Miniconda3-py39_25.9.1-1-MacOSX-arm64" "https://repo.anaconda.com/miniconda/Miniconda3-py39_25.9.1-1-MacOSX-arm64.sh#857f09c2be8feaf3664064a2e324e96656104a9a45ab0a657a49c03754855b77" "miniconda" verify_py39 + ;; +* ) + { echo + colorize 1 "ERROR" + echo ": The binary distribution of Miniconda is not available for $(anaconda_architecture 2>/dev/null || true)." + echo + } >&2 + exit 1 + ;; +esac From fa741b861a6537a35d8f77359dacc3f45142e719 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Wed, 19 Nov 2025 06:28:31 -0500 Subject: [PATCH 25/55] Add CPython 3.15.0a2 (#3359) --- .../python-build/share/python-build/{3.15.0a1 => 3.15.0a2} | 4 ++-- .../python-build/share/python-build/{3.15.0a1t => 3.15.0a2t} | 0 2 files changed, 2 insertions(+), 2 deletions(-) rename plugins/python-build/share/python-build/{3.15.0a1 => 3.15.0a2} (61%) rename plugins/python-build/share/python-build/{3.15.0a1t => 3.15.0a2t} (100%) diff --git a/plugins/python-build/share/python-build/3.15.0a1 b/plugins/python-build/share/python-build/3.15.0a2 similarity index 61% rename from plugins/python-build/share/python-build/3.15.0a1 rename to plugins/python-build/share/python-build/3.15.0a2 index 43a43940..6d5a2847 100644 --- a/plugins/python-build/share/python-build/3.15.0a1 +++ b/plugins/python-build/share/python-build/3.15.0a2 @@ -4,7 +4,7 @@ export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 install_package "openssl-3.6.0" "https://github.com/openssl/openssl/releases/download/openssl-3.6.0/openssl-3.6.0.tar.gz#b6a5f44b7eb69e3fa35dbf15524405b44837a481d43d81daddde3ff21fcbb8e9" 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.15.0a1" "https://www.python.org/ftp/python/3.15.0/Python-3.15.0a1.tar.xz#3194939d488eeaeefdcf990d35542d9ad1ce788789c4e2305a2060eb7058e5a4" standard verify_py314 copy_python_gdb ensurepip + install_package "Python-3.15.0a2" "https://www.python.org/ftp/python/3.15.0/Python-3.15.0a2.tar.xz#d8a0a2f4a7f3d7090cf195e81814efe95f70554955557f40e149d8694a662751" standard verify_py315 copy_python_gdb ensurepip else - install_package "Python-3.15.0a1" "https://www.python.org/ftp/python/3.15.0/Python-3.15.0a1.tgz#d70f3895c97db60d058bbdfa3a55fadd385bcb1c1269e686040858e3c109c993" standard verify_py314 copy_python_gdb ensurepip + install_package "Python-3.15.0a2" "https://www.python.org/ftp/python/3.15.0/Python-3.15.0a2.tgz#484924d5f963f3d4215ca50c13634b6a7067e9f273893145a6209fe7c93b78ff" standard verify_py315 copy_python_gdb ensurepip fi diff --git a/plugins/python-build/share/python-build/3.15.0a1t b/plugins/python-build/share/python-build/3.15.0a2t similarity index 100% rename from plugins/python-build/share/python-build/3.15.0a1t rename to plugins/python-build/share/python-build/3.15.0a2t From fdde91269b95bd8a61e9f8d11cba9a1e2de038ad Mon Sep 17 00:00:00 2001 From: Ivan Pozdeev Date: Wed, 19 Nov 2025 14:30:40 +0300 Subject: [PATCH 26/55] 2.6.13 --- CHANGELOG.md | 5 +++++ libexec/pyenv---version | 2 +- plugins/python-build/bin/python-build | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f9cd3c7..28bf7bd4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Version History +## Release v2.6.13 +* CI: Replace macos-13 with macos-15-intel by @edgarrmondragon in https://github.com/pyenv/pyenv/pull/3356 +* Add Miniconda3-25.9.1-1 by @binbjz in https://github.com/pyenv/pyenv/pull/3357 +* Add CPython 3.15.0a2 by @nedbat in https://github.com/pyenv/pyenv/pull/3359 + ## 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 diff --git a/libexec/pyenv---version b/libexec/pyenv---version index b0823aeb..3923359c 100755 --- a/libexec/pyenv---version +++ b/libexec/pyenv---version @@ -12,7 +12,7 @@ set -e [ -n "$PYENV_DEBUG" ] && set -x -version="2.6.12" +version="2.6.13" git_revision="" if cd "${BASH_SOURCE%/*}" 2>/dev/null && git remote -v 2>/dev/null | grep -q pyenv; then diff --git a/plugins/python-build/bin/python-build b/plugins/python-build/bin/python-build index 81927e9b..e62001dc 100755 --- a/plugins/python-build/bin/python-build +++ b/plugins/python-build/bin/python-build @@ -14,7 +14,7 @@ # -g/--debug Build a debug version # -PYTHON_BUILD_VERSION="2.6.12" +PYTHON_BUILD_VERSION="2.6.13" OLDIFS="$IFS" From a30c26ddf546708e20cbf9aa854d6435ca574dfb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Dec 2025 15:59:31 +0300 Subject: [PATCH 27/55] Bump actions/checkout from 5 to 6 in the github-actions group (#3360) Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 5 to 6 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/macos_build.yml | 2 +- .github/workflows/modified_scripts_build.yml | 10 +++++----- .github/workflows/pyenv_tests.yml | 2 +- .github/workflows/ubuntu_build.yml | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/macos_build.yml b/.github/workflows/macos_build.yml index 39f879f6..543b46d9 100644 --- a/.github/workflows/macos_build.yml +++ b/.github/workflows/macos_build.yml @@ -17,7 +17,7 @@ jobs: - "3.13" runs-on: macos-latest steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 # Normally, we would use the superbly maintained... # - uses: actions/setup-python@v2 # with: diff --git a/.github/workflows/modified_scripts_build.yml b/.github/workflows/modified_scripts_build.yml index e8367cd9..ffbf0ba7 100644 --- a/.github/workflows/modified_scripts_build.yml +++ b/.github/workflows/modified_scripts_build.yml @@ -7,7 +7,7 @@ jobs: versions: ${{steps.modified-versions.outputs.versions}} versions_cpython_only: ${{steps.modified-versions.outputs.versions_cpython_only}} steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - run: git fetch origin "$GITHUB_BASE_REF" - shell: bash run: > @@ -40,7 +40,7 @@ jobs: os: ["macos-14", "macos-15", "macos-15-intel"] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - run: | #envvars export PYENV_ROOT="$GITHUB_WORKSPACE" @@ -101,7 +101,7 @@ jobs: os: ["macos-14", "macos-15", "macos-15-intel"] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - run: | #envvars export PYENV_ROOT="$GITHUB_WORKSPACE" @@ -163,7 +163,7 @@ jobs: os: ["ubuntu-22.04", "ubuntu-24.04"] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - run: | #envvars export PYENV_ROOT="$GITHUB_WORKSPACE" @@ -222,7 +222,7 @@ jobs: os: ["ubuntu-latest"] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - run: | #envvars export PYENV_ROOT="$GITHUB_WORKSPACE" diff --git a/.github/workflows/pyenv_tests.yml b/.github/workflows/pyenv_tests.yml index 90972858..32694106 100644 --- a/.github/workflows/pyenv_tests.yml +++ b/.github/workflows/pyenv_tests.yml @@ -16,7 +16,7 @@ jobs: - macos-14 runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 # Normally, we would use the superbly maintained... # - uses: actions/setup-python@v2 # with: diff --git a/.github/workflows/ubuntu_build.yml b/.github/workflows/ubuntu_build.yml index ad3542eb..99bf5fc6 100644 --- a/.github/workflows/ubuntu_build.yml +++ b/.github/workflows/ubuntu_build.yml @@ -17,7 +17,7 @@ jobs: - "3.13" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 # Normally, we would use the superbly maintained... # - uses: actions/setup-python@v2 # with: From 94e4bf0ae8d14b12515e2b759cc72d47cad119d2 Mon Sep 17 00:00:00 2001 From: native-api Date: Mon, 1 Dec 2025 22:01:15 +0300 Subject: [PATCH 28/55] Fix "ld: symbol(s) not found" for some C system calls in MacOS if XCode is for a newer major MacOS version (#3362) Citing https://www.postgrespro.ru/list/id/E1kfzRR-0001EH-Ph@gemulon.postgresql.org fixing the same problem: We previously put the -isysroot switch only into CPPFLAGS, theorizing that it was only needed to find the right copies of include files. However, it seems that we also need to use it while linking programs, to find the right stub ".tbd" files for libraries. We got away without that up to now, but apparently that was mostly luck. It may also be that failures are only observed when the Xcode version is noticeably out of sync with the host macOS version; the case that's prompting action right now is that builds fail when using latest Xcode (12.2) on macOS Catalina, even though it's fine on Big Sur. Specifically, the problem arises for `preadv' and `pwritev' (new in MacOS 11 Big Sur) when building with XCode 12.4 (supporting Big Sur) in MacOS 10.15 Catalina. --- plugins/python-build/bin/python-build | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/python-build/bin/python-build b/plugins/python-build/bin/python-build index e62001dc..119b789c 100755 --- a/plugins/python-build/bin/python-build +++ b/plugins/python-build/bin/python-build @@ -1861,6 +1861,9 @@ use_xcode_sdk_zlib() { #distutils.unixcompiler and setup.py specifically search CFLAGS for "-isysroot" export CFLAGS="${CFLAGS:+$CFLAGS }-isysroot ${sdkroot}" + #while one can get away with adding it just to CFLAGS, this may cause linker failures + #if XCode is for a different major MacOS version (e.g. reported for XCode 12.4 on MacOS 10.15) + export LDFLAGS="${LDFLAGS:+$LDFLAGS }-isysroot ${sdkroot}" return 0 } From b230a338df74c4f3fc4551c22b737dd3180cfd48 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Tue, 2 Dec 2025 12:52:30 -0500 Subject: [PATCH 29/55] Add CPython 3.14.1 (#3363) --- plugins/python-build/share/python-build/3.14.1 | 10 ++++++++++ plugins/python-build/share/python-build/3.14.1t | 2 ++ 2 files changed, 12 insertions(+) create mode 100644 plugins/python-build/share/python-build/3.14.1 create mode 100644 plugins/python-build/share/python-build/3.14.1t diff --git a/plugins/python-build/share/python-build/3.14.1 b/plugins/python-build/share/python-build/3.14.1 new file mode 100644 index 00000000..37f2e8c7 --- /dev/null +++ b/plugins/python-build/share/python-build/3.14.1 @@ -0,0 +1,10 @@ +prefer_openssl3 +export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 +install_package "openssl-3.6.0" "https://github.com/openssl/openssl/releases/download/openssl-3.6.0/openssl-3.6.0.tar.gz#b6a5f44b7eb69e3fa35dbf15524405b44837a481d43d81daddde3ff21fcbb8e9" mac_openssl --if has_broken_mac_openssl +install_package "readline-8.3" "http://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.1" "https://www.python.org/ftp/python/3.14.1/Python-3.14.1.tar.xz#8dfa08b1959d9d15838a1c2dab77dc8d8ff4a553a1ed046dfacbc8095c6d42fc" standard verify_py314 copy_python_gdb ensurepip +else + install_package "Python-3.14.1" "https://www.python.org/ftp/python/3.14.1/Python-3.14.1.tgz#8343f001dede23812c7e9c6064f776bade2ef5813f46f0ae4b5a4c10c9069e9a" standard verify_py314 copy_python_gdb ensurepip +fi diff --git a/plugins/python-build/share/python-build/3.14.1t b/plugins/python-build/share/python-build/3.14.1t new file mode 100644 index 00000000..518be93e --- /dev/null +++ b/plugins/python-build/share/python-build/3.14.1t @@ -0,0 +1,2 @@ +export PYTHON_BUILD_FREE_THREADING=1 +source "${BASH_SOURCE[0]%t}" From d1ae7fd65dc3b88c6a756f1a301071da5bce8a31 Mon Sep 17 00:00:00 2001 From: Ivan Pozdeev Date: Tue, 2 Dec 2025 21:00:00 +0300 Subject: [PATCH 30/55] 2.6.14 --- CHANGELOG.md | 5 +++++ libexec/pyenv---version | 2 +- plugins/python-build/bin/python-build | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 28bf7bd4..ebf19400 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Version History +## Release v2.6.14 +* CI: Bump actions/checkout from 5 to 6 in the github-actions group by @dependabot[bot] in https://github.com/pyenv/pyenv/pull/3360 +* Fix "ld: symbol(s) not found" for C system calls in some MacOS versions if XCode is for a newer major MacOS version by @native-api in https://github.com/pyenv/pyenv/pull/3362 +* Add CPython 3.14.1 by @nedbat in https://github.com/pyenv/pyenv/pull/3363 + ## Release v2.6.13 * CI: Replace macos-13 with macos-15-intel by @edgarrmondragon in https://github.com/pyenv/pyenv/pull/3356 * Add Miniconda3-25.9.1-1 by @binbjz in https://github.com/pyenv/pyenv/pull/3357 diff --git a/libexec/pyenv---version b/libexec/pyenv---version index 3923359c..73c225fc 100755 --- a/libexec/pyenv---version +++ b/libexec/pyenv---version @@ -12,7 +12,7 @@ set -e [ -n "$PYENV_DEBUG" ] && set -x -version="2.6.13" +version="2.6.14" git_revision="" if cd "${BASH_SOURCE%/*}" 2>/dev/null && git remote -v 2>/dev/null | grep -q pyenv; then diff --git a/plugins/python-build/bin/python-build b/plugins/python-build/bin/python-build index 119b789c..1f51fb99 100755 --- a/plugins/python-build/bin/python-build +++ b/plugins/python-build/bin/python-build @@ -14,7 +14,7 @@ # -g/--debug Build a debug version # -PYTHON_BUILD_VERSION="2.6.13" +PYTHON_BUILD_VERSION="2.6.14" OLDIFS="$IFS" From a63e48cf7533cf145f2767c0aa66e348b2620698 Mon Sep 17 00:00:00 2001 From: John Sirois Date: Tue, 2 Dec 2025 18:21:46 -0600 Subject: [PATCH 31/55] Add CPython 3.13.10. (#3364) --- plugins/python-build/share/python-build/3.13.10 | 10 ++++++++++ plugins/python-build/share/python-build/3.13.10t | 2 ++ 2 files changed, 12 insertions(+) create mode 100644 plugins/python-build/share/python-build/3.13.10 create mode 100644 plugins/python-build/share/python-build/3.13.10t diff --git a/plugins/python-build/share/python-build/3.13.10 b/plugins/python-build/share/python-build/3.13.10 new file mode 100644 index 00000000..76306014 --- /dev/null +++ b/plugins/python-build/share/python-build/3.13.10 @@ -0,0 +1,10 @@ +prefer_openssl3 +export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 +install_package "openssl-3.6.0" "https://github.com/openssl/openssl/releases/download/openssl-3.6.0/openssl-3.6.0.tar.gz#b6a5f44b7eb69e3fa35dbf15524405b44837a481d43d81daddde3ff21fcbb8e9" mac_openssl --if has_broken_mac_openssl +install_package "readline-8.3" "http://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.10" "https://www.python.org/ftp/python/3.13.10/Python-3.13.10.tar.xz#bc673c04375a1a3f0808c27ba8f0411ab811ad390a8740318ccb9c60fad8fd77" standard verify_py313 copy_python_gdb ensurepip +else + install_package "Python-3.13.10" "https://www.python.org/ftp/python/3.13.10/Python-3.13.10.tgz#de5930852e95ba8c17b56548e04648470356ac47f7506014664f8f510d7bd61b" standard verify_py313 copy_python_gdb ensurepip +fi diff --git a/plugins/python-build/share/python-build/3.13.10t b/plugins/python-build/share/python-build/3.13.10t new file mode 100644 index 00000000..518be93e --- /dev/null +++ b/plugins/python-build/share/python-build/3.13.10t @@ -0,0 +1,2 @@ +export PYTHON_BUILD_FREE_THREADING=1 +source "${BASH_SOURCE[0]%t}" From 61d869f67e2b4c1d05c532821c5166a9ed40b0aa Mon Sep 17 00:00:00 2001 From: Ivan Pozdeev Date: Wed, 3 Dec 2025 03:23:17 +0300 Subject: [PATCH 32/55] 2.6.15 --- CHANGELOG.md | 3 +++ libexec/pyenv---version | 2 +- plugins/python-build/bin/python-build | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ebf19400..41830c01 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Version History +## Release v2.6.15 +* Add CPython 3.13.10 by @jsirois in https://github.com/pyenv/pyenv/pull/3364 + ## Release v2.6.14 * CI: Bump actions/checkout from 5 to 6 in the github-actions group by @dependabot[bot] in https://github.com/pyenv/pyenv/pull/3360 * Fix "ld: symbol(s) not found" for C system calls in some MacOS versions if XCode is for a newer major MacOS version by @native-api in https://github.com/pyenv/pyenv/pull/3362 diff --git a/libexec/pyenv---version b/libexec/pyenv---version index 73c225fc..568dfc69 100755 --- a/libexec/pyenv---version +++ b/libexec/pyenv---version @@ -12,7 +12,7 @@ set -e [ -n "$PYENV_DEBUG" ] && set -x -version="2.6.14" +version="2.6.15" git_revision="" if cd "${BASH_SOURCE%/*}" 2>/dev/null && git remote -v 2>/dev/null | grep -q pyenv; then diff --git a/plugins/python-build/bin/python-build b/plugins/python-build/bin/python-build index 1f51fb99..cf7b95c8 100755 --- a/plugins/python-build/bin/python-build +++ b/plugins/python-build/bin/python-build @@ -14,7 +14,7 @@ # -g/--debug Build a debug version # -PYTHON_BUILD_VERSION="2.6.14" +PYTHON_BUILD_VERSION="2.6.15" OLDIFS="$IFS" From 6f0e2d345858b7887dd3302d8f71d02d7413cd31 Mon Sep 17 00:00:00 2001 From: native-api Date: Fri, 5 Dec 2025 16:19:17 +0300 Subject: [PATCH 33/55] rehash: Fix hanging for 60 seconds when shims directory is not writable due to Linux Landlock (#3367) --- libexec/pyenv-rehash | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/libexec/pyenv-rehash b/libexec/pyenv-rehash index 6b0922ff..745cfb8e 100755 --- a/libexec/pyenv-rehash +++ b/libexec/pyenv-rehash @@ -35,7 +35,7 @@ release_lock() { } if [ ! -w "$SHIM_PATH" ]; then - echo "pyenv: cannot rehash: $SHIM_PATH isn't writable" + echo "pyenv: cannot rehash: $SHIM_PATH isn't writable" >&2 exit 1 fi @@ -46,15 +46,27 @@ while (( SECONDS <= start + ${PYENV_REHASH_TIMEOUT:-60} )); do acquired=1 break else + #Landlock sandbox subsystem in the Linux kernel returns false information in access() as of 6.14.0, + # making -w "$SHIM_PATH" not catch the fact that the shims dir is not writable in this case. + #Bash doesn't provide access to errno to check for non-EEXIST error code in acquire_lock. + #So check for writablity by trying to write to a different file, + # in a way that taxes the usual use case as little as possible. + if [[ -z $tested_for_other_write_errors ]]; then + ( t="$(mktemp -p "$SHIM_PATH")" && rm "$t" ) && tested_for_other_write_errors=1 || + { echo "pyenv: cannot rehash: $SHIM_PATH isnt writable" >&2; break; } + fi # POSIX sleep(1) doesn't provide subsecond precision, but many others do sleep 0.1 2>/dev/null || sleep 1 fi done if [ -z "${acquired}" ]; then - echo "pyenv: cannot rehash: $PROTOTYPE_SHIM_PATH exists" + if [[ -n $tested_for_other_write_errors ]]; then + echo "pyenv: cannot rehash: $PROTOTYPE_SHIM_PATH exists" >&2 + fi exit 1 fi +unset tested_for_other_write_errors # The prototype shim file is a script that re-execs itself, passing # its filename and any arguments to `pyenv exec`. This file is From 59204a6c89ff404cc26b6b378124b3b12491821d Mon Sep 17 00:00:00 2001 From: binbjz <8213913+binbjz@users.noreply.github.com> Date: Fri, 5 Dec 2025 22:26:32 +0800 Subject: [PATCH 34/55] Add Miniconda3-25.9.1-3 (#3368) Co-authored-by: binbjz --- .../python-build/miniconda3-3.10-25.9.1-3 | 19 +++++++++++++++++++ .../python-build/miniconda3-3.11-25.9.1-3 | 19 +++++++++++++++++++ .../python-build/miniconda3-3.12-25.9.1-3 | 19 +++++++++++++++++++ .../python-build/miniconda3-3.13-25.9.1-3 | 19 +++++++++++++++++++ .../python-build/miniconda3-3.9-25.9.1-3 | 19 +++++++++++++++++++ 5 files changed, 95 insertions(+) create mode 100644 plugins/python-build/share/python-build/miniconda3-3.10-25.9.1-3 create mode 100644 plugins/python-build/share/python-build/miniconda3-3.11-25.9.1-3 create mode 100644 plugins/python-build/share/python-build/miniconda3-3.12-25.9.1-3 create mode 100644 plugins/python-build/share/python-build/miniconda3-3.13-25.9.1-3 create mode 100644 plugins/python-build/share/python-build/miniconda3-3.9-25.9.1-3 diff --git a/plugins/python-build/share/python-build/miniconda3-3.10-25.9.1-3 b/plugins/python-build/share/python-build/miniconda3-3.10-25.9.1-3 new file mode 100644 index 00000000..68a3a28a --- /dev/null +++ b/plugins/python-build/share/python-build/miniconda3-3.10-25.9.1-3 @@ -0,0 +1,19 @@ +case "$(anaconda_architecture 2>/dev/null || true)" in +"Linux-aarch64" ) + install_script "Miniconda3-py310_25.9.1-3-Linux-aarch64" "https://repo.anaconda.com/miniconda/Miniconda3-py310_25.9.1-3-Linux-aarch64.sh#bc58460f17ec60d6c920d4352dd4d5e465aa22b56580bd4cd57c9693859761ec" "miniconda" verify_py310 + ;; +"Linux-x86_64" ) + install_script "Miniconda3-py310_25.9.1-3-Linux-x86_64" "https://repo.anaconda.com/miniconda/Miniconda3-py310_25.9.1-3-Linux-x86_64.sh#e4dea08f67e7093433c34d02b8947b093a902f1120b283758d5200bd92db594c" "miniconda" verify_py310 + ;; +"MacOSX-arm64" ) + install_script "Miniconda3-py310_25.9.1-3-MacOSX-arm64" "https://repo.anaconda.com/miniconda/Miniconda3-py310_25.9.1-3-MacOSX-arm64.sh#3b54f297df4c9f3e45ce692a87984e79d13761a45469d37e852a8b216215ccf0" "miniconda" verify_py310 + ;; +* ) + { echo + colorize 1 "ERROR" + echo ": The binary distribution of Miniconda is not available for $(anaconda_architecture 2>/dev/null || true)." + echo + } >&2 + exit 1 + ;; +esac diff --git a/plugins/python-build/share/python-build/miniconda3-3.11-25.9.1-3 b/plugins/python-build/share/python-build/miniconda3-3.11-25.9.1-3 new file mode 100644 index 00000000..89a94e06 --- /dev/null +++ b/plugins/python-build/share/python-build/miniconda3-3.11-25.9.1-3 @@ -0,0 +1,19 @@ +case "$(anaconda_architecture 2>/dev/null || true)" in +"Linux-aarch64" ) + install_script "Miniconda3-py311_25.9.1-3-Linux-aarch64" "https://repo.anaconda.com/miniconda/Miniconda3-py311_25.9.1-3-Linux-aarch64.sh#92a4df72178d87626072b39aca8fa4721f29d192ed0d70e268586f63b41f7657" "miniconda" verify_py311 + ;; +"Linux-x86_64" ) + install_script "Miniconda3-py311_25.9.1-3-Linux-x86_64" "https://repo.anaconda.com/miniconda/Miniconda3-py311_25.9.1-3-Linux-x86_64.sh#e331037f492848e68764b0c430912b2417b977d654706009ac8eb475e03ae0a2" "miniconda" verify_py311 + ;; +"MacOSX-arm64" ) + install_script "Miniconda3-py311_25.9.1-3-MacOSX-arm64" "https://repo.anaconda.com/miniconda/Miniconda3-py311_25.9.1-3-MacOSX-arm64.sh#6d92abcee72a7aa4de3694f718fbb523f261efdb5027c7448907b9cfd6507e89" "miniconda" verify_py311 + ;; +* ) + { echo + colorize 1 "ERROR" + echo ": The binary distribution of Miniconda is not available for $(anaconda_architecture 2>/dev/null || true)." + echo + } >&2 + exit 1 + ;; +esac diff --git a/plugins/python-build/share/python-build/miniconda3-3.12-25.9.1-3 b/plugins/python-build/share/python-build/miniconda3-3.12-25.9.1-3 new file mode 100644 index 00000000..c138464b --- /dev/null +++ b/plugins/python-build/share/python-build/miniconda3-3.12-25.9.1-3 @@ -0,0 +1,19 @@ +case "$(anaconda_architecture 2>/dev/null || true)" in +"Linux-aarch64" ) + install_script "Miniconda3-py312_25.9.1-3-Linux-aarch64" "https://repo.anaconda.com/miniconda/Miniconda3-py312_25.9.1-3-Linux-aarch64.sh#8c5c1d38011fed8053d7bdaaf7fab372c3f71dbb77791e07692fb8059b7828bd" "miniconda" verify_py312 + ;; +"Linux-x86_64" ) + install_script "Miniconda3-py312_25.9.1-3-Linux-x86_64" "https://repo.anaconda.com/miniconda/Miniconda3-py312_25.9.1-3-Linux-x86_64.sh#07fc00c146a481f7ae2657a31eb7ec0d5d77a107b981d58ab5d7cd8bc99be778" "miniconda" verify_py312 + ;; +"MacOSX-arm64" ) + install_script "Miniconda3-py312_25.9.1-3-MacOSX-arm64" "https://repo.anaconda.com/miniconda/Miniconda3-py312_25.9.1-3-MacOSX-arm64.sh#67108a40cca0ae1a59b74672341d94ed6641430e10371616426c31c2014e19b9" "miniconda" verify_py312 + ;; +* ) + { echo + colorize 1 "ERROR" + echo ": The binary distribution of Miniconda is not available for $(anaconda_architecture 2>/dev/null || true)." + echo + } >&2 + exit 1 + ;; +esac diff --git a/plugins/python-build/share/python-build/miniconda3-3.13-25.9.1-3 b/plugins/python-build/share/python-build/miniconda3-3.13-25.9.1-3 new file mode 100644 index 00000000..89d21ac4 --- /dev/null +++ b/plugins/python-build/share/python-build/miniconda3-3.13-25.9.1-3 @@ -0,0 +1,19 @@ +case "$(anaconda_architecture 2>/dev/null || true)" in +"Linux-aarch64" ) + install_script "Miniconda3-py313_25.9.1-3-Linux-aarch64" "https://repo.anaconda.com/miniconda/Miniconda3-py313_25.9.1-3-Linux-aarch64.sh#036053e7e6e5866435bc1a11711b41293e5bf0776bb4aa9a7ea46d01f30eda31" "miniconda" verify_py313 + ;; +"Linux-x86_64" ) + install_script "Miniconda3-py313_25.9.1-3-Linux-x86_64" "https://repo.anaconda.com/miniconda/Miniconda3-py313_25.9.1-3-Linux-x86_64.sh#6bec65fcb0c66596a5058c6767d25d89a537eb83ee84684ec0fa5a4fbfb32647" "miniconda" verify_py313 + ;; +"MacOSX-arm64" ) + install_script "Miniconda3-py313_25.9.1-3-MacOSX-arm64" "https://repo.anaconda.com/miniconda/Miniconda3-py313_25.9.1-3-MacOSX-arm64.sh#751b360885e8de7a350e3484542ccbfe7ff3d55cce794255167991dfa7ed79e1" "miniconda" verify_py313 + ;; +* ) + { echo + colorize 1 "ERROR" + echo ": The binary distribution of Miniconda is not available for $(anaconda_architecture 2>/dev/null || true)." + echo + } >&2 + exit 1 + ;; +esac diff --git a/plugins/python-build/share/python-build/miniconda3-3.9-25.9.1-3 b/plugins/python-build/share/python-build/miniconda3-3.9-25.9.1-3 new file mode 100644 index 00000000..d949df07 --- /dev/null +++ b/plugins/python-build/share/python-build/miniconda3-3.9-25.9.1-3 @@ -0,0 +1,19 @@ +case "$(anaconda_architecture 2>/dev/null || true)" in +"Linux-aarch64" ) + install_script "Miniconda3-py39_25.9.1-3-Linux-aarch64" "https://repo.anaconda.com/miniconda/Miniconda3-py39_25.9.1-3-Linux-aarch64.sh#2cf395401906b6968cfd2bc5b522ad4dca40374987e790c4daa83f049d132841" "miniconda" verify_py39 + ;; +"Linux-x86_64" ) + install_script "Miniconda3-py39_25.9.1-3-Linux-x86_64" "https://repo.anaconda.com/miniconda/Miniconda3-py39_25.9.1-3-Linux-x86_64.sh#0ac18f10d17ca918247b4606df82be38eba6e23380a7eddb25b47ef6ccdb920e" "miniconda" verify_py39 + ;; +"MacOSX-arm64" ) + install_script "Miniconda3-py39_25.9.1-3-MacOSX-arm64" "https://repo.anaconda.com/miniconda/Miniconda3-py39_25.9.1-3-MacOSX-arm64.sh#f05dcd060e3915a0a3a9dece324d2eb88268fa251fff2fb63d48e232c5fab510" "miniconda" verify_py39 + ;; +* ) + { echo + colorize 1 "ERROR" + echo ": The binary distribution of Miniconda is not available for $(anaconda_architecture 2>/dev/null || true)." + echo + } >&2 + exit 1 + ;; +esac From 0f7b8fa8eebed0379b2672e44ffceb22a19dd541 Mon Sep 17 00:00:00 2001 From: native-api Date: Fri, 5 Dec 2025 20:42:25 +0300 Subject: [PATCH 35/55] sh-rehash: Fix erroneously executing rather than printing a command (#3369) --- libexec/pyenv-sh-rehash | 2 +- test/rehash.bats | 18 ++++++++++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/libexec/pyenv-sh-rehash b/libexec/pyenv-sh-rehash index ab50346d..470eda07 100755 --- a/libexec/pyenv-sh-rehash +++ b/libexec/pyenv-sh-rehash @@ -11,7 +11,7 @@ shell="$(basename "${PYENV_SHELL:-$SHELL}")" # When pyenv shell integration is enabled, delegate to pyenv-rehash, # then tell the shell to empty its command lookup cache. -pyenv-rehash +echo "pyenv-rehash" case "$shell" in fish ) diff --git a/test/rehash.bats b/test/rehash.bats index 8afe87e6..5505a7d8 100755 --- a/test/rehash.bats +++ b/test/rehash.bats @@ -110,13 +110,27 @@ SH @test "sh-rehash in bash" { create_executable "3.4" "python" PYENV_SHELL=bash run pyenv-sh-rehash - assert_success "hash -r 2>/dev/null || true" + assert_success "pyenv-rehash +hash -r 2>/dev/null || true" +} + +@test "sh-rehash in bash (integration)" { + create_executable "3.4" "python" + run eval "$(pyenv-sh-rehash)" + assert_success assert [ -x "${PYENV_ROOT}/shims/python" ] } @test "sh-rehash in fish" { create_executable "3.4" "python" PYENV_SHELL=fish run pyenv-sh-rehash - assert_success "" + assert_success "pyenv-rehash" +} + +@test "sh-rehash in fish (integration)" { + command -v fish >/dev/null || skip "-- fish not installed" + create_executable "3.4" "python" + run fish -Nc "eval (pyenv-sh-rehash)" + assert_success assert [ -x "${PYENV_ROOT}/shims/python" ] } From a6ea5b3179a7e4760092ee0f469b5e9566befc90 Mon Sep 17 00:00:00 2001 From: Ivan Pozdeev Date: Fri, 5 Dec 2025 20:57:07 +0300 Subject: [PATCH 36/55] Fix rehash --- libexec/pyenv-sh-rehash | 2 +- test/rehash.bats | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libexec/pyenv-sh-rehash b/libexec/pyenv-sh-rehash index 470eda07..35a4992b 100755 --- a/libexec/pyenv-sh-rehash +++ b/libexec/pyenv-sh-rehash @@ -11,7 +11,7 @@ shell="$(basename "${PYENV_SHELL:-$SHELL}")" # When pyenv shell integration is enabled, delegate to pyenv-rehash, # then tell the shell to empty its command lookup cache. -echo "pyenv-rehash" +echo "command pyenv rehash" case "$shell" in fish ) diff --git a/test/rehash.bats b/test/rehash.bats index 5505a7d8..860d9d79 100755 --- a/test/rehash.bats +++ b/test/rehash.bats @@ -110,7 +110,7 @@ SH @test "sh-rehash in bash" { create_executable "3.4" "python" PYENV_SHELL=bash run pyenv-sh-rehash - assert_success "pyenv-rehash + assert_success "command pyenv rehash hash -r 2>/dev/null || true" } @@ -124,7 +124,7 @@ hash -r 2>/dev/null || true" @test "sh-rehash in fish" { create_executable "3.4" "python" PYENV_SHELL=fish run pyenv-sh-rehash - assert_success "pyenv-rehash" + assert_success "command pyenv rehash" } @test "sh-rehash in fish (integration)" { From 6cbce8616ea87565df922e7fe783040a728447ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9sar=20Rom=C3=A1n?= Date: Fri, 5 Dec 2025 13:56:17 -0800 Subject: [PATCH 37/55] Add CPython 3.13.11, 3.14.2 (#3370) --- plugins/python-build/share/python-build/3.13.11 | 10 ++++++++++ plugins/python-build/share/python-build/3.13.11t | 2 ++ plugins/python-build/share/python-build/3.14.2 | 10 ++++++++++ plugins/python-build/share/python-build/3.14.2t | 2 ++ 4 files changed, 24 insertions(+) create mode 100644 plugins/python-build/share/python-build/3.13.11 create mode 100644 plugins/python-build/share/python-build/3.13.11t create mode 100644 plugins/python-build/share/python-build/3.14.2 create mode 100644 plugins/python-build/share/python-build/3.14.2t diff --git a/plugins/python-build/share/python-build/3.13.11 b/plugins/python-build/share/python-build/3.13.11 new file mode 100644 index 00000000..debfba0d --- /dev/null +++ b/plugins/python-build/share/python-build/3.13.11 @@ -0,0 +1,10 @@ +prefer_openssl3 +export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 +install_package "openssl-3.6.0" "https://github.com/openssl/openssl/releases/download/openssl-3.6.0/openssl-3.6.0.tar.gz#b6a5f44b7eb69e3fa35dbf15524405b44837a481d43d81daddde3ff21fcbb8e9" mac_openssl --if has_broken_mac_openssl +install_package "readline-8.3" "http://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.11" "https://www.python.org/ftp/python/3.13.11/Python-3.13.11.tar.xz#16ede7bb7cdbfa895d11b0642fa0e523f291e6487194d53cf6d3b338c3a17ea2" standard verify_py313 copy_python_gdb ensurepip +else + install_package "Python-3.13.11" "https://www.python.org/ftp/python/3.13.11/Python-3.13.11.tgz#03cfedbe06ce21bc44ce09245e091a77f2fee9ec9be5c52069048a181300b202" standard verify_py313 copy_python_gdb ensurepip +fi diff --git a/plugins/python-build/share/python-build/3.13.11t b/plugins/python-build/share/python-build/3.13.11t new file mode 100644 index 00000000..518be93e --- /dev/null +++ b/plugins/python-build/share/python-build/3.13.11t @@ -0,0 +1,2 @@ +export PYTHON_BUILD_FREE_THREADING=1 +source "${BASH_SOURCE[0]%t}" diff --git a/plugins/python-build/share/python-build/3.14.2 b/plugins/python-build/share/python-build/3.14.2 new file mode 100644 index 00000000..39a6379f --- /dev/null +++ b/plugins/python-build/share/python-build/3.14.2 @@ -0,0 +1,10 @@ +prefer_openssl3 +export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 +install_package "openssl-3.6.0" "https://github.com/openssl/openssl/releases/download/openssl-3.6.0/openssl-3.6.0.tar.gz#b6a5f44b7eb69e3fa35dbf15524405b44837a481d43d81daddde3ff21fcbb8e9" mac_openssl --if has_broken_mac_openssl +install_package "readline-8.3" "http://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.2" "https://www.python.org/ftp/python/3.14.2/Python-3.14.2.tar.xz#ce543ab854bc256b61b71e9b27f831ffd1bfd60a479d639f8be7f9757cf573e9" standard verify_py314 copy_python_gdb ensurepip +else + install_package "Python-3.14.2" "https://www.python.org/ftp/python/3.14.2/Python-3.14.2.tgz#c609e078adab90e2c6bacb6afafacd5eaf60cd94cf670f1e159565725fcd448d" standard verify_py314 copy_python_gdb ensurepip +fi diff --git a/plugins/python-build/share/python-build/3.14.2t b/plugins/python-build/share/python-build/3.14.2t new file mode 100644 index 00000000..518be93e --- /dev/null +++ b/plugins/python-build/share/python-build/3.14.2t @@ -0,0 +1,2 @@ +export PYTHON_BUILD_FREE_THREADING=1 +source "${BASH_SOURCE[0]%t}" From e805257c1fe4939da131a6aefa0915a4859f2f8e Mon Sep 17 00:00:00 2001 From: Ivan Pozdeev Date: Sat, 6 Dec 2025 00:58:03 +0300 Subject: [PATCH 38/55] 2.6.16 --- CHANGELOG.md | 6 ++++++ libexec/pyenv---version | 2 +- plugins/python-build/bin/python-build | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 41830c01..1b0a5b30 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Version History +## Release v2.6.16 +* rehash: Fix hanging for 60 seconds when shims directory is not writable due to Linux Landlock by @native-api in https://github.com/pyenv/pyenv/pull/3367 +* Add Miniconda3-25.9.1-3 by @binbjz in https://github.com/pyenv/pyenv/pull/3368 +* sh-rehash: Fix erroneously executing rather than printing a command by @native-api in https://github.com/pyenv/pyenv/pull/3369 +* Add CPython 3.13.11, 3.14.2 by @cesarcoatl in https://github.com/pyenv/pyenv/pull/3370 + ## Release v2.6.15 * Add CPython 3.13.10 by @jsirois in https://github.com/pyenv/pyenv/pull/3364 diff --git a/libexec/pyenv---version b/libexec/pyenv---version index 568dfc69..5806df3e 100755 --- a/libexec/pyenv---version +++ b/libexec/pyenv---version @@ -12,7 +12,7 @@ set -e [ -n "$PYENV_DEBUG" ] && set -x -version="2.6.15" +version="2.6.16" git_revision="" if cd "${BASH_SOURCE%/*}" 2>/dev/null && git remote -v 2>/dev/null | grep -q pyenv; then diff --git a/plugins/python-build/bin/python-build b/plugins/python-build/bin/python-build index cf7b95c8..752ae2a0 100755 --- a/plugins/python-build/bin/python-build +++ b/plugins/python-build/bin/python-build @@ -14,7 +14,7 @@ # -g/--debug Build a debug version # -PYTHON_BUILD_VERSION="2.6.15" +PYTHON_BUILD_VERSION="2.6.16" OLDIFS="$IFS" From bdb050822021b8dfeef9bdb37d6515e8098b04b8 Mon Sep 17 00:00:00 2001 From: Jonathan Stein Date: Tue, 9 Dec 2025 12:18:20 -0600 Subject: [PATCH 39/55] Update requirements for the add_miniconda script At least under Python 3.14, this quickly fails without lxml[html_clean] installed explicitly. --- plugins/python-build/scripts/requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/python-build/scripts/requirements.txt b/plugins/python-build/scripts/requirements.txt index a8fdb314..995ee355 100644 --- a/plugins/python-build/scripts/requirements.txt +++ b/plugins/python-build/scripts/requirements.txt @@ -1 +1,2 @@ requests-html +lxml[html_clean] From 70294ef6f12be1a91b353dccf5c78b26f5525a9c Mon Sep 17 00:00:00 2001 From: Jonathan Stein Date: Tue, 9 Dec 2025 12:23:51 -0600 Subject: [PATCH 40/55] Add miniforge3 25.9.1-0, 25.11.0-1 Adds latest miniforge releases 25.9.1-0, 25.11.0-1. Skips 25.11.0-0 due to a regression reported in the release notes of miniforge3-25.11.0-1. Ref: https://github.com/conda-forge/miniforge/releases/tag/25.11.0-1 --- plugins/python-build/scripts/add_miniforge.py | 1 + .../share/python-build/miniforge3-25.11.0-1 | 25 +++++++++++++++++++ .../share/python-build/miniforge3-25.9.1-0 | 25 +++++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 plugins/python-build/share/python-build/miniforge3-25.11.0-1 create mode 100644 plugins/python-build/share/python-build/miniforge3-25.9.1-0 diff --git a/plugins/python-build/scripts/add_miniforge.py b/plugins/python-build/scripts/add_miniforge.py index d60c5036..3003605c 100755 --- a/plugins/python-build/scripts/add_miniforge.py +++ b/plugins/python-build/scripts/add_miniforge.py @@ -20,6 +20,7 @@ SKIPPED_RELEASES = [ '22.11.1-1', #MacOS packages are broken (have broken dep tarballs, downloading them fails with 403) '22.11.1-2', #MacOS packages are broken (have broken dep tarballs, downloading them fails with 403) '25.3.0-0', #marked as prerelease, no Linux version + '25.11.0-0', #regression reported in constructor, re-released as 25.11.0-1 with hotfix bumping to constructor>=3.14 (was >=3.12, 3.13 implicit) ] install_script_fmt = """ diff --git a/plugins/python-build/share/python-build/miniforge3-25.11.0-1 b/plugins/python-build/share/python-build/miniforge3-25.11.0-1 new file mode 100644 index 00000000..a5390824 --- /dev/null +++ b/plugins/python-build/share/python-build/miniforge3-25.11.0-1 @@ -0,0 +1,25 @@ +case "$(anaconda_architecture 2>/dev/null || true)" in +"Linux-aarch64" ) + install_script "Miniforge3-25.11.0-1-Linux-aarch64.sh" "https://github.com/conda-forge/miniforge/releases/download/25.11.0-1/Miniforge3-25.11.0-1-Linux-aarch64.sh#43a3783f9e121088f1c92b131b4305b9ebf159424ad2543dfcfc0f1952b5e127" "miniconda" verify_py312 + ;; +"Linux-ppc64le" ) + install_script "Miniforge3-25.11.0-1-Linux-ppc64le.sh" "https://github.com/conda-forge/miniforge/releases/download/25.11.0-1/Miniforge3-25.11.0-1-Linux-ppc64le.sh#8fb7a41bd2682381c48c7820608918e7d56f5390bc3be5705a0c1c536f607963" "miniconda" verify_py312 + ;; +"Linux-x86_64" ) + install_script "Miniforge3-25.11.0-1-Linux-x86_64.sh" "https://github.com/conda-forge/miniforge/releases/download/25.11.0-1/Miniforge3-25.11.0-1-Linux-x86_64.sh#be1bad9d4e67a8753eb76fb4940e9a08036786675c7adf060627e55791bf110d" "miniconda" verify_py312 + ;; +"MacOSX-arm64" ) + install_script "Miniforge3-25.11.0-1-MacOSX-arm64.sh" "https://github.com/conda-forge/miniforge/releases/download/25.11.0-1/Miniforge3-25.11.0-1-MacOSX-arm64.sh#b4992687abec8c4863fc079382509f0e07e4221fb9e185d7f6a3860449b4e46d" "miniconda" verify_py312 + ;; +"MacOSX-x86_64" ) + install_script "Miniforge3-25.11.0-1-MacOSX-x86_64.sh" "https://github.com/conda-forge/miniforge/releases/download/25.11.0-1/Miniforge3-25.11.0-1-MacOSX-x86_64.sh#7b78e8d20557fcc946585290a6177dc3d2e7d1b07f382175aad24b6355b21832" "miniconda" verify_py312 + ;; +* ) + { echo + colorize 1 "ERROR" + echo ": The binary distribution of Miniforge is not available for $(anaconda_architecture 2>/dev/null || true)." + echo + } >&2 + exit 1 + ;; +esac diff --git a/plugins/python-build/share/python-build/miniforge3-25.9.1-0 b/plugins/python-build/share/python-build/miniforge3-25.9.1-0 new file mode 100644 index 00000000..9c59b23c --- /dev/null +++ b/plugins/python-build/share/python-build/miniforge3-25.9.1-0 @@ -0,0 +1,25 @@ +case "$(anaconda_architecture 2>/dev/null || true)" in +"Linux-aarch64" ) + install_script "Miniforge3-25.9.1-0-Linux-aarch64.sh" "https://github.com/conda-forge/miniforge/releases/download/25.9.1-0/Miniforge3-25.9.1-0-Linux-aarch64.sh#b2b223680807e8f407b67603f6a5a224452b7f0ce177bc6719f870040c3bfa98" "miniconda" verify_py312 + ;; +"Linux-ppc64le" ) + install_script "Miniforge3-25.9.1-0-Linux-ppc64le.sh" "https://github.com/conda-forge/miniforge/releases/download/25.9.1-0/Miniforge3-25.9.1-0-Linux-ppc64le.sh#89a6b1b761a94396921967939cfc0881efe08bda48fe9b40bbf4a134f8fcdd84" "miniconda" verify_py312 + ;; +"Linux-x86_64" ) + install_script "Miniforge3-25.9.1-0-Linux-x86_64.sh" "https://github.com/conda-forge/miniforge/releases/download/25.9.1-0/Miniforge3-25.9.1-0-Linux-x86_64.sh#07f64c1d908ae036e9f6a81f97704899311c0ae677d83980d664b9781d4cc5fc" "miniconda" verify_py312 + ;; +"MacOSX-arm64" ) + install_script "Miniforge3-25.9.1-0-MacOSX-arm64.sh" "https://github.com/conda-forge/miniforge/releases/download/25.9.1-0/Miniforge3-25.9.1-0-MacOSX-arm64.sh#414e21f6094fbf6cd69ad50c47d4630b5523e6b53fd6ff7df5fd9d0ee502eeff" "miniconda" verify_py312 + ;; +"MacOSX-x86_64" ) + install_script "Miniforge3-25.9.1-0-MacOSX-x86_64.sh" "https://github.com/conda-forge/miniforge/releases/download/25.9.1-0/Miniforge3-25.9.1-0-MacOSX-x86_64.sh#f12e25c92c9942219b6dd42d3cf0a2513d337b37d2954a8a84bee3d859632f41" "miniconda" verify_py312 + ;; +* ) + { echo + colorize 1 "ERROR" + echo ": The binary distribution of Miniforge is not available for $(anaconda_architecture 2>/dev/null || true)." + echo + } >&2 + exit 1 + ;; +esac From 4e7626721a66d66ac5ccd0acd6c2ce7cb8471f34 Mon Sep 17 00:00:00 2001 From: Ivan Pozdeev Date: Sat, 13 Dec 2025 17:22:12 +0300 Subject: [PATCH 41/55] Delete the old issue template [no ci] --- .github/ISSUE_TEMPLATE.md | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE.md diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index 4097601a..00000000 --- a/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,26 +0,0 @@ -Too many issues will kill our team's development velocity, drastically. -Make sure you have checked all steps below. - -### Prerequisite -* [ ] Make sure your problem is not listed in [the common build problems](https://github.com/pyenv/pyenv/wiki/Common-build-problems). -* [ ] Make sure no duplicated issue has already been reported in [the pyenv issues](https://github.com/pyenv/pyenv/issues). You should look for closed issues, too. -* [ ] Make sure you are not asking us to help solving your specific issue. - * GitHub issues is opened mainly for development purposes. If you want to ask someone to help solving your problem, go to some community site like [Gitter](https://gitter.im/yyuu/pyenv), [StackOverflow](https://stackoverflow.com/questions/tagged/pyenv), etc. -* [ ] Make sure your problem is not derived from packaging (e.g. [Homebrew](https://brew.sh)). - * Please refer to the package documentation for the installation issues, etc. -* [ ] Make sure your problem is not derived from plugins. - * This repository is maintaining `pyenv` and the default `python-build` plugin only. Please refrain from reporting issues of other plugins here. - -### Description -- [ ] Platform information (e.g. Ubuntu Linux 16.04): -- [ ] OS architecture (e.g. amd64): -- [ ] pyenv version: -- [ ] Python version: -- [ ] C Compiler information (e.g. gcc 7.3): -- [ ] Please attach the debug trace of the failing command as a gist: - * Run `env PYENV_DEBUG=1 2>&1 | tee trace.log` and attach `trace.log`. E.g. if you have a problem with installing Python, run `env PYENV_DEBUG=1 pyenv install -v 2>&1 | tee trace.log` (note the `-v` option to `pyenv install`). -- [ ] If you have a problem with installing Python, please also attach `config.log` from the build directory - * The build directory is reported after the "BUILD FAILED" message and is usually under `/tmp`. -- [ ] If the build succeeds but the problem is still with the build process (e.g. the resulting Python is missing a feature), please attach - * the debug trace from reinstalling the faulty version with `env PYENV_DEBUG=1 pyenv install -f -k -v 2>&1 | tee trace.log` - * `config.log` from the build directory. When using `pyenv install` with `-k` as per above, the build directory will be under `$PYENV_ROOT/sources`. From 293798582a905c4225d0222eaf048f353e600bb8 Mon Sep 17 00:00:00 2001 From: Ivan Pozdeev Date: Sat, 13 Dec 2025 17:51:26 +0300 Subject: [PATCH 42/55] CI: build: - EOL 3.9, + 3.13 --- .github/workflows/macos_build.yml | 2 +- .github/workflows/ubuntu_build.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/macos_build.yml b/.github/workflows/macos_build.yml index 543b46d9..60cc840c 100644 --- a/.github/workflows/macos_build.yml +++ b/.github/workflows/macos_build.yml @@ -10,11 +10,11 @@ jobs: fail-fast: false matrix: python-version: - - "3.9" - "3.10" - "3.11" - "3.12" - "3.13" + - "3.14" runs-on: macos-latest steps: - uses: actions/checkout@v6 diff --git a/.github/workflows/ubuntu_build.yml b/.github/workflows/ubuntu_build.yml index 99bf5fc6..00a7ffac 100644 --- a/.github/workflows/ubuntu_build.yml +++ b/.github/workflows/ubuntu_build.yml @@ -10,11 +10,11 @@ jobs: fail-fast: false matrix: python-version: - - "3.9" - "3.10" - "3.11" - "3.12" - "3.13" + - "3.14" runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 From f19fe0f2be6014304cad03bd2ecb57a6a2f9c7d8 Mon Sep 17 00:00:00 2001 From: Ivan Pozdeev Date: Sat, 13 Dec 2025 17:51:51 +0300 Subject: [PATCH 43/55] CI: tests: + macos-15 --- .github/workflows/pyenv_tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pyenv_tests.yml b/.github/workflows/pyenv_tests.yml index 32694106..2f55b51d 100644 --- a/.github/workflows/pyenv_tests.yml +++ b/.github/workflows/pyenv_tests.yml @@ -13,6 +13,7 @@ jobs: - ubuntu-24.04 - ubuntu-22.04 - macos-15-intel + - macos-15 - macos-14 runs-on: ${{ matrix.os }} steps: From 9b85239875593d6cdbea230bb7fdddcf7974d9fe Mon Sep 17 00:00:00 2001 From: Ivan Pozdeev Date: Sat, 13 Dec 2025 17:52:53 +0300 Subject: [PATCH 44/55] CI: - commented-out code --- .github/workflows/macos_build.yml | 5 ----- .github/workflows/pyenv_tests.yml | 10 ---------- .github/workflows/ubuntu_build.yml | 5 ----- 3 files changed, 20 deletions(-) diff --git a/.github/workflows/macos_build.yml b/.github/workflows/macos_build.yml index 60cc840c..7223278c 100644 --- a/.github/workflows/macos_build.yml +++ b/.github/workflows/macos_build.yml @@ -18,11 +18,6 @@ jobs: runs-on: macos-latest steps: - uses: actions/checkout@v6 - # Normally, we would use the superbly maintained... - # - uses: actions/setup-python@v2 - # with: - # python-version: ${{ matrix.python-version }} - # ... but in the repo, we want to test pyenv builds on macOS - run: | brew install openssl readline sqlite3 xz tcl-tk@8 libb2 zstd # https://github.com/pyenv/pyenv#installation diff --git a/.github/workflows/pyenv_tests.yml b/.github/workflows/pyenv_tests.yml index 2f55b51d..8e8794d5 100644 --- a/.github/workflows/pyenv_tests.yml +++ b/.github/workflows/pyenv_tests.yml @@ -18,16 +18,6 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v6 - # Normally, we would use the superbly maintained... - # - uses: actions/setup-python@v2 - # with: - # python-version: ${{ matrix.python-version }} - # ... but in the repo, we want to test pyenv builds on Ubuntu - # - run: | - # sudo apt-get install -y build-essential libssl-dev zlib1g-dev libbz2-dev \ - # libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \ - # xz-utils tk-dev libffi-dev liblzma-dev python-openssl git - # https://github.com/pyenv/pyenv#installation - run: | if test "$RUNNER_OS" == "macOS"; then brew install coreutils fish diff --git a/.github/workflows/ubuntu_build.yml b/.github/workflows/ubuntu_build.yml index 00a7ffac..9ba4513d 100644 --- a/.github/workflows/ubuntu_build.yml +++ b/.github/workflows/ubuntu_build.yml @@ -18,11 +18,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - # Normally, we would use the superbly maintained... - # - uses: actions/setup-python@v2 - # with: - # python-version: ${{ matrix.python-version }} - # ... but in the repo, we want to test pyenv builds on Ubuntu - run: | sudo apt-get update -q; sudo apt install -yq make build-essential libssl-dev zlib1g-dev \ libbz2-dev libreadline-dev libsqlite3-dev curl \ From 4b33cb68b6b14b2017f48b339cf3dc7561135a82 Mon Sep 17 00:00:00 2001 From: Ivan Pozdeev Date: Sat, 13 Dec 2025 18:04:15 +0300 Subject: [PATCH 45/55] CI: - Micropython-specific code from CPython-only branches --- .github/workflows/modified_scripts_build.yml | 62 +++++++------------- 1 file changed, 20 insertions(+), 42 deletions(-) diff --git a/.github/workflows/modified_scripts_build.yml b/.github/workflows/modified_scripts_build.yml index ffbf0ba7..71dd3cb3 100644 --- a/.github/workflows/modified_scripts_build.yml +++ b/.github/workflows/modified_scripts_build.yml @@ -121,33 +121,22 @@ jobs: pyenv --debug install ${{ matrix.python-version }} && rc=$? || rc=$? if [[ $rc -ne 0 ]]; then echo config.log:; cat $TMPDIR/python-build*/*/config.log; false; fi pyenv global ${{ matrix.python-version }} - # Micropython doesn't support --version - run: | #print version - if [[ "${{ matrix.python-version }}" == "micropython-"* ]]; then - python -c 'import sys; print(sys.version)' - else - python --version - python -m pip --version - fi - # Micropython doesn't support sys.executable, os.path, older versions even os + python --version + python -m pip --version - env: EXPECTED_PYTHON: ${{ matrix.python-version }} run: | #check - if [[ "${{ matrix.python-version }}" == "micropython-"* ]]; then - [[ $(pyenv which python) == "${{ env.PYENV_ROOT }}/versions/${{ matrix.python-version }}/bin/python" ]] || exit 1 - python -c 'import sys; assert sys.implementation.name == "micropython"' - else - python -c 'if True: - import os, sys, os.path - correct_dir = os.path.join( - os.environ["PYENV_ROOT"], - "versions", - os.environ["EXPECTED_PYTHON"], - "bin") - assert os.path.dirname(sys.executable) == correct_dir' - fi + python -c 'if True: + import os, sys, os.path + correct_dir = os.path.join( + os.environ["PYENV_ROOT"], + "versions", + os.environ["EXPECTED_PYTHON"], + "bin") + assert os.path.dirname(sys.executable) == correct_dir' # bundled executables in some Anaconda releases cause the post-run step to hang in MacOS - run: | pyenv global system @@ -245,30 +234,19 @@ jobs: pyenv --debug install ${{ matrix.python-version }} && rc=$? || rc=$? if [[ $rc -ne 0 ]]; then echo config.log:; cat $TMPDIR/python-build*/*/config.log; false; fi pyenv global ${{ matrix.python-version }} - # Micropython doesn't support --version - run: | #print version - if [[ "${{ matrix.python-version }}" == "micropython-"* ]]; then - python -c 'import sys; print(sys.version)' - else - python --version - python -m pip --version - fi - # Micropython doesn't support sys.executable, os.path, older versions even os + python --version + python -m pip --version - env: EXPECTED_PYTHON: ${{ matrix.python-version }} run: | #check - if [[ "${{ matrix.python-version }}" == "micropython-"* ]]; then - [[ $(pyenv which python) == "${{ env.PYENV_ROOT }}/versions/${{ matrix.python-version }}/bin/python" ]] || exit 1 - python -c 'import sys; assert sys.implementation.name == "micropython"' - else - python -c 'if True: - import os, sys, os.path - correct_dir = os.path.join( - os.environ["PYENV_ROOT"], - "versions", - os.environ["EXPECTED_PYTHON"], - "bin") - assert os.path.dirname(sys.executable) == correct_dir' - fi + python -c 'if True: + import os, sys, os.path + correct_dir = os.path.join( + os.environ["PYENV_ROOT"], + "versions", + os.environ["EXPECTED_PYTHON"], + "bin") + assert os.path.dirname(sys.executable) == correct_dir' From dabaa901e9352e9250f6c1be029789d532161ccd Mon Sep 17 00:00:00 2001 From: Ivan Pozdeev Date: Sat, 13 Dec 2025 18:07:37 +0300 Subject: [PATCH 46/55] CI: - Ubuntu 18.04 workaround --- .github/workflows/pyenv_tests.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/pyenv_tests.yml b/.github/workflows/pyenv_tests.yml index 8e8794d5..f9e10924 100644 --- a/.github/workflows/pyenv_tests.yml +++ b/.github/workflows/pyenv_tests.yml @@ -21,9 +21,6 @@ jobs: - run: | if test "$RUNNER_OS" == "macOS"; then brew install coreutils fish - elif [[ $(lsb_release -sr | awk -F. '{print $1}') -ge 20 ]]; then - # Ubuntu 18 has fish 2 which lacks many features that facilitate testing - sudo apt install fish -yq fi - run: pwd - env: From 91931a4dd92a0a35ccd4310165cc5b2eb534c61c Mon Sep 17 00:00:00 2001 From: native-api Date: Sun, 14 Dec 2025 22:48:46 +0300 Subject: [PATCH 47/55] miniconda3-latest: auto accept TOS (#3373) Since 14.07.2025, Anaconda requires accepting the new TOS upon installation that limit eligibility for free use --- plugins/python-build/share/python-build/miniconda3-latest | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/python-build/share/python-build/miniconda3-latest b/plugins/python-build/share/python-build/miniconda3-latest index edae3746..fc331a96 100644 --- a/plugins/python-build/share/python-build/miniconda3-latest +++ b/plugins/python-build/share/python-build/miniconda3-latest @@ -1,3 +1,4 @@ +export CONDA_PLUGINS_AUTO_ACCEPT_TOS=true case "$(anaconda_architecture 2>/dev/null || true)" in "Linux-x86" ) install_script "Miniconda3-latest-Linux-x86" "https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86.sh" "miniconda" verify_py3_latest From b50afe69a87c9715149fecc9fcedc93eae84f50d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez=20Mondrag=C3=B3n?= Date: Tue, 16 Dec 2025 14:28:46 -0600 Subject: [PATCH 48/55] Add CPython 3.15.0a3 (#3374) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Edgar Ramírez-Mondragón --- .../python-build/share/python-build/{3.15.0a2 => 3.15.0a3} | 4 ++-- .../python-build/share/python-build/{3.15.0a2t => 3.15.0a3t} | 0 2 files changed, 2 insertions(+), 2 deletions(-) rename plugins/python-build/share/python-build/{3.15.0a2 => 3.15.0a3} (61%) rename plugins/python-build/share/python-build/{3.15.0a2t => 3.15.0a3t} (100%) diff --git a/plugins/python-build/share/python-build/3.15.0a2 b/plugins/python-build/share/python-build/3.15.0a3 similarity index 61% rename from plugins/python-build/share/python-build/3.15.0a2 rename to plugins/python-build/share/python-build/3.15.0a3 index 6d5a2847..d4f07bba 100644 --- a/plugins/python-build/share/python-build/3.15.0a2 +++ b/plugins/python-build/share/python-build/3.15.0a3 @@ -4,7 +4,7 @@ export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 install_package "openssl-3.6.0" "https://github.com/openssl/openssl/releases/download/openssl-3.6.0/openssl-3.6.0.tar.gz#b6a5f44b7eb69e3fa35dbf15524405b44837a481d43d81daddde3ff21fcbb8e9" 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.15.0a2" "https://www.python.org/ftp/python/3.15.0/Python-3.15.0a2.tar.xz#d8a0a2f4a7f3d7090cf195e81814efe95f70554955557f40e149d8694a662751" standard verify_py315 copy_python_gdb ensurepip + install_package "Python-3.15.0a3" "https://www.python.org/ftp/python/3.15.0/Python-3.15.0a3.tar.xz#6ab02cdac24505779877bb1d9189432d67e90ddf2a9b8b7b373ead54ac07b607" standard verify_py315 copy_python_gdb ensurepip else - install_package "Python-3.15.0a2" "https://www.python.org/ftp/python/3.15.0/Python-3.15.0a2.tgz#484924d5f963f3d4215ca50c13634b6a7067e9f273893145a6209fe7c93b78ff" standard verify_py315 copy_python_gdb ensurepip + install_package "Python-3.15.0a3" "https://www.python.org/ftp/python/3.15.0/Python-3.15.0a3.tgz#a8afd71361baf8f02f459a4ab9b73eb4cdf2895991218b8418cf7ba49c96bef7" standard verify_py315 copy_python_gdb ensurepip fi diff --git a/plugins/python-build/share/python-build/3.15.0a2t b/plugins/python-build/share/python-build/3.15.0a3t similarity index 100% rename from plugins/python-build/share/python-build/3.15.0a2t rename to plugins/python-build/share/python-build/3.15.0a3t From 22b192913e9f14e1a56eb627147dcc7bae137a63 Mon Sep 17 00:00:00 2001 From: Ivan Pozdeev Date: Tue, 16 Dec 2025 23:30:42 +0300 Subject: [PATCH 49/55] 2.6.17 --- CHANGELOG.md | 5 +++++ libexec/pyenv---version | 2 +- plugins/python-build/bin/python-build | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b0a5b30..fd74e1c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Version History +## Release v2.6.17 +* Add miniforge 25.9.1-0, 25.11.0-1 by @13steinj in https://github.com/pyenv/pyenv/pull/3371 +* miniconda3-latest: auto accept TOS by @native-api in https://github.com/pyenv/pyenv/pull/3373 +* Add CPython 3.15.0a3 by @edgarrmondragon in https://github.com/pyenv/pyenv/pull/3374 + ## Release v2.6.16 * rehash: Fix hanging for 60 seconds when shims directory is not writable due to Linux Landlock by @native-api in https://github.com/pyenv/pyenv/pull/3367 * Add Miniconda3-25.9.1-3 by @binbjz in https://github.com/pyenv/pyenv/pull/3368 diff --git a/libexec/pyenv---version b/libexec/pyenv---version index 5806df3e..79ea6d98 100755 --- a/libexec/pyenv---version +++ b/libexec/pyenv---version @@ -12,7 +12,7 @@ set -e [ -n "$PYENV_DEBUG" ] && set -x -version="2.6.16" +version="2.6.17" git_revision="" if cd "${BASH_SOURCE%/*}" 2>/dev/null && git remote -v 2>/dev/null | grep -q pyenv; then diff --git a/plugins/python-build/bin/python-build b/plugins/python-build/bin/python-build index 752ae2a0..3071c6e0 100755 --- a/plugins/python-build/bin/python-build +++ b/plugins/python-build/bin/python-build @@ -14,7 +14,7 @@ # -g/--debug Build a debug version # -PYTHON_BUILD_VERSION="2.6.16" +PYTHON_BUILD_VERSION="2.6.17" OLDIFS="$IFS" From b25981335722e606a28c0ddd049dd08b68cbdaf1 Mon Sep 17 00:00:00 2001 From: Ivan Pozdeev Date: Fri, 19 Dec 2025 20:20:20 +0300 Subject: [PATCH 50/55] tests: refactor: rename and consolidate create_executable() functions --- test/exec.bats | 44 +++++++++++------------------------- test/init.bats | 12 ++-------- test/latest.bats | 28 +++++++++-------------- test/pip-rehash.bats | 23 +++++++------------ test/rehash.bats | 31 ++++++++++---------------- test/test_helper.bash | 34 ++++++++++++++++++++++++++++ test/versions.bats | 12 ++-------- test/whence.bats | 15 ++++--------- test/which.bats | 52 +++++++++++++++++-------------------------- 9 files changed, 105 insertions(+), 146 deletions(-) diff --git a/test/exec.bats b/test/exec.bats index cf818dbe..c1db5fbc 100644 --- a/test/exec.bats +++ b/test/exec.bats @@ -2,18 +2,6 @@ load test_helper -create_executable() { - name="${1?}" - shift 1 - bin="${PYENV_ROOT}/versions/${PYENV_VERSION}/bin" - mkdir -p "$bin" - { if [ $# -eq 0 ]; then cat - - else printf '%s\n' "$@" - fi - } | sed -Ee '1s/^ +//' > "${bin}/$name" - chmod +x "${bin}/$name" -} - @test "fails with invalid version" { bats_require_minimum_version 1.5.0 export PYENV_VERSION="3.4" @@ -38,8 +26,8 @@ EOF @test "completes with names of executables" { export PYENV_VERSION="3.4" - create_executable "fab" "#!/bin/sh" - create_executable "python" "#!/bin/sh" + create_alt_executable "fab" + create_alt_executable "python" pyenv-rehash run pyenv-completions exec @@ -65,7 +53,7 @@ SH @test "forwards all arguments" { export PYENV_VERSION="3.4" - create_executable "python" < "${PYENV_TEST_DIR}/python3" < "${bin}/$name" - chmod +x "${bin}/$name" -} - @test "creates shims and versions directories" { assert [ ! -d "${PYENV_ROOT}/shims" ] assert [ ! -d "${PYENV_ROOT}/versions" ] @@ -179,7 +171,7 @@ echo "\$PATH" } @test "outputs sh-compatible case syntax" { - create_executable pyenv-commands < "${bin}/$name" - chmod +x "${bin}/$name" -} - @test "read from installed" { - create_executable pyenv-versions < "${bin}/$1" - chmod +x "${bin}/$1" -} - copy_src_pyenvd() { mkdir -p "${PYENV_ROOT}" cp -r "${BATS_TEST_DIRNAME}/../pyenv.d" "${PYENV_ROOT}" @@ -16,8 +9,8 @@ copy_src_pyenvd() { @test "pip-rehash triggered when using 'pip'" { export PYENV_VERSION="3.7.14" - create_executable "example" - create_executable "pip" + create_alt_executable "example" + create_alt_executable "pip" copy_src_pyenvd run command -v example 2> /dev/null assert_failure @@ -29,8 +22,8 @@ copy_src_pyenvd() { @test "pip-rehash triggered when using 'pip3'" { export PYENV_VERSION="3.7.14" - create_executable "example" - create_executable "pip3" + create_alt_executable "example" + create_alt_executable "pip3" copy_src_pyenvd run command -v example 2> /dev/null assert_failure @@ -42,8 +35,8 @@ copy_src_pyenvd() { @test "pip-rehash triggered when using 'pip3.x'" { export PYENV_VERSION="3.7.14" - create_executable "example" - create_executable "pip3.7" + create_alt_executable "example" + create_alt_executable "pip3.7" copy_src_pyenvd run command -v example 2> /dev/null assert_failure @@ -55,8 +48,8 @@ copy_src_pyenvd() { @test "pip-rehash triggered when using 'python -m pip install'" { export PYENV_VERSION="3.7.14" - create_executable "example" - create_executable "python" + create_alt_executable "example" + create_alt_executable "python" copy_src_pyenvd run command -v example 2> /dev/null assert_failure diff --git a/test/rehash.bats b/test/rehash.bats index 860d9d79..25cdd808 100755 --- a/test/rehash.bats +++ b/test/rehash.bats @@ -2,13 +2,6 @@ load test_helper -create_executable() { - local bin="${PYENV_ROOT}/versions/${1}/bin" - mkdir -p "$bin" - touch "${bin}/$2" - chmod +x "${bin}/$2" -} - @test "empty rehash" { assert [ ! -d "${PYENV_ROOT}/shims" ] run pyenv-rehash @@ -42,10 +35,10 @@ create_executable() { } @test "creates shims" { - create_executable "2.7" "python" - create_executable "2.7" "fab" - create_executable "3.4" "python" - create_executable "3.4" "py.test" + create_alt_executable_in_version "2.7" "python" + create_alt_executable_in_version "2.7" "fab" + create_alt_executable_in_version "3.4" "python" + create_alt_executable_in_version "3.4" "py.test" assert [ ! -e "${PYENV_ROOT}/shims/fab" ] assert [ ! -e "${PYENV_ROOT}/shims/python" ] @@ -68,8 +61,8 @@ OUT touch "${PYENV_ROOT}/shims/oldshim1" chmod +x "${PYENV_ROOT}/shims/oldshim1" - create_executable "3.4" "fab" - create_executable "3.4" "python" + create_alt_executable_in_version "3.4" "fab" + create_alt_executable_in_version "3.4" "python" run pyenv-rehash assert_success "" @@ -78,8 +71,8 @@ OUT } @test "binary install locations containing spaces" { - create_executable "dirname1 p247" "python" - create_executable "dirname2 preview1" "py.test" + create_alt_executable_in_version "dirname1 p247" "python" + create_alt_executable_in_version "dirname2 preview1" "py.test" assert [ ! -e "${PYENV_ROOT}/shims/python" ] assert [ ! -e "${PYENV_ROOT}/shims/py.test" ] @@ -108,28 +101,28 @@ SH } @test "sh-rehash in bash" { - create_executable "3.4" "python" + create_alt_executable_in_version "3.4" "python" PYENV_SHELL=bash run pyenv-sh-rehash assert_success "command pyenv rehash hash -r 2>/dev/null || true" } @test "sh-rehash in bash (integration)" { - create_executable "3.4" "python" + create_alt_executable_in_version "3.4" "python" run eval "$(pyenv-sh-rehash)" assert_success assert [ -x "${PYENV_ROOT}/shims/python" ] } @test "sh-rehash in fish" { - create_executable "3.4" "python" + create_alt_executable_in_version "3.4" "python" PYENV_SHELL=fish run pyenv-sh-rehash assert_success "command pyenv rehash" } @test "sh-rehash in fish (integration)" { command -v fish >/dev/null || skip "-- fish not installed" - create_executable "3.4" "python" + create_alt_executable_in_version "3.4" "python" run fish -Nc "eval (pyenv-sh-rehash)" assert_success assert [ -x "${PYENV_ROOT}/shims/python" ] diff --git a/test/test_helper.bash b/test/test_helper.bash index 0a760b2f..b28f3b17 100644 --- a/test/test_helper.bash +++ b/test/test_helper.bash @@ -2,6 +2,7 @@ unset PYENV_VERSION unset PYENV_DIR setup() { + export PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }' if ! enable -f "${BATS_TEST_DIRNAME}"/../libexec/pyenv-realpath.dylib realpath 2>/dev/null; then if [ -n "$PYENV_NATIVE_EXT" ]; then echo "pyenv: failed to load \`realpath' builtin" >&2 @@ -141,6 +142,39 @@ path_without() { echo "$path" } +create_path_executable() { + create_executable "${PYENV_TEST_DIR}/bin" "$@" +} + +create_alt_executable() { + create_alt_executable_in_version "${PYENV_VERSION}" "$@" +} + +create_alt_executable_in_version() { + local version="${1:?}" + shift 1 + create_executable "${PYENV_ROOT}/versions/$version/bin" "$@" +} + +create_executable() { + bin="${1:?}" + name="${2:?}" + shift 2 + mkdir -p "$bin" + local payload + # Bats doesn't redirect stdin + if [[ $# -eq 0 && ! -t 0 ]]; then + payload="$(cat -)" + else + payload="$(printf '%s\n' "$@")" + fi + if [[ $payload != "#!/"* ]]; then + payload="#!$BASH"$'\n'"$payload" + fi + echo "$payload" > "${bin}/$name" + chmod +x "${bin}/$name" +} + create_hook() { mkdir -p "${PYENV_HOOK_PATH}/$1" touch "${PYENV_HOOK_PATH}/$1/$2" diff --git a/test/versions.bats b/test/versions.bats index e14285fc..58ab032c 100644 --- a/test/versions.bats +++ b/test/versions.bats @@ -22,14 +22,6 @@ stub_system_python() { touch "$stub" && chmod +x "$stub" } -create_executable() { - local name="$1" - local bin="${PYENV_TEST_DIR}/bin" - mkdir -p "$bin" - sed -Ee '1s/^ +//' > "${bin}/$name" - chmod +x "${bin}/$name" -} - @test "no versions installed" { stub_system_python assert [ ! -d "${PYENV_ROOT}/versions" ] @@ -199,7 +191,7 @@ OUT create_version "1.9.0" create_version "1.53.0" create_version "1.218.0" - create_executable sort </dev/null if [ "\$1" == "--version-sort" ]; then @@ -223,7 +215,7 @@ OUT create_version "1.9.0" create_version "1.53.0" create_version "1.218.0" - create_executable sort < "${PYENV_ROOT}/version" <<<"3.4" - create_executable "3.4" "python" + create_alt_executable_in_version "3.4" "python" mkdir -p "$PYENV_TEST_DIR" cd "$PYENV_TEST_DIR" @@ -165,7 +153,7 @@ SH 2.7 3.4 EOF - create_executable "3.4" "python" + create_alt_executable_in_version "3.4" "python" mkdir -p "$PYENV_TEST_DIR" cd "$PYENV_TEST_DIR" @@ -175,7 +163,7 @@ EOF } @test "resolves pyenv-latest prefixes" { - create_executable "3.4.2" "python" + create_alt_executable_in_version "3.4.2" "python" PYENV_VERSION=3.4 run pyenv-which python assert_success "${PYENV_ROOT}/versions/3.4.2/bin/python" @@ -187,7 +175,7 @@ echo version=\$version exit ! - create_executable "3.4.2" "python" + create_alt_executable_in_version "3.4.2" "python" PYENV_VERSION=3.4 run pyenv-which python assert_success "version=3.4.2" @@ -195,9 +183,9 @@ exit @test "skip advice supresses error messages" { bats_require_minimum_version 1.5.0 - create_executable "2.7" "python" - create_executable "3.3" "py.test" - create_executable "3.4" "py.test" + create_alt_executable_in_version "2.7" "python" + create_alt_executable_in_version "3.3" "py.test" + create_alt_executable_in_version "3.4" "py.test" PYENV_VERSION=2.7 run -127 pyenv-which py.test --skip-advice assert_failure From 74188359086b17801d21900a166ac39d008da286 Mon Sep 17 00:00:00 2001 From: Ivan Pozdeev Date: Fri, 19 Dec 2025 00:28:32 +0300 Subject: [PATCH 51/55] Prevent infinite loop if a shim is linked and called from a nonstandard location with "system" active --- libexec/pyenv-exec | 8 ++++++ libexec/pyenv-rehash | 4 +++ libexec/pyenv-which | 24 ++++++++++------- test/exec.bats | 23 ++++++++++++++++ test/rehash.bats | 25 +++++++++++++++++ test/shims-linked-from-elsewhere.bats | 39 +++++++++++++++++++++++++++ test/test_helper.bash | 12 ++++++--- test/which.bats | 26 ++++++++++++++++++ 8 files changed, 148 insertions(+), 13 deletions(-) create mode 100644 test/shims-linked-from-elsewhere.bats diff --git a/libexec/pyenv-exec b/libexec/pyenv-exec index 6ed5ac20..2368bdd3 100755 --- a/libexec/pyenv-exec +++ b/libexec/pyenv-exec @@ -29,6 +29,14 @@ if [ -z "$PYENV_COMMAND" ]; then exit 1 fi +if [[ -n $_PYENV_SHIM_PATH ]]; then + PROGRAM="$(echo "$PYENV_COMMAND" | tr a-z- A-Z_ | sed 's/[^A-Z0-9_]/_/g')" + NR_PYENV_SHIM_PATHS_PROGRAM="_PYENV_SHIM_PATHS_${PROGRAM}" + export -- "$NR_PYENV_SHIM_PATHS_PROGRAM=$_PYENV_SHIM_PATH${!NR_PYENV_SHIM_PATHS_PROGRAM:+:${!NR_PYENV_SHIM_PATHS_PROGRAM}}" + unset PROGRAM NR_PYENV_SHIM_PATHS_PROGRAM + unset _PYENV_SHIM_PATH +fi + PYENV_COMMAND_PATH="$(pyenv-which "$PYENV_COMMAND")" PYENV_BIN_PATH="${PYENV_COMMAND_PATH%/*}" export PYENV_VERSION diff --git a/libexec/pyenv-rehash b/libexec/pyenv-rehash index 745cfb8e..61000ff6 100755 --- a/libexec/pyenv-rehash +++ b/libexec/pyenv-rehash @@ -82,6 +82,10 @@ set -e program="\${0##*/}" export PYENV_ROOT="$PYENV_ROOT" +SHIM_PATH=\${0%/*} +if [[ \$SHIM_PATH != "$PYENV_ROOT/shims" ]]; then + export _PYENV_SHIM_PATH="\$SHIM_PATH" +fi exec "$(command -v pyenv)" exec "\$program" "\$@" SH chmod +x "$PROTOTYPE_SHIM_PATH" diff --git a/libexec/pyenv-which b/libexec/pyenv-which index 9ff3ddae..0ebf8219 100755 --- a/libexec/pyenv-which +++ b/libexec/pyenv-which @@ -42,15 +42,19 @@ done remove_from_path() { - local path_to_remove="$1" - local path_before + local -a paths_to_remove + IFS=: paths_to_remove=($1) + local path_to_remove path_before local result=":${PATH//\~/$HOME}:" - while [ "$path_before" != "$result" ]; do - path_before="$result" - result="${result//:$path_to_remove:/:}" + for path_to_remove in "${paths_to_remove[@]}"; do + while true; do + path_before="$result" + result="${result//:$path_to_remove:/:}" + if [[ ${#path_before} == "${#result}" ]]; then break; fi + done done - result="${result%:}" - echo "${result#:}" + result="${result:1:${#result}-2}" + echo "$result" } if [ -z "$PYENV_COMMAND" ]; then @@ -66,8 +70,10 @@ declare -a nonexistent_versions for version in "${versions[@]}" "$system"; do if [ "$version" = "system" ]; then - PATH="$(remove_from_path "${PYENV_ROOT}/shims")" - PYENV_COMMAND_PATH="$(command -v "$PYENV_COMMAND" || true)" + PROGRAM="$(echo "$PYENV_COMMAND" | tr a-z- A-Z_ | sed 's/[^A-Z0-9_]/_/g')" + NR_CUSTOM_SHIM_PATHS="_PYENV_SHIM_PATHS_$PROGRAM" + SEARCH_PATH="$(remove_from_path "${PYENV_ROOT}/shims${!NR_CUSTOM_SHIM_PATHS:+:${!NR_CUSTOM_SHIM_PATHS}}")" + PYENV_COMMAND_PATH="$(PATH="$SEARCH_PATH" command -v "$PYENV_COMMAND" || true)" else # $version may be a prefix to be resolved by pyenv-latest version_path="$(pyenv-prefix "${version}" 2>/dev/null)" || \ diff --git a/test/exec.bats b/test/exec.bats index c1db5fbc..ff49912b 100644 --- a/test/exec.bats +++ b/test/exec.bats @@ -116,3 +116,26 @@ OUT PYENV_VERSION=system:custom run pyenv-exec python3 assert_success "$PATH" } + +@test "sets/adds to _PYENV_SHIM_PATHS_{PROGRAM} when _PYENV_SHIM_PATH is set, unsets _PYENV_SHIM_PATH" { + progname='123;wacky-prog.name ^%$#' + envvarname="_PYENV_SHIM_PATHS_123_WACKY_PROG_NAME_____" + create_path_executable "$progname" </dev/null || true" assert_success assert [ -x "${PYENV_ROOT}/shims/python" ] } + +@test "shim sets _PYENV_SHIM_PATH when linked from elsewhere" { + export PYENV_VERSION="custom" + create_alt_executable python3 + #must stub pyenv before rehash 'cuz the path is hardcoded into shims + create_stub pyenv </dev/null | grep ^XDG_ | cut -d= -f1`; do unset "$xdg_var"; done unset xdg_var @@ -128,7 +128,7 @@ path_without() { if [ "$found" != "${PYENV_ROOT}/shims" ]; then alt="${PYENV_TEST_DIR}/$(echo "${found#/}" | tr '/' '-')" mkdir -p "$alt" - for util in bash head cut readlink greadlink; do + for util in bash head cut readlink greadlink tr sed; do if [ -x "${found}/$util" ]; then ln -s "${found}/$util" "${alt}/$util" fi @@ -156,9 +156,13 @@ create_alt_executable_in_version() { create_executable "${PYENV_ROOT}/versions/$version/bin" "$@" } +create_stub() { + create_executable "${BATS_TEST_TMPDIR}/stubs" "$@" +} + create_executable() { - bin="${1:?}" - name="${2:?}" + local bin="${1:?}" + local name="${2:?}" shift 2 mkdir -p "$bin" local payload diff --git a/test/which.bats b/test/which.bats index 75601b0c..e54c1704 100644 --- a/test/which.bats +++ b/test/which.bats @@ -193,3 +193,29 @@ exit pyenv: py.test: command not found OUT } + +@test "excludes paths in _PYENV_SHIM_PATHS_{PROGRAM} from search only for PROGRAM" { + progname='123;wacky-prog.name ^%$#' + envvarname="_PYENV_SHIM_PATHS_123_WACKY_PROG_NAME_____" + create_path_executable "$progname" + + for dir_ in "$BATS_TEST_TMPDIR/alt-path"{1,2}; do + mkdir -p "$dir_" + ln -s "${PYENV_TEST_DIR}/bin/$progname" "$dir_/$progname" + eval 'export '"$envvarname"'="$dir_${'"$envvarname"':+:$'"$envvarname"'}"' + PATH="$dir_:$PATH" + done + create_executable "$dir_" "normal_program" + + run pyenv-which "$progname" + assert_success + assert_output < Date: Sat, 20 Dec 2025 09:31:05 +0300 Subject: [PATCH 52/55] tests: refactor: migrate to newly-added create_stub() --- test/init.bats | 10 ++-------- test/latest.bats | 36 ++++++++++-------------------------- 2 files changed, 12 insertions(+), 34 deletions(-) diff --git a/test/init.bats b/test/init.bats index a6845fe4..2b963249 100755 --- a/test/init.bats +++ b/test/init.bats @@ -2,10 +2,6 @@ load test_helper -_setup() { - export PATH="${PYENV_TEST_DIR}/bin:$PATH" -} - @test "creates shims and versions directories" { assert [ ! -d "${PYENV_ROOT}/shims" ] assert [ ! -d "${PYENV_ROOT}/versions" ] @@ -171,16 +167,14 @@ echo "\$PATH" } @test "outputs sh-compatible case syntax" { - create_path_executable pyenv-commands < Date: Sat, 20 Dec 2025 21:57:39 +0300 Subject: [PATCH 53/55] tests: fix integration tests for Bash and Fish --- test/rehash.bats | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/rehash.bats b/test/rehash.bats index cda2a074..f7462f04 100755 --- a/test/rehash.bats +++ b/test/rehash.bats @@ -109,7 +109,7 @@ hash -r 2>/dev/null || true" @test "sh-rehash in bash (integration)" { create_alt_executable_in_version "3.4" "python" - run eval "$(pyenv-sh-rehash)" + PYENV_SHELL=bash run eval "$(pyenv-sh-rehash)" assert_success assert [ -x "${PYENV_ROOT}/shims/python" ] } @@ -123,7 +123,7 @@ hash -r 2>/dev/null || true" @test "sh-rehash in fish (integration)" { command -v fish >/dev/null || skip "-- fish not installed" create_alt_executable_in_version "3.4" "python" - run fish -Nc "eval (pyenv-sh-rehash)" + PYENV_SHELL=fish fish -Nc "source (pyenv-sh-rehash | psub)" assert_success assert [ -x "${PYENV_ROOT}/shims/python" ] } From aeea3ac825cd667cc9c24e8fb405f6b78251491e Mon Sep 17 00:00:00 2001 From: Florian Blanchet Date: Sun, 21 Dec 2025 04:33:19 +0200 Subject: [PATCH 54/55] Add PowerShell support (#2749) Co-authored-by: Ivan Pozdeev Co-authored-by: Ivan Pozdeev --- README.md | 16 +++++++++- completions/pyenv.pwsh | 17 ++++++++++ libexec/pyenv-init | 70 ++++++++++++++++++++++++++++++++++++++--- libexec/pyenv-sh-rehash | 12 +++++-- libexec/pyenv-sh-shell | 16 ++++++++++ test/init.bats | 66 ++++++++++++++++++++++++++++++++++++++ test/rehash.bats | 20 ++++++++++++ test/shell.bats | 28 +++++++++++++++++ test/test_helper.bash | 10 ++++-- 9 files changed, 245 insertions(+), 10 deletions(-) create mode 100644 completions/pyenv.pwsh diff --git a/README.md b/README.md index 5d43b415..f43c4aa1 100644 --- a/README.md +++ b/README.md @@ -271,6 +271,20 @@ See [Advanced configuration](#advanced-configuration) for details and more confi +#### Microsoft PowerShell + +
+ + Add the commands to `$profile.CurrentUserAllHosts` by running the following in your terminal: + + ~~~ pwsh + echo '$Env:PYENV_ROOT="$Env:HOME/.pyenv"' >> $profile.CurrentUserAllHosts + echo 'if (Test-Path -LP "$Env:PYENV_ROOT/bin" -PathType Container) { + $Env:PATH="$Env:PYENV_ROOT/bin:$Env:PATH" }' >> $profile.CurrentUserAllHosts + echo 'iex ((pyenv init -) -join "`n")' >> $profile.CurrentUserAllHosts + ~~~ + +
### C. Restart your shell ---- @@ -689,7 +703,7 @@ opposed to this idea. Here's what `eval "$(pyenv init -)"` actually does: 3. **Installs autocompletion.** This is entirely optional but pretty useful. Sourcing `/completions/pyenv.bash` will set that - up. There are also completions for Zsh and Fish. + up. There are also completions for Zsh, Fish and PowerShell. 4. **Rehashes shims.** From time to time you'll need to rebuild your shim files. Doing this on init makes sure everything is up to diff --git a/completions/pyenv.pwsh b/completions/pyenv.pwsh new file mode 100644 index 00000000..f422f468 --- /dev/null +++ b/completions/pyenv.pwsh @@ -0,0 +1,17 @@ +$scriptblock = { + param($wordToComplete, $commandAst, $cursorPosition) + $words = $commandAst.ToString() + if ( $wordToComplete ) { + $matches = (($words[0..$cursorPosition] -join '') | Select-String -Pattern "\s+" -AllMatches).Matches + if ( $matches ) { + $cursorPosition = $matches[-1].Index - 1 + } + } + $words = $words[0..$cursorPosition] -join '' -split "\s+" + if ( $words.Count -ge 2 ) { + pyenv completions $words[1] | where { $_ -match $wordToComplete } + } else { + pyenv commands | where { $_ -match $wordToComplete } + } +} +Register-ArgumentCompleter -Native -CommandName pyenv -ScriptBlock $scriptblock diff --git a/libexec/pyenv-init b/libexec/pyenv-init index 6341b655..757a443f 100755 --- a/libexec/pyenv-init +++ b/libexec/pyenv-init @@ -15,6 +15,7 @@ if [ "$1" = "--complete" ]; then echo bash echo fish echo ksh + echo pwsh echo zsh exit fi @@ -102,6 +103,10 @@ function detect_profile() { profile_explain="~/.bash_profile if it exists, otherwise ~/.profile" rc='~/.bashrc' ;; + pwsh ) + profile='~/.config/powershell/profile.ps1' + rc='~/.config/powershell/profile.ps1' + ;; zsh ) profile='~/.zprofile' rc='~/.zshrc' @@ -150,6 +155,15 @@ function help_() { echo 'pyenv init - fish | source' echo ;; + pwsh ) + echo '# Load pyenv automatically by appending' + echo "# the following to $profile :" + echo + echo '$Env:PYENV_ROOT="$Env:HOME/.pyenv"' + echo 'if (Test-Path -LP "$Env:PYENV_ROOT/bin" -PathType Container) {' + echo ' $Env:PATH="$Env:PYENV_ROOT/bin:$Env:PATH" }' + echo 'iex ((pyenv init -) -join "`n")' + ;; * ) echo '# Load pyenv automatically by appending' echo -n "# the following to " @@ -186,6 +200,11 @@ function print_path() { print_path_prepend_shims echo 'end' ;; + pwsh ) + echo 'if ( $Env:PATH -notmatch "'"${PYENV_ROOT}/shims"'" ) {' + print_path_prepend_shims + echo '}' + ;; * ) echo 'if [[ ":$PATH:" != *'\':"${PYENV_ROOT}"/shims:\''* ]]; then' print_path_prepend_shims @@ -199,6 +218,10 @@ function print_path() { echo 'set -eg PATH[$pyenv_index]; end; set -e pyenv_index' print_path_prepend_shims ;; + pwsh ) + echo '$Env:PATH="$(($Env:PATH -split '"':'"' | where { -not ($_ -match '"'${PYENV_ROOT}/shims'"') }) -join '"':'"')"' + print_path_prepend_shims + ;; * ) # Some distros (notably Debian-based) set Bash's SSH_SOURCE_BASHRC compilation option # that makes it source `bashrc` under SSH even when not interactive. @@ -223,6 +246,9 @@ function print_path_prepend_shims() { fish ) echo 'set -gx PATH '\'"${PYENV_ROOT}/shims"\'' $PATH' ;; + pwsh ) + echo '$Env:PATH="'"${PYENV_ROOT}"'/shims:$Env:PATH"' + ;; * ) echo 'export PATH="'"${PYENV_ROOT}"'/shims:${PATH}"' ;; @@ -234,6 +260,9 @@ function print_env() { fish ) echo "set -gx PYENV_SHELL $shell" ;; + pwsh ) + echo '$Env:PYENV_SHELL="'"$shell"'"' + ;; * ) echo "export PYENV_SHELL=$shell" ;; @@ -243,13 +272,27 @@ function print_env() { function print_completion() { completion="${0%/*/*}/completions/pyenv.${shell}" if [ -r "$completion" ]; then - echo "source '$completion'" + case "$shell" in + pwsh ) + echo "iex (gc $completion -Raw)" + ;; + * ) + echo "source '$completion'" + ;; + esac fi } function print_rehash() { if [ -z "$no_rehash" ]; then - echo 'command pyenv rehash 2>/dev/null' + case "$shell" in + pwsh ) + echo '& pyenv rehash 2>/dev/null' + ;; + * ) + echo 'command pyenv rehash 2>/dev/null' + ;; + esac fi } @@ -270,6 +313,25 @@ function print_shell_function() { end end' ;; + pwsh ) + cat </dev/null || true" diff --git a/libexec/pyenv-sh-shell b/libexec/pyenv-sh-shell index 51352e1d..289ba424 100755 --- a/libexec/pyenv-sh-shell +++ b/libexec/pyenv-sh-shell @@ -48,6 +48,9 @@ if [ "$versions" = "--unset" ]; then echo 'set -gu PYENV_VERSION_OLD "$PYENV_VERSION"' echo "set -e PYENV_VERSION" ;; + pwsh ) + echo '$Env:PYENV_VERSION, $Env:PYENV_VERSION_OLD = $null, $Env:PYENV_VERSION' + ;; * ) echo 'PYENV_VERSION_OLD="${PYENV_VERSION-}"' echo "unset PYENV_VERSION" @@ -74,6 +77,16 @@ else echo "pyenv: PYENV_VERSION_OLD is not set" >&2 false end +EOS + ;; + pwsh ) + cat </dev/null; then echo 'set -gu PYENV_VERSION_OLD "$PYENV_VERSION"' echo "set -gx PYENV_VERSION \"$version\"" ;; + pwsh ) + echo '$Env:PYENV_VERSION, $Env:PYENV_VERSION_OLD = "'"${version}"'", $Env:PYENV_VERSION' + ;; * ) echo 'PYENV_VERSION_OLD="${PYENV_VERSION-}"' echo "export PYENV_VERSION=\"${version}\"" diff --git a/test/init.bats b/test/init.bats index 2b963249..85ef01ec 100755 --- a/test/init.bats +++ b/test/init.bats @@ -62,6 +62,19 @@ OUT assert_line 'pyenv init - fish | source' } +@test "setup shell completions (pwsh)" { + root="$(cd $BATS_TEST_DIRNAME/.. && pwd)" + run pyenv-init - pwsh + assert_success + assert_line "iex (gc ${root}/completions/pyenv.pwsh -Raw)" +} + +@test "pwsh instructions" { + run pyenv-init pwsh + assert [ "$status" -eq 1 ] + assert_line 'iex ((pyenv init -) -join "`n")' +} + @test "shell detection for installer" { run pyenv-init --detect-shell assert_success @@ -88,6 +101,13 @@ OUT assert_line "set -gx PATH '${PYENV_ROOT}/shims' \$PATH" } +@test "adds shims to PATH (pwsh)" { + export PATH="${BATS_TEST_DIRNAME}/../libexec:/usr/bin:/bin:/usr/local/bin" + run pyenv-init - pwsh + assert_success + assert_line '$Env:PATH="'${PYENV_ROOT}'/shims:$Env:PATH"' +} + @test "removes existing shims from PATH" { OLDPATH="$PATH" export PATH="${BATS_TEST_DIRNAME}/nonexistent:${PYENV_ROOT}/shims:$PATH" @@ -112,6 +132,19 @@ echo "\$PATH" assert_output "${PYENV_ROOT}/shims:${BATS_TEST_DIRNAME}/nonexistent:${OLDPATH//${PYENV_ROOT}\/shims:/}" } +@test "removes existing shims from PATH (pwsh)" { + command -v pwsh >/dev/null || skip "-- pwsh not installed" + OLDPATH="$PATH" + export PATH="${BATS_TEST_DIRNAME}/nonexistent:${PYENV_ROOT}/shims:$PATH" + run pwsh -noni -c - </dev/null || skip "-- pwsh not installed" + PATH="${BATS_TEST_DIRNAME}/../libexec:/usr/bin:/bin:/usr/local/bin" + run pwsh -nop -c - </dev/null || skip "-- pwsh not installed" + PATH="${BATS_TEST_DIRNAME}/../libexec:/usr/bin:${PYENV_ROOT}/shims:/bin:/usr/local/bin" + run pwsh -nop -c - </dev/null || true" assert [ -x "${PYENV_ROOT}/shims/python" ] } +@test "sh-rehash in pwsh" { + create_alt_executable_in_version "3.4" "python" + PYENV_SHELL=pwsh run pyenv-sh-rehash + assert_success "& (get-command pyenv -commandtype application) rehash" +} + +@test "sh-rehash in pwsh (integration)" { + command -v pwsh >/dev/null || skip "-- pwsh not installed" + assert [ ! -x "${PYENV_ROOT}/shims/python" ] + create_alt_executable_in_version "3.4" "python" + run pwsh -nop -c -<<'!' +$ErrorActionPreference = "Stop" +$PSNativeCommandUseErrorActionPreference = $true +iex ((& pyenv init - pwsh) -join "`n") +& pyenv rehash +! + assert_success "" + assert [ -x "${PYENV_ROOT}/shims/python" ] +} + @test "shim sets _PYENV_SHIM_PATH when linked from elsewhere" { export PYENV_VERSION="custom" create_alt_executable python3 diff --git a/test/shell.bats b/test/shell.bats index daa5744b..e20df561 100644 --- a/test/shell.bats +++ b/test/shell.bats @@ -31,6 +31,11 @@ load test_helper assert_success 'echo "$PYENV_VERSION"' } +@test "shell version (pwsh)" { + PYENV_SHELL=pwsh PYENV_VERSION="1.2.3" run pyenv-sh-shell + assert_success 'echo "$PYENV_VERSION"' +} + @test "shell revert" { PYENV_SHELL=bash run pyenv-sh-shell - assert_success @@ -43,6 +48,12 @@ load test_helper assert_line 0 'if set -q PYENV_VERSION_OLD' } +@test "shell revert (pwsh)" { + PYENV_SHELL=pwsh run pyenv-sh-shell - + assert_success + assert_line 0 'if ( Get-Item -Path Env:\PYENV_VERSION* ) {' +} + @test "shell unset" { PYENV_SHELL=bash run pyenv-sh-shell --unset assert_success @@ -61,6 +72,14 @@ set -e PYENV_VERSION OUT } +@test "shell unset (pwsh)" { + PYENV_SHELL=pwsh run pyenv-sh-shell --unset + assert_success + assert_output </dev/null | grep ^XDG_ | cut -d= -f1`; do unset "$xdg_var"; done unset xdg_var + # Workaround for Powershell. When tests are run from a terminal, + # and running a script fron a here-document, + # Powershell 7.5.4 erroneously prints ANSI escape sequences + # even if its output is redirected, breaking the comparison logic + export NO_COLOR=1 + # If test specific setup exist, run it if [[ $(type -t _setup) == function ]];then _setup @@ -67,8 +73,8 @@ assert_failure() { assert_equal() { if [ "$1" != "$2" ]; then - { echo "expected: $1" - echo "actual: $2" + { echo "expected: \`$1'" + echo "actual: \`$2'" } | flunk fi } From a944da76c07e92ea26a4552b78504ac67dedb91c Mon Sep 17 00:00:00 2001 From: native-api Date: Sun, 21 Dec 2025 06:38:46 +0300 Subject: [PATCH 55/55] rehash: support BSD mktemp (#3376) macOS 12 `mktemp' doesn't support `-p` --- libexec/pyenv-rehash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/pyenv-rehash b/libexec/pyenv-rehash index 61000ff6..3dc7c291 100755 --- a/libexec/pyenv-rehash +++ b/libexec/pyenv-rehash @@ -52,7 +52,7 @@ while (( SECONDS <= start + ${PYENV_REHASH_TIMEOUT:-60} )); do #So check for writablity by trying to write to a different file, # in a way that taxes the usual use case as little as possible. if [[ -z $tested_for_other_write_errors ]]; then - ( t="$(mktemp -p "$SHIM_PATH")" && rm "$t" ) && tested_for_other_write_errors=1 || + ( t="$(TMPDIR="$SHIM_PATH" mktemp)" && rm "$t" ) && tested_for_other_write_errors=1 || { echo "pyenv: cannot rehash: $SHIM_PATH isnt writable" >&2; break; } fi # POSIX sleep(1) doesn't provide subsecond precision, but many others do