Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package pyenv for openSUSE:Factory checked in at 2023-06-21 22:40:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/pyenv (Old) and /work/SRC/openSUSE:Factory/.pyenv.new.15902 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "pyenv" Wed Jun 21 22:40:29 2023 rev:25 rq:1094464 version:2.3.21 Changes: -------- --- /work/SRC/openSUSE:Factory/pyenv/pyenv.changes 2023-06-11 19:58:31.376332979 +0200 +++ /work/SRC/openSUSE:Factory/.pyenv.new.15902/pyenv.changes 2023-06-21 22:41:22.026915677 +0200 @@ -1,0 +2,20 @@ +Wed Jun 21 14:40:56 UTC 2023 - Thomas Schraitle <thomas.schrai...@suse.com> - 2.3.21 + +- Update to 2.3.21 + - Add graalpy-23.0.0 by @msimacek in #2724 + - Add PyPy 7.3.12 by @edgarrmondragon in #2726 + - Fix occasional 'libexec/pyenv-latest: line 39: printf: write error: + Broken pipe' by @native-api in #2729 + +Full Changelog: https://github.com/pyenv/pyenv/compare/v2.3.20...v2.3.21 + +------------------------------------------------------------------- +Wed Jun 21 14:40:56 UTC 2023 - Thomas Schraitle <thomas.schrai...@suse.com> - 2.3.20 + +- Update to 2.3.20 + - Backport bpo-42351 to 3.5.10 by @native-api in #2717 + - Add missing patches for Python 3.7/3.8/3.9 by @tomkins in #2718 + +Full Changelog: https://github.com/pyenv/pyenv/compare/v2.3.19...v2.3.20 + +------------------------------------------------------------------- Old: ---- pyenv-2.3.19.tar.gz New: ---- pyenv-2.3.21.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ pyenv.spec ++++++ --- /var/tmp/diff_new_pack.n6lQcg/_old 2023-06-21 22:41:22.486918446 +0200 +++ /var/tmp/diff_new_pack.n6lQcg/_new 2023-06-21 22:41:22.494918494 +0200 @@ -19,7 +19,7 @@ %define pyenv_dir %{_libexecdir}/pyenv # Name: pyenv -Version: 2.3.19 +Version: 2.3.21 Release: 0 Summary: Python Version Management License: MIT ++++++ pyenv-2.3.19.tar.gz -> pyenv-2.3.21.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyenv-2.3.19/CHANGELOG.md new/pyenv-2.3.21/CHANGELOG.md --- old/pyenv-2.3.19/CHANGELOG.md 2023-06-08 11:18:16.000000000 +0200 +++ new/pyenv-2.3.21/CHANGELOG.md 2023-06-20 12:52:59.000000000 +0200 @@ -1,5 +1,16 @@ # Version History +## Release v2.3.21 + +* Add graalpy-23.0.0 by @msimacek in https://github.com/pyenv/pyenv/pull/2724 +* Add PyPy 7.3.12 by @edgarrmondragon in https://github.com/pyenv/pyenv/pull/2726 +* Fix occasional 'libexec/pyenv-latest: line 39: printf: write error: Broken pipe' by @native-api in https://github.com/pyenv/pyenv/pull/2729 + +## Release v2.3.20 + +* Backport bpo-42351 to 3.5.10 by @native-api in https://github.com/pyenv/pyenv/pull/2717 +* Add missing patches for Python 3.7/3.8/3.9 by @tomkins in https://github.com/pyenv/pyenv/pull/2718 + ## Release v2.3.19 * Add CPython 3.7.17, 3.8.17 and 3.9.17 by @edgarrmondragon in https://github.com/pyenv/pyenv/pull/2711 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyenv-2.3.19/CONTRIBUTING.md new/pyenv-2.3.21/CONTRIBUTING.md --- old/pyenv-2.3.19/CONTRIBUTING.md 2023-06-08 11:18:16.000000000 +0200 +++ new/pyenv-2.3.21/CONTRIBUTING.md 2023-06-20 12:52:59.000000000 +0200 @@ -80,12 +80,12 @@ We do not provide official support for EOL releases and environments or otherwise provide any kind of extended support for old Python releases. -We do however accept fixes from interested parties that would allow running older, including EOL, releases in newer environments. +We do however accept fixes from interested parties that would allow running older, including EOL, releases in environments that they do not officially support. In addition to the above requirements for release-specific fixes, * Such a fix must not add maintenance burden (e.g. add new logic to `python-build` that has to be kept there indefinitely) * Unless the added logic is useful for both EOL and non-EOL releases. In this case, it will be considered as being primarily an improvement for non-EOL releases. -* Support is provided on a "best effort" basis: we do not maintain these fixes but won't actively break them, either, and accept any corrections. +* Support is provided on a "best effort" basis: we do not actively maintain these fixes but won't actively break them, either, and will accept any corrections. Since old releases never change, it's pretty safe to assume that the fixes will continue to work until a later version of an environment introduces further incompatible changes. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyenv-2.3.19/libexec/pyenv---version new/pyenv-2.3.21/libexec/pyenv---version --- old/pyenv-2.3.19/libexec/pyenv---version 2023-06-08 11:18:16.000000000 +0200 +++ new/pyenv-2.3.21/libexec/pyenv---version 2023-06-20 12:52:59.000000000 +0200 @@ -12,7 +12,7 @@ set -e [ -n "$PYENV_DEBUG" ] && set -x -version="2.3.19" +version="2.3.21" git_revision="" if cd "${BASH_SOURCE%/*}" 2>/dev/null && git remote -v 2>/dev/null | grep -q pyenv; then diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyenv-2.3.19/libexec/pyenv-latest new/pyenv-2.3.21/libexec/pyenv-latest --- old/pyenv-2.3.19/libexec/pyenv-latest 2023-06-08 11:18:16.000000000 +0200 +++ new/pyenv-2.3.21/libexec/pyenv-latest 2023-06-20 12:52:59.000000000 +0200 @@ -36,7 +36,7 @@ DEFINITION_CANDIDATES=( $(python-build --definitions ) ) fi - if printf '%s\n' "${DEFINITION_CANDIDATES[@]}" | grep -qxFe "$prefix"; then + if printf '%s\n' "${DEFINITION_CANDIDATES[@]}" 2>/dev/null | grep -qxFe "$prefix"; then echo "$prefix" exit $exitcode; fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyenv-2.3.19/plugins/python-build/share/python-build/3.7.17 new/pyenv-2.3.21/plugins/python-build/share/python-build/3.7.17 --- old/pyenv-2.3.19/plugins/python-build/share/python-build/3.7.17 2023-06-08 11:18:16.000000000 +0200 +++ new/pyenv-2.3.21/plugins/python-build/share/python-build/3.7.17 2023-06-20 12:52:59.000000000 +0200 @@ -1,6 +1,6 @@ prefer_openssl11 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 -install_package "openssl-1.1.1q" "https://www.openssl.org/source/openssl-1.1.1q.tar.gz#d7939ce614029cdff0b6c20f0e2e5703158a489a72b2507b8bd51bf8c8fd10ca" mac_openssl --if has_broken_mac_openssl +install_package "openssl-1.1.1u" "https://www.openssl.org/source/openssl-1.1.1u.tar.gz#e2f8d84b523eecd06c7be7626830370300fbcc15386bf5142d72758f6963ebc6" 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.7.17" "https://www.python.org/ftp/python/3.7.17/Python-3.7.17.tar.xz#7911051ed0422fd54b8f59ffc030f7cf2ae30e0f61bda191800bb040dce4f9d2" standard verify_py37 copy_python_gdb ensurepip diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyenv-2.3.19/plugins/python-build/share/python-build/3.8.17 new/pyenv-2.3.21/plugins/python-build/share/python-build/3.8.17 --- old/pyenv-2.3.19/plugins/python-build/share/python-build/3.8.17 2023-06-08 11:18:16.000000000 +0200 +++ new/pyenv-2.3.21/plugins/python-build/share/python-build/3.8.17 2023-06-20 12:52:59.000000000 +0200 @@ -3,7 +3,7 @@ # 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-1.1.1q" "https://www.openssl.org/source/openssl-1.1.1q.tar.gz#d7939ce614029cdff0b6c20f0e2e5703158a489a72b2507b8bd51bf8c8fd10ca" mac_openssl --if has_broken_mac_openssl +install_package "openssl-1.1.1u" "https://www.openssl.org/source/openssl-1.1.1u.tar.gz#e2f8d84b523eecd06c7be7626830370300fbcc15386bf5142d72758f6963ebc6" 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.8.17" "https://www.python.org/ftp/python/3.8.17/Python-3.8.17.tar.xz#2e54b0c68191f16552f6de2e97a2396540572a219f6bbb28591a137cecc490a9" standard verify_py38 copy_python_gdb ensurepip diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyenv-2.3.19/plugins/python-build/share/python-build/3.9.17 new/pyenv-2.3.21/plugins/python-build/share/python-build/3.9.17 --- old/pyenv-2.3.19/plugins/python-build/share/python-build/3.9.17 2023-06-08 11:18:16.000000000 +0200 +++ new/pyenv-2.3.21/plugins/python-build/share/python-build/3.9.17 2023-06-20 12:52:59.000000000 +0200 @@ -3,7 +3,7 @@ # 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-1.1.1q" "https://www.openssl.org/source/openssl-1.1.1q.tar.gz#d7939ce614029cdff0b6c20f0e2e5703158a489a72b2507b8bd51bf8c8fd10ca" mac_openssl --if has_broken_mac_openssl +install_package "openssl-1.1.1u" "https://www.openssl.org/source/openssl-1.1.1u.tar.gz#e2f8d84b523eecd06c7be7626830370300fbcc15386bf5142d72758f6963ebc6" 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.17" "https://www.python.org/ftp/python/3.9.17/Python-3.9.17.tar.xz#30ce057c44f283f8ed93606ccbdb8d51dd526bdc4c62cce5e0dc217bfa3e8cee" standard verify_py39 copy_python_gdb ensurepip diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyenv-2.3.19/plugins/python-build/share/python-build/graalpy-23.0.0 new/pyenv-2.3.21/plugins/python-build/share/python-build/graalpy-23.0.0 --- old/pyenv-2.3.19/plugins/python-build/share/python-build/graalpy-23.0.0 1970-01-01 01:00:00.000000000 +0100 +++ new/pyenv-2.3.21/plugins/python-build/share/python-build/graalpy-23.0.0 2023-06-20 12:52:59.000000000 +0200 @@ -0,0 +1,54 @@ +# Copyright (c) 2023, 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='23.0.0' +BUILD='' + +graalpy_arch="$(graalpy_architecture 2>/dev/null || true)" + +case "$graalpy_arch" in +"linux-amd64" ) + checksum="25e4fa7c1d45db6dcac5bfa4d1a0aa9ef5581623dc5903ce98d246c5d394639c" + ;; +"linux-aarch64" ) + checksum="e2a00b2b6485282b4a04aa382e30d696e00d20eb2fe1736debbe2d9df2a8737a" + ;; +"macos-amd64" ) + checksum="1578902976e6aaf45b9758931f0bddbb29c5c9bdca62c67591d6e153340c2a4f" + ;; +"macos-aarch64" ) + checksum="cc40e1d47610c5f4a825a1a7c3ffe8b163c71b5d042d16aebd1a65451d4309a5" + ;; +* ) + { echo + colorize 1 "ERROR" + echo ": No binary distribution of GraalPy is available for $(uname -sm)." + echo + } >&2 + exit 1 + ;; +esac + +if [ -n "${BUILD}" ]; then + urlprefix="https://github.com/graalvm/graalvm-ce-dev-builds/releases/download/${VERSION}-${BUILD}" +else + urlprefix="https://github.com/oracle/graalpython/releases/download/graal-${VERSION}" +fi + +install_package "graalpy-${VERSION}${BUILD}" "${urlprefix}/graalpython-${VERSION}-${graalpy_arch}.tar.gz#${checksum}" "copy" ensurepip diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyenv-2.3.19/plugins/python-build/share/python-build/patches/3.5.10/Python-3.5.10/0008-bpo-36231-Support-building-on-macOS-without-usr-incl.patch new/pyenv-2.3.21/plugins/python-build/share/python-build/patches/3.5.10/Python-3.5.10/0008-bpo-36231-Support-building-on-macOS-without-usr-incl.patch --- old/pyenv-2.3.19/plugins/python-build/share/python-build/patches/3.5.10/Python-3.5.10/0008-bpo-36231-Support-building-on-macOS-without-usr-incl.patch 2023-06-08 11:18:16.000000000 +0200 +++ new/pyenv-2.3.21/plugins/python-build/share/python-build/patches/3.5.10/Python-3.5.10/0008-bpo-36231-Support-building-on-macOS-without-usr-incl.patch 2023-06-20 12:52:59.000000000 +0200 @@ -1,6 +1,6 @@ -From c7302116573d853d3181133477d9d0e4d4d3abfd Mon Sep 17 00:00:00 2001 -From: Ned Deily <n...@python.org> -Date: Tue, 18 Jun 2019 16:28:13 -0400 +From 2ad0bb719f5ce416d3bfa366814ebcf3b654f081 Mon Sep 17 00:00:00 2001 +From: Ivan Pozdeev <v...@mail.mipt.ru> +Date: Sat, 10 Jun 2023 20:17:25 +0300 Subject: [PATCH] bpo-36231: Support building on macOS without /usr/include (GH-13773) (GH-14208) @@ -20,12 +20,12 @@ +10.14, system header files are only available within an SDK provided by +either the Command Line Tools or the Xcode app. diff --git a/setup.py b/setup.py -index bcc4bfa89d..5e0cd02430 100644 +index ab8065866f..28dc801845 100644 --- a/setup.py +++ b/setup.py -@@ -90,18 +90,57 @@ def sysroot_paths(make_vars, subdirs): - break - return dirs +@@ -60,18 +60,57 @@ def add_dir_to_list(dirlist, dir): + return + dirlist.insert(0, dir) +MACOS_SDK_ROOT = None + @@ -86,8 +86,8 @@ + + return MACOS_SDK_ROOT - def is_macosx_sdk_path(path): - """ + def is_macosx_at_least(vers): + if host_platform == 'darwin': -- -2.30.1 (Apple Git-130) +2.36.1.windows.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyenv-2.3.19/plugins/python-build/share/python-build/patches/3.5.10/Python-3.5.10/0009-bpo-42351-Avoid-error-when-opening-header-with-non-U.patch new/pyenv-2.3.21/plugins/python-build/share/python-build/patches/3.5.10/Python-3.5.10/0009-bpo-42351-Avoid-error-when-opening-header-with-non-U.patch --- old/pyenv-2.3.19/plugins/python-build/share/python-build/patches/3.5.10/Python-3.5.10/0009-bpo-42351-Avoid-error-when-opening-header-with-non-U.patch 1970-01-01 01:00:00.000000000 +0100 +++ new/pyenv-2.3.21/plugins/python-build/share/python-build/patches/3.5.10/Python-3.5.10/0009-bpo-42351-Avoid-error-when-opening-header-with-non-U.patch 2023-06-20 12:52:59.000000000 +0200 @@ -0,0 +1,28 @@ +From 3cc28dc409d0db3752278379e7a8d4c23e0f2e29 Mon Sep 17 00:00:00 2001 +From: Ronald Oussoren <ronaldousso...@mac.com> +Date: Sat, 14 Nov 2020 16:07:47 +0100 +Subject: [PATCH] bpo-42351: Avoid error when opening header with non-UTF8 + encoding (GH-23279) + +grep_headers_for() would error out when a header contained +text that cannot be interpreted as UTF-8. +--- + setup.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/setup.py b/setup.py +index 28dc801845..dd50485213 100644 +--- a/setup.py ++++ b/setup.py +@@ -129,7 +129,7 @@ def is_macosx_sdk_path(path): + + def grep_headers_for(function, headers): + for header in headers: +- with open(header, 'r') as f: ++ with open(header, 'r', errors='surrogateescape') as f: + if function in f.read(): + return True + return False +-- +2.36.1.windows.1 + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyenv-2.3.19/plugins/python-build/share/python-build/patches/3.7.17/Python-3.7.17/0001-Port-ctypes-and-system-libffi-patches-for-arm64-macO.patch new/pyenv-2.3.21/plugins/python-build/share/python-build/patches/3.7.17/Python-3.7.17/0001-Port-ctypes-and-system-libffi-patches-for-arm64-macO.patch --- old/pyenv-2.3.19/plugins/python-build/share/python-build/patches/3.7.17/Python-3.7.17/0001-Port-ctypes-and-system-libffi-patches-for-arm64-macO.patch 1970-01-01 01:00:00.000000000 +0100 +++ new/pyenv-2.3.21/plugins/python-build/share/python-build/patches/3.7.17/Python-3.7.17/0001-Port-ctypes-and-system-libffi-patches-for-arm64-macO.patch 2023-06-20 12:52:59.000000000 +0200 @@ -0,0 +1,310 @@ +From: Christian Hammond <christ...@beanbaginc.com> +Date: Wed, 15 Dec 2021 23:12:36 -0800 +Subject: Port ctypes and system libffi patches for arm64/macOS 10.15+ to Python 3.7.12 + +This ports the following ctypes and libffi pyenv patches for Python +2.7.18 to Python 3.7.12: + +* `0004-Use-system-libffi-for-Mac-OS-10.15-and-up.patch` +* `0005-ctypes-use-the-correct-ABI-for-variadic-functions.patch` +* `0006-ctypes-probe-libffi-for-ffi_closure_alloc-and-ffi_pr.patch` + +These patches enable use of system libffi (fixing a broken `ctypes` +module on arm64 targets) and enable calling variadic functions on arm64. +They've been combined from patches port from Homebrew to pyenv by Takumi +Sueda, updated to work on the Python 3.7.12 codebase. + +The Homebrew patches are themselves backports of changes in Python 3.9 +and 3.10. That patch can be found at: + +https://github.com/Homebrew/formula-patches/blob/master/python/3.8.7.patch + +diff --git a/Doc/library/ctypes.rst b/Doc/library/ctypes.rst +index 715d595b24..7743144978 100644 +--- a/Doc/library/ctypes.rst ++++ b/Doc/library/ctypes.rst +@@ -1551,6 +1551,13 @@ They are instances of a private class: + value usable as argument (integer, string, ctypes instance). This allows + defining adapters that can adapt custom objects as function parameters. + ++ .. attribute:: variadic ++ ++ Assign a boolean to specify that the function takes a variable number of ++ arguments. This does not matter on most platforms, but for Apple arm64 ++ platforms variadic functions have a different calling convention than ++ normal functions. ++ + .. attribute:: errcheck + + Assign a Python function or another callable to this attribute. The +diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py +index 4ebd82d3e0..7b73c190b6 100644 +--- a/Lib/test/test_unicode.py ++++ b/Lib/test/test_unicode.py +@@ -2458,11 +2458,14 @@ class CAPITest(unittest.TestCase): + def test_from_format(self): + support.import_module('ctypes') + from ctypes import ( ++ c_char_p, + pythonapi, py_object, sizeof, + c_int, c_long, c_longlong, c_ssize_t, + c_uint, c_ulong, c_ulonglong, c_size_t, c_void_p) + name = "PyUnicode_FromFormat" + _PyUnicode_FromFormat = getattr(pythonapi, name) ++ _PyUnicode_FromFormat.argtypes = (c_char_p,) ++ _PyUnicode_FromFormat.variadic = True + _PyUnicode_FromFormat.restype = py_object + + def PyUnicode_FromFormat(format, *args): +diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c +index dd0c61fd8a..79137e1dc7 100644 +--- a/Modules/_ctypes/_ctypes.c ++++ b/Modules/_ctypes/_ctypes.c +@@ -3174,6 +3174,34 @@ PyCFuncPtr_get_restype(PyCFuncPtrObject *self, void *Py_UNUSED(ignored)) + } + } + ++static int ++PyCFuncPtr_set_variadic(PyCFuncPtrObject *self, PyObject *ob) ++{ ++ StgDictObject *dict = PyObject_stgdict((PyObject *)self); ++ assert(dict); ++ int r = PyObject_IsTrue(ob); ++ if (r == 1) { ++ dict->flags |= FUNCFLAG_VARIADIC; ++ return 0; ++ } else if (r == 0) { ++ dict->flags &= ~FUNCFLAG_VARIADIC; ++ return 0; ++ } else { ++ return -1; ++ } ++} ++ ++static PyObject * ++PyCFuncPtr_get_variadic(PyCFuncPtrObject *self) ++{ ++ StgDictObject *dict = PyObject_stgdict((PyObject *)self); ++ assert(dict); /* Cannot be NULL for PyCFuncPtrObject instances */ ++ if (dict->flags & FUNCFLAG_VARIADIC) ++ Py_RETURN_TRUE; ++ else ++ Py_RETURN_FALSE; ++} ++ + static int + PyCFuncPtr_set_argtypes(PyCFuncPtrObject *self, PyObject *ob, void *Py_UNUSED(ignored)) + { +@@ -3219,6 +3247,8 @@ static PyGetSetDef PyCFuncPtr_getsets[] = { + { "argtypes", (getter)PyCFuncPtr_get_argtypes, + (setter)PyCFuncPtr_set_argtypes, + "specify the argument types", NULL }, ++ { "variadic", (getter)PyCFuncPtr_get_variadic, (setter)PyCFuncPtr_set_variadic, ++ "specify if function takes variable number of arguments", NULL }, + { NULL, NULL } + }; + +@@ -5632,6 +5662,7 @@ PyInit__ctypes(void) + PyModule_AddObject(m, "FUNCFLAG_USE_ERRNO", PyLong_FromLong(FUNCFLAG_USE_ERRNO)); + PyModule_AddObject(m, "FUNCFLAG_USE_LASTERROR", PyLong_FromLong(FUNCFLAG_USE_LASTERROR)); + PyModule_AddObject(m, "FUNCFLAG_PYTHONAPI", PyLong_FromLong(FUNCFLAG_PYTHONAPI)); ++ PyModule_AddObject(m, "FUNCFLAG_VARIADIC", PyLong_FromLong(FUNCFLAG_VARIADIC)); + PyModule_AddStringConstant(m, "__version__", "1.1.0"); + + PyModule_AddObject(m, "_memmove_addr", PyLong_FromVoidPtr(memmove)); +diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c +index 9cbf9801ad..e7fe11176b 100644 +--- a/Modules/_ctypes/callproc.c ++++ b/Modules/_ctypes/callproc.c +@@ -754,7 +756,8 @@ static int _call_function_pointer(int flags, + ffi_type **atypes, + ffi_type *restype, + void *resmem, +- int argcount) ++ int argcount, ++ int argtypecount) + { + PyThreadState *_save = NULL; /* For Py_BLOCK_THREADS and Py_UNBLOCK_THREADS */ + PyObject *error_object = NULL; +@@ -780,15 +783,39 @@ static int _call_function_pointer(int flags, + if ((flags & FUNCFLAG_CDECL) == 0) + cc = FFI_STDCALL; + #endif +- if (FFI_OK != ffi_prep_cif(&cif, +- cc, +- argcount, +- restype, +- atypes)) { +- PyErr_SetString(PyExc_RuntimeError, +- "ffi_prep_cif failed"); +- return -1; ++ ++#if HAVE_FFI_PREP_CIF_VAR ++ /* Everyone SHOULD set f.variadic=True on variadic function pointers, but ++ * lots of existing code will not. If there's at least one arg and more ++ * args are passed than are defined in the prototype, then it must be a ++ * variadic function. */ ++ if ((flags & FUNCFLAG_VARIADIC) || ++ (argtypecount != 0 && argcount > argtypecount)) ++ { ++ if (FFI_OK != ffi_prep_cif_var(&cif, ++ cc, ++ argtypecount, ++ argcount, ++ restype, ++ atypes)) { ++ PyErr_SetString(PyExc_RuntimeError, ++ "ffi_prep_cif_var failed"); ++ return -1; ++ } ++ } else { ++#endif ++ if (FFI_OK != ffi_prep_cif(&cif, ++ cc, ++ argcount, ++ restype, ++ atypes)) { ++ PyErr_SetString(PyExc_RuntimeError, ++ "ffi_prep_cif failed"); ++ return -1; ++ } ++#if HAVE_FFI_PREP_CIF_VAR + } ++#endif + + if (flags & (FUNCFLAG_USE_ERRNO | FUNCFLAG_USE_LASTERROR)) { + error_object = _ctypes_get_errobj(&space); +@@ -1187,9 +1214,8 @@ PyObject *_ctypes_callproc(PPROC pProc, + + if (-1 == _call_function_pointer(flags, pProc, avalues, atypes, + rtype, resbuf, +- Py_SAFE_DOWNCAST(argcount, +- Py_ssize_t, +- int))) ++ Py_SAFE_DOWNCAST(argcount, Py_ssize_t, int), ++ Py_SAFE_DOWNCAST(argtype_count, Py_ssize_t, int))) + goto cleanup; + + #ifdef WORDS_BIGENDIAN +diff --git a/Modules/_ctypes/ctypes.h b/Modules/_ctypes/ctypes.h +index e58f85233c..e45975f6ad 100644 +--- a/Modules/_ctypes/ctypes.h ++++ b/Modules/_ctypes/ctypes.h +@@ -285,6 +285,7 @@ PyObject *_ctypes_callproc(PPROC pProc, + #define FUNCFLAG_PYTHONAPI 0x4 + #define FUNCFLAG_USE_ERRNO 0x8 + #define FUNCFLAG_USE_LASTERROR 0x10 ++#define FUNCFLAG_VARIADIC 0x20 + + #define TYPEFLAG_ISPOINTER 0x100 + #define TYPEFLAG_HASPOINTER 0x200 +diff --git a/setup.py b/setup.py +index bf90600eaa..48ff120e9a 100644 +--- a/setup.py ++++ b/setup.py +@@ -142,6 +142,13 @@ def macosx_sdk_root(): + + return MACOS_SDK_ROOT + ++def is_macosx_at_least(vers): ++ if host_platform == 'darwin': ++ dep_target = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET') ++ if dep_target: ++ return tuple(map(int, str(dep_target).split('.'))) >= vers ++ return False ++ + def is_macosx_sdk_path(path): + """ + Returns True if 'path' can be located in an OSX SDK +@@ -150,6 +157,13 @@ def is_macosx_sdk_path(path): + or path.startswith('/System/') + or path.startswith('/Library/') ) + ++def grep_headers_for(function, headers): ++ for header in headers: ++ with open(header, 'r') as f: ++ if function in f.read(): ++ return True ++ return False ++ + def find_file(filename, std_dirs, paths): + """Searches for the directory where a given file is located, + and returns a possibly-empty list of additional directories, or None +@@ -1972,7 +1986,11 @@ class PyBuildExt(build_ext): + return True + + def detect_ctypes(self, inc_dirs, lib_dirs): +- self.use_system_libffi = False ++ if not sysconfig.get_config_var("LIBFFI_INCLUDEDIR") and is_macosx_at_least((10,15)): ++ self.use_system_libffi = True ++ else: ++ self.use_system_libffi = '--with-system-ffi' in sysconfig.get_config_var("CONFIG_ARGS") ++ + include_dirs = [] + extra_compile_args = [] + extra_link_args = [] +@@ -2018,30 +2036,47 @@ class PyBuildExt(build_ext): + libraries=['m']) + self.extensions.extend([ext, ext_test]) + ++ ffi_inc = sysconfig.get_config_var("LIBFFI_INCLUDEDIR") ++ ffi_lib = None ++ + if host_platform == 'darwin': +- if '--with-system-ffi' not in sysconfig.get_config_var("CONFIG_ARGS"): ++ if not self.use_system_libffi: + return +- # OS X 10.5 comes with libffi.dylib; the include files are +- # in /usr/include/ffi +- inc_dirs.append('/usr/include/ffi') +- +- ffi_inc = [sysconfig.get_config_var("LIBFFI_INCLUDEDIR")] +- if not ffi_inc or ffi_inc[0] == '': +- ffi_inc = find_file('ffi.h', [], inc_dirs) +- if ffi_inc is not None: +- ffi_h = ffi_inc[0] + '/ffi.h' ++ ffi_in_sdk = os.path.join(macosx_sdk_root(), "usr/include/ffi") ++ if os.path.exists(ffi_in_sdk): ++ ffi_inc = ffi_in_sdk ++ ffi_lib = 'ffi' ++ else: ++ # OS X 10.5 comes with libffi.dylib; the include files are ++ # in /usr/include/ffi ++ inc_dirs.append('/usr/include/ffi') ++ ++ if not ffi_inc: ++ found = find_file('ffi.h', [], inc_dirs) ++ if found: ++ ffi_inc = found[0] ++ if ffi_inc: ++ ffi_h = ffi_inc + '/ffi.h' + if not os.path.exists(ffi_h): + ffi_inc = None + print('Header file {} does not exist'.format(ffi_h)) +- ffi_lib = None +- if ffi_inc is not None: +- for lib_name in ('ffi', 'ffi_pic'): ++ ++ if ffi_lib is None and ffi_inc: ++ for lib_name in ('ffi_convenience', 'ffi_pic', 'ffi'): + if (self.compiler.find_library_file(lib_dirs, lib_name)): + ffi_lib = lib_name + break + + if ffi_inc and ffi_lib: +- ext.include_dirs.extend(ffi_inc) ++ ffi_headers = glob(os.path.join(ffi_inc, '*.h')) ++ if grep_headers_for('ffi_closure_alloc', ffi_headers): ++ try: ++ sources.remove('_ctypes/malloc_closure.c') ++ except ValueError: ++ pass ++ if grep_headers_for('ffi_prep_cif_var', ffi_headers): ++ ext.extra_compile_args.append("-DHAVE_FFI_PREP_CIF_VAR=1") ++ ext.include_dirs.append(ffi_inc) + ext.libraries.append(ffi_lib) + self.use_system_libffi = True + +-- +2.30.1 (Apple Git-130) + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyenv-2.3.19/plugins/python-build/share/python-build/patches/3.7.17/Python-3.7.17/0002-bpo-41100-fix-_decimal-for-arm64-Mac-OS-GH-21228.patch new/pyenv-2.3.21/plugins/python-build/share/python-build/patches/3.7.17/Python-3.7.17/0002-bpo-41100-fix-_decimal-for-arm64-Mac-OS-GH-21228.patch --- old/pyenv-2.3.19/plugins/python-build/share/python-build/patches/3.7.17/Python-3.7.17/0002-bpo-41100-fix-_decimal-for-arm64-Mac-OS-GH-21228.patch 1970-01-01 01:00:00.000000000 +0100 +++ new/pyenv-2.3.21/plugins/python-build/share/python-build/patches/3.7.17/Python-3.7.17/0002-bpo-41100-fix-_decimal-for-arm64-Mac-OS-GH-21228.patch 2023-06-20 12:52:59.000000000 +0200 @@ -0,0 +1,37 @@ +From f2595c038ed7bfd182d9d05d83786106ebd02ca0 Mon Sep 17 00:00:00 2001 +From: Lawrence D'Anna <64555057+lawrence-danna-ap...@users.noreply.github.com> +Date: Tue, 30 Jun 2020 02:15:46 -0700 +Subject: [PATCH] bpo-41100: fix _decimal for arm64 Mac OS (GH-21228) + +Patch by Lawrence Danna. +--- + .../Core and Builtins/2020-06-30-04-44-29.bpo-41100.PJwA6F.rst | 1 + + Modules/_decimal/libmpdec/mpdecimal.h | 3 +++ + 2 files changed, 4 insertions(+) + create mode 100644 Misc/NEWS.d/next/Core and Builtins/2020-06-30-04-44-29.bpo-41100.PJwA6F.rst + +diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-06-30-04-44-29.bpo-41100.PJwA6F.rst b/Misc/NEWS.d/next/Core and Builtins/2020-06-30-04-44-29.bpo-41100.PJwA6F.rst +new file mode 100644 +index 0000000000..d6176d69f0 +--- /dev/null ++++ b/Misc/NEWS.d/next/Core and Builtins/2020-06-30-04-44-29.bpo-41100.PJwA6F.rst +@@ -0,0 +1 @@ ++add arm64 to the allowable Mac OS arches in mpdecimal.h +\ No newline at end of file +diff --git a/Modules/_decimal/libmpdec/mpdecimal.h b/Modules/_decimal/libmpdec/mpdecimal.h +index a67dd9bc12..3e9c8185c3 100644 +--- a/Modules/_decimal/libmpdec/mpdecimal.h ++++ b/Modules/_decimal/libmpdec/mpdecimal.h +@@ -135,6 +135,9 @@ const char *mpd_version(void); + #elif defined(__x86_64__) + #define CONFIG_64 + #define ASM ++ #elif defined(__arm64__) ++ #define CONFIG_64 ++ #define ANSI + #else + #error "unknown architecture for universal build." + #endif +-- +2.37.3 + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyenv-2.3.19/plugins/python-build/share/python-build/patches/3.7.17/Python-3.7.17/0003-bpo-42351-Avoid-error-when-opening-header-with-non-U.patch new/pyenv-2.3.21/plugins/python-build/share/python-build/patches/3.7.17/Python-3.7.17/0003-bpo-42351-Avoid-error-when-opening-header-with-non-U.patch --- old/pyenv-2.3.19/plugins/python-build/share/python-build/patches/3.7.17/Python-3.7.17/0003-bpo-42351-Avoid-error-when-opening-header-with-non-U.patch 1970-01-01 01:00:00.000000000 +0100 +++ new/pyenv-2.3.21/plugins/python-build/share/python-build/patches/3.7.17/Python-3.7.17/0003-bpo-42351-Avoid-error-when-opening-header-with-non-U.patch 2023-06-20 12:52:59.000000000 +0200 @@ -0,0 +1,30 @@ +From 245427d207ee88a4ba26a66c3de350bcbcc036f2 Mon Sep 17 00:00:00 2001 +From: Ronald Oussoren <ronaldousso...@mac.com> +Date: Sat, 14 Nov 2020 16:07:47 +0100 +Subject: [PATCH] bpo-42351: Avoid error when opening header with non-UTF8 + encoding (GH-23279) + +grep_headers_for() would error out when a header contained +text that cannot be interpreted as UTF-8. + +cherry-picked from 7a27c7ed4b by Pedro Fonini <fon...@ip.tv> +--- + setup.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/setup.py b/setup.py +index f211989aac..467362813d 100644 +--- a/setup.py ++++ b/setup.py +@@ -159,7 +159,7 @@ def is_macosx_sdk_path(path): + + def grep_headers_for(function, headers): + for header in headers: +- with open(header, 'r') as f: ++ with open(header, 'r', errors='surrogateescape') as f: + if function in f.read(): + return True + return False +-- +2.34.1 + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyenv-2.3.19/plugins/python-build/share/python-build/pypy2.7-7.3.12 new/pyenv-2.3.21/plugins/python-build/share/python-build/pypy2.7-7.3.12 --- old/pyenv-2.3.19/plugins/python-build/share/python-build/pypy2.7-7.3.12 1970-01-01 01:00:00.000000000 +0100 +++ new/pyenv-2.3.21/plugins/python-build/share/python-build/pypy2.7-7.3.12 2023-06-20 12:52:59.000000000 +0200 @@ -0,0 +1,81 @@ +VERSION='7.3.12' +PYVER='2.7' + +# https://www.pypy.org/checksums.html +aarch64_hash=e04dcb6286a7b4724ec3f0e50d3cc1ba8583301dd1658c06d7f37599e4201c59 +linux32_hash=abf3ae477bd0e526ac6dcefe0bfa845e1535aa053342c0d641219bfcde4b9b56 +linux64_hash=1a61a2574b79466f606010f2999a2b995bd96cd085f91a78ebdd3d5c2c40e81d +osarm64_hash=6b747aa076ae8597e49603c5dec4ca5935a1a0a132d7404a559be96a260d9bf7 +osx64_hash=6e89ffdd15537ce4ffce3145b65ee57c2e9c952892bd95b934012d2f009f503b +s390x_hash=80c0154d8b0949f9dc6a227c322abbc9590c8ae4c9f11c13bf4022aa38b82064 + +### end of manual settings - following lines same for every download + +function err_no_binary { + local archmsg="${1}" + local ver="pypy${PYVER}-v${VERSION}-src" + local url="https://downloads.python.org/pypy/${ver}.tar.bz2" + { echo + colorize 1 "ERROR" + echo ": The binary distribution of PyPy is not available for ${archmsg}." + echo "try '${url}' to build from source." + echo + } >&2 + exit 1 +} + +function pypy_pkg_data { + # pypy architecture tag + local ARCH="${1}" + + # defaults + local cmd='install_package' # use bz2 + local pkg="${ARCH}" # assume matches + local ext='tar.bz2' + local hash='' # undefined + + # select the hash, fix pkg if not match ARCH + case "${ARCH}" in + 'linux-aarch64' ) + hash="${aarch64_hash}" + pkg='aarch64' + ;; + 'linux' ) + hash="${linux32_hash}" + pkg='linux32' + ;; + 'linux64' ) + hash="${linux64_hash}" + ;; + 'osarm64' ) + hash="${osarm64_hash}" + pkg='macos_arm64' + ;; + 'osx64' ) + if require_osx_version "10.13"; then + hash="${osx64_hash}" + pkg='macos_x86_64' + else + err_no_binary "${ARCH}, OS X < 10.13" + fi + ;; + 's390x' ) + hash="${s390x_hash}" + ;; + * ) + err_no_binary "${ARCH}" + ;; + esac + + local basever="pypy${PYVER}-v${VERSION}" + local baseurl="https://downloads.python.org/pypy/${basever}" + + # result - command, package dir, url+hash + echo "${cmd}" "${basever}-${pkg}" "${baseurl}-${pkg}.${ext}#${hash}" +} + +# determine command, package directory, url+hash +declare -a pd="$(pypy_pkg_data "$(pypy_architecture 2>/dev/null || true)")" + +# install +${pd[0]} "${pd[1]}" "${pd[2]}" 'pypy' "verify_py${PYVER//./}" 'ensurepip' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyenv-2.3.19/plugins/python-build/share/python-build/pypy2.7-7.3.12-src new/pyenv-2.3.21/plugins/python-build/share/python-build/pypy2.7-7.3.12-src --- old/pyenv-2.3.19/plugins/python-build/share/python-build/pypy2.7-7.3.12-src 1970-01-01 01:00:00.000000000 +0100 +++ new/pyenv-2.3.21/plugins/python-build/share/python-build/pypy2.7-7.3.12-src 2023-06-20 12:52:59.000000000 +0200 @@ -0,0 +1,14 @@ +VERSION='7.3.12' +PYVER='2.7' + +# https://www.pypy.org/checksums.html +hash=dd61d88da274c2ce2cec77667d4a3df9a652bcc50e26f90991d4dd0af66bccf4 + +### end of manual settings - following lines same for every download + +ver="pypy${PYVER}-v${VERSION}-src" +url="https://downloads.python.org/pypy/${ver}.tar.bz2" + +prefer_openssl11 +install_package "openssl-1.1.1f" "https://www.openssl.org/source/openssl-1.1.1f.tar.gz#186c6bfe6ecfba7a5b48c47f8a1673d0f3b0e5ba2e25602dd23b629975da3f35" mac_openssl --if has_broken_mac_openssl +install_package "${ver}" "${url}#${hash}" 'pypy_builder' "verify_py${PYVER//./}" 'ensurepip' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyenv-2.3.19/plugins/python-build/share/python-build/pypy3.10-7.3.12 new/pyenv-2.3.21/plugins/python-build/share/python-build/pypy3.10-7.3.12 --- old/pyenv-2.3.19/plugins/python-build/share/python-build/pypy3.10-7.3.12 1970-01-01 01:00:00.000000000 +0100 +++ new/pyenv-2.3.21/plugins/python-build/share/python-build/pypy3.10-7.3.12 2023-06-20 12:52:59.000000000 +0200 @@ -0,0 +1,81 @@ +VERSION='7.3.12' +PYVER='3.10' + +# https://www.pypy.org/checksums.html +aarch64_hash=26208b5a134d9860a08f74cce60960005758e82dc5f0e3566a48ed863a1f16a1 +linux32_hash=811667825ae58ada4b7c3d8bc1b5055b9f9d6a377e51aedfbe0727966603f60e +linux64_hash=6c577993160b6f5ee8cab73cd1a807affcefafe2f7441c87bd926c10505e8731 +osarm64_hash=45671b1e9437f95ccd790af10dbeb57733cca1ed9661463b727d3c4f5caa7ba0 +osx64_hash=dbc15d8570560d5f79366883c24bc42231a92855ac19a0f28cb0adeb11242666 +s390x_hash=043c13a585479428b463ab69575a088db74aadc16798d6e677d97f563585fee3 + +### end of manual settings - following lines same for every download + +function err_no_binary { + local archmsg="${1}" + local ver="pypy${PYVER}-v${VERSION}-src" + local url="https://downloads.python.org/pypy/${ver}.tar.bz2" + { echo + colorize 1 "ERROR" + echo ": The binary distribution of PyPy is not available for ${archmsg}." + echo "try '${url}' to build from source." + echo + } >&2 + exit 1 +} + +function pypy_pkg_data { + # pypy architecture tag + local ARCH="${1}" + + # defaults + local cmd='install_package' # use bz2 + local pkg="${ARCH}" # assume matches + local ext='tar.bz2' + local hash='' # undefined + + # select the hash, fix pkg if not match ARCH + case "${ARCH}" in + 'linux-aarch64' ) + hash="${aarch64_hash}" + pkg='aarch64' + ;; + 'linux' ) + hash="${linux32_hash}" + pkg='linux32' + ;; + 'linux64' ) + hash="${linux64_hash}" + ;; + 'osarm64' ) + hash="${osarm64_hash}" + pkg='macos_arm64' + ;; + 'osx64' ) + if require_osx_version "10.13"; then + hash="${osx64_hash}" + pkg='macos_x86_64' + else + err_no_binary "${ARCH}, OS X < 10.13" + fi + ;; + 's390x' ) + hash="${s390x_hash}" + ;; + * ) + err_no_binary "${ARCH}" + ;; + esac + + local basever="pypy${PYVER}-v${VERSION}" + local baseurl="https://downloads.python.org/pypy/${basever}" + + # result - command, package dir, url+hash + echo "${cmd}" "${basever}-${pkg}" "${baseurl}-${pkg}.${ext}#${hash}" +} + +# determine command, package directory, url+hash +declare -a pd="$(pypy_pkg_data "$(pypy_architecture 2>/dev/null || true)")" + +# install +${pd[0]} "${pd[1]}" "${pd[2]}" 'pypy' "verify_py${PYVER//./}" 'ensurepip' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyenv-2.3.19/plugins/python-build/share/python-build/pypy3.10-7.3.12-src new/pyenv-2.3.21/plugins/python-build/share/python-build/pypy3.10-7.3.12-src --- old/pyenv-2.3.19/plugins/python-build/share/python-build/pypy3.10-7.3.12-src 1970-01-01 01:00:00.000000000 +0100 +++ new/pyenv-2.3.21/plugins/python-build/share/python-build/pypy3.10-7.3.12-src 2023-06-20 12:52:59.000000000 +0200 @@ -0,0 +1,14 @@ +VERSION='7.3.12' +PYVER='3.10' + +# https://www.pypy.org/checksums.html +hash=86e4e4eacc36046c6182f43018796537fe33a60e1d2a2cc6b8e7f91a5dcb3e42 + +### end of manual settings - following lines same for every download + +ver="pypy${PYVER}-v${VERSION}-src" +url="https://downloads.python.org/pypy/${ver}.tar.bz2" + +prefer_openssl11 +install_package "openssl-1.1.1f" "https://www.openssl.org/source/openssl-1.1.1f.tar.gz#186c6bfe6ecfba7a5b48c47f8a1673d0f3b0e5ba2e25602dd23b629975da3f35" mac_openssl --if has_broken_mac_openssl +install_package "${ver}" "${url}#${hash}" 'pypy_builder' "verify_py${PYVER//./}" 'ensurepip' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyenv-2.3.19/plugins/python-build/share/python-build/pypy3.9-7.3.12 new/pyenv-2.3.21/plugins/python-build/share/python-build/pypy3.9-7.3.12 --- old/pyenv-2.3.19/plugins/python-build/share/python-build/pypy3.9-7.3.12 1970-01-01 01:00:00.000000000 +0100 +++ new/pyenv-2.3.21/plugins/python-build/share/python-build/pypy3.9-7.3.12 2023-06-20 12:52:59.000000000 +0200 @@ -0,0 +1,81 @@ +VERSION='7.3.12' +PYVER='3.9' + +# https://www.pypy.org/checksums.html +aarch64_hash=e9327fb9edaf2ad91935d5b8563ec5ff24193bddb175c1acaaf772c025af1824 +linux32_hash=aa04370d38f451683ccc817d76c2b3e0f471dbb879e0bd618d9affbdc9cd37a4 +linux64_hash=84c89b966fab2b58f451a482ee30ca7fec3350435bd0b9614615c61dc6da2390 +osarm64_hash=0e8a1a3468b9790c734ac698f5b00cc03fc16899ccc6ce876465fac0b83980e3 +osx64_hash=64f008ffa070c407e5ef46c8256b2e014de7196ea5d858385861254e7959f4eb +s390x_hash=20d84658a6899bdd2ca35b00ead33a2f56cff2c40dce1af630466d27952f6d4f + +### end of manual settings - following lines same for every download + +function err_no_binary { + local archmsg="${1}" + local ver="pypy${PYVER}-v${VERSION}-src" + local url="https://downloads.python.org/pypy/${ver}.tar.bz2" + { echo + colorize 1 "ERROR" + echo ": The binary distribution of PyPy is not available for ${archmsg}." + echo "try '${url}' to build from source." + echo + } >&2 + exit 1 +} + +function pypy_pkg_data { + # pypy architecture tag + local ARCH="${1}" + + # defaults + local cmd='install_package' # use bz2 + local pkg="${ARCH}" # assume matches + local ext='tar.bz2' + local hash='' # undefined + + # select the hash, fix pkg if not match ARCH + case "${ARCH}" in + 'linux-aarch64' ) + hash="${aarch64_hash}" + pkg='aarch64' + ;; + 'linux' ) + hash="${linux32_hash}" + pkg='linux32' + ;; + 'linux64' ) + hash="${linux64_hash}" + ;; + 'osarm64' ) + hash="${osarm64_hash}" + pkg='macos_arm64' + ;; + 'osx64' ) + if require_osx_version "10.13"; then + hash="${osx64_hash}" + pkg='macos_x86_64' + else + err_no_binary "${ARCH}, OS X < 10.13" + fi + ;; + 's390x' ) + hash="${s390x_hash}" + ;; + * ) + err_no_binary "${ARCH}" + ;; + esac + + local basever="pypy${PYVER}-v${VERSION}" + local baseurl="https://downloads.python.org/pypy/${basever}" + + # result - command, package dir, url+hash + echo "${cmd}" "${basever}-${pkg}" "${baseurl}-${pkg}.${ext}#${hash}" +} + +# determine command, package directory, url+hash +declare -a pd="$(pypy_pkg_data "$(pypy_architecture 2>/dev/null || true)")" + +# install +${pd[0]} "${pd[1]}" "${pd[2]}" 'pypy' "verify_py${PYVER//./}" 'ensurepip' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyenv-2.3.19/plugins/python-build/share/python-build/pypy3.9-7.3.12-src new/pyenv-2.3.21/plugins/python-build/share/python-build/pypy3.9-7.3.12-src --- old/pyenv-2.3.19/plugins/python-build/share/python-build/pypy3.9-7.3.12-src 1970-01-01 01:00:00.000000000 +0100 +++ new/pyenv-2.3.21/plugins/python-build/share/python-build/pypy3.9-7.3.12-src 2023-06-20 12:52:59.000000000 +0200 @@ -0,0 +1,14 @@ +VERSION='7.3.12' +PYVER='3.9' + +# https://www.pypy.org/checksums.html +hash=e7a2046c7e6c25fc386abbb5132e92a7cc2491e3935699a946cb5dcbb342c2aa + +### end of manual settings - following lines same for every download + +ver="pypy${PYVER}-v${VERSION}-src" +url="https://downloads.python.org/pypy/${ver}.tar.bz2" + +prefer_openssl11 +install_package "openssl-1.1.1f" "https://www.openssl.org/source/openssl-1.1.1f.tar.gz#186c6bfe6ecfba7a5b48c47f8a1673d0f3b0e5ba2e25602dd23b629975da3f35" mac_openssl --if has_broken_mac_openssl +install_package "${ver}" "${url}#${hash}" 'pypy_builder' "verify_py${PYVER//./}" 'ensurepip'