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