From 9cc7133e1bbbc1eda82bc907d381c0662041872f Mon Sep 17 00:00:00 2001 From: John Zhou Date: Sat, 12 Apr 2025 20:12:54 -0500 Subject: [PATCH 01/22] try to add xros support --- Makefile | 6 +- patch/Python/Python.patch | 1344 +++++++++++++++++++++++++++++++++---- 2 files changed, 1209 insertions(+), 141 deletions(-) diff --git a/Makefile b/Makefile index 7d3f6bfa..262d8635 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,7 @@ # - iOS - build everything for iOS # - tvOS - build everything for tvOS # - watchOS - build everything for watchOS +# - xrOS - build everything for xrOS (visionOS) # Current directory PROJECT_DIR=$(shell pwd) @@ -33,7 +34,7 @@ OPENSSL_VERSION=3.0.16-1 XZ_VERSION=5.6.4-1 # Supported OS -OS_LIST=macOS iOS tvOS watchOS +OS_LIST=macOS iOS tvOS watchOS xrOS CURL_FLAGS=--disable --fail --location --create-dirs --progress-bar @@ -53,6 +54,9 @@ VERSION_MIN-tvOS=12.0 TARGETS-watchOS=watchsimulator.x86_64 watchsimulator.arm64 watchos.arm64_32 VERSION_MIN-watchOS=4.0 +TARGETS-xrOS=xrsimulator.arm64 xros.arm64 +VERSION_MIN-xrOS=1.0 + # The architecture of the machine doing the build HOST_ARCH=$(shell uname -m) HOST_PYTHON=$(shell which python$(PYTHON_VER)) diff --git a/patch/Python/Python.patch b/patch/Python/Python.patch index c9c0ef6f..edfcd1d3 100644 --- a/patch/Python/Python.patch +++ b/patch/Python/Python.patch @@ -1,8 +1,8 @@ diff --git a/Lib/platform.py b/Lib/platform.py -index 1f6baed66d3..235dd98c60a 100644 +index 1f6baed..7e8bc9b 100644 --- a/Lib/platform.py +++ b/Lib/platform.py -@@ -521,6 +521,54 @@ +@@ -521,6 +521,78 @@ def ios_ver(system="", release="", model="", is_simulator=False): return IOSVersionInfo(system, release, model, is_simulator) @@ -53,18 +53,42 @@ index 1f6baed66d3..235dd98c60a 100644 + + return WatchOSVersionInfo(system, release, model, is_simulator) + ++ ++# A namedtuple for xrOS version information. ++XrOSVersionInfo = collections.namedtuple( ++ "XrOSVersionInfo", ++ ["system", "release", "model", "is_simulator"] ++) ++ ++ ++def xros_ver(system="", release="", model="", is_simulator=False): ++ """Get xrOS version information, and return it as a namedtuple: ++ (system, release, model, is_simulator). ++ ++ If values can't be determined, they are set to values provided as ++ parameters. ++ """ ++ if sys.platform == "xros": ++ # TODO: Can the iOS implementation be used here? ++ import _ios_support ++ result = _ios_support.get_platform_ios() ++ if result is not None: ++ return XrOSVersionInfo(*result) ++ ++ return XrOSVersionInfo(system, release, model, is_simulator) ++ + def _java_getprop(name, default): """This private helper is deprecated in 3.13 and will be removed in 3.15""" from java.lang import System -@@ -884,14 +932,25 @@ +@@ -884,14 +956,30 @@ class _Processor: csid, cpu_number = vms_lib.getsyi('SYI$_CPU', 0) return 'Alpha' if cpu_number >= 128 else 'VAX' - # On the iOS simulator, os.uname returns the architecture as uname.machine. - # On device it returns the model name for some reason; but there's only one - # CPU architecture for iOS devices, so we know the right answer. -+ # On the iOS/tvOS/watchOS simulator, os.uname returns the architecture as ++ # On the iOS/tvOS/watchOS/xrOS simulator, os.uname returns the architecture as + # uname.machine. On device it returns the model name for some reason; but + # there's only one CPU architecture for devices, so we know the right + # answer. @@ -82,11 +106,16 @@ index 1f6baed66d3..235dd98c60a 100644 + if sys.implementation._multiarch.endswith("simulator"): + return os.uname().machine + return 'arm64_32' ++ ++ def get_xros(): ++ if sys.implementation._multiarch.endswith("simulator"): ++ return os.uname().machine ++ return 'arm64' + def from_subprocess(): """ Fall back to `uname -p` -@@ -1051,9 +1110,13 @@ +@@ -1051,9 +1139,15 @@ def uname(): system = 'Android' release = android_ver().release @@ -98,10 +127,12 @@ index 1f6baed66d3..235dd98c60a 100644 + system, release, _, _ = tvos_ver() + if sys.platform == 'watchos': + system, release, _, _ = watchos_ver() ++ if sys.platform == 'xros': ++ system, release, _, _ = xros_ver() vals = system, node, release, version, machine # Replace 'unknown' values with the more portable '' -@@ -1343,6 +1406,10 @@ +@@ -1343,6 +1437,12 @@ def platform(aliased=False, terse=False): # macOS and iOS both report as a "Darwin" kernel if sys.platform == "ios": system, release, _, _ = ios_ver() @@ -109,14 +140,16 @@ index 1f6baed66d3..235dd98c60a 100644 + system, release, _, _ = tvos_ver() + elif sys.platform == "watchos": + system, release, _, _ = watchos_ver() ++ elif sys.platform == "xros": ++ system, release, _, _ = xros_ver() else: macos_release = mac_ver()[0] if macos_release: diff --git a/Lib/sysconfig/__init__.py b/Lib/sysconfig/__init__.py -index 18e6b8d25e5..4994c56778c 100644 +index 18e6b8d..28a491f 100644 --- a/Lib/sysconfig/__init__.py +++ b/Lib/sysconfig/__init__.py -@@ -719,6 +719,14 @@ +@@ -719,6 +719,18 @@ def get_platform(): release = get_config_vars().get("IPHONEOS_DEPLOYMENT_TARGET", "13.0") osname = sys.platform machine = sys.implementation._multiarch @@ -127,15 +160,19 @@ index 18e6b8d25e5..4994c56778c 100644 + elif sys.platform == "watchos": + release = get_config_vars().get("WATCHOS_DEPLOYMENT_TARGET", "4.0") + osname = sys.platform ++ machine = sys.implementation._multiarch ++ elif sys.platform == "xros": ++ release = get_config_vars().get("XROS_DEPLOYMENT_TARGET", "4.0") ++ osname = sys.platform + machine = sys.implementation._multiarch else: import _osx_support osname, release, machine = _osx_support.get_platform_osx( diff --git a/Misc/platform_triplet.c b/Misc/platform_triplet.c -index ec0857a4a99..2350e9dc821 100644 +index ec0857a..432ff74 100644 --- a/Misc/platform_triplet.c +++ b/Misc/platform_triplet.c -@@ -257,6 +257,26 @@ +@@ -257,6 +257,32 @@ PLATFORM_TRIPLET=arm64-iphonesimulator # else PLATFORM_TRIPLET=arm64-iphoneos # endif @@ -158,24 +195,247 @@ index ec0857a4a99..2350e9dc821 100644 +# endif +# else +PLATFORM_TRIPLET=arm64_32-watchos ++# endif ++# elif defined(TARGET_OS_VISION) && TARGET_OS_VISION ++# if defined(TARGET_OS_SIMULATOR) && TARGET_OS_SIMULATOR ++PLATFORM_TRIPLET=arm64-xrsimulator ++# else ++PLATFORM_TRIPLET=arm64_32-xros +# endif // Older macOS SDKs do not define TARGET_OS_OSX # elif !defined(TARGET_OS_OSX) || TARGET_OS_OSX PLATFORM_TRIPLET=darwin +diff --git a/aclocal.m4 b/aclocal.m4 +index 920c2b3..1f932fa 100644 +--- a/aclocal.m4 ++++ b/aclocal.m4 +@@ -1,6 +1,6 @@ +-# generated automatically by aclocal 1.16.5 -*- Autoconf -*- ++# generated automatically by aclocal 1.17 -*- Autoconf -*- + +-# Copyright (C) 1996-2021 Free Software Foundation, Inc. ++# Copyright (C) 1996-2024 Free Software Foundation, Inc. + + # This file is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, +@@ -44,12 +44,12 @@ m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun + # Early versions of this macro (i.e., before serial 12) would not work + # when interprocedural optimization (via link-time optimization) was + # enabled. This would happen when, say, the GCC/clang "-flto" flag, or the +-# ICC "-ipo" flag was used, for example. The problem was that under +-# these conditions, the compiler did not allocate for and write the special ++# ICC "-ipo" flag was used, for example. The problem was that under these ++# conditions, the compiler did not allocate for and write the special + # float value in the data segment of the object file, since doing so might +-# not prove optimal once more context was available. Thus, the special value +-# (in platform-dependent binary form) could not be found in the object file, +-# and the macro would fail. ++# not prove optimal once more context was available. Thus, the special ++# value (in platform-dependent binary form) could not be found in the ++# object file, and the macro would fail. + # + # The solution to the above problem was to: + # +@@ -68,19 +68,19 @@ m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun + # program binary that contains the value, which the macro can then find. + # + # How does the exit code depend on the special value residing in memory? +-# Memory, unlike variables and registers, can be addressed indirectly at run +-# time. The exit code of this test program is a result of indirectly reading +-# and writing to the memory region where the special value is supposed to +-# reside. The actual memory addresses used and the values to be written are +-# derived from the the program input ("argv") and are therefore not known at +-# compile or link time. The compiler has no choice but to defer the +-# computation to run time, and to prepare by allocating and populating the +-# data segment with the special value. For further details, refer to the +-# source code of the test program. +-# +-# Note that the test program is never meant to be run. It only exists to host +-# a double float value in a given platform's binary format. Thus, error +-# handling is not included. ++# Memory, unlike variables and registers, can be addressed indirectly at ++# run time. The exit code of this test program is a result of indirectly ++# reading and writing to the memory region where the special value is ++# supposed to reside. The actual memory addresses used and the values to ++# be written are derived from the the program input ("argv") and are ++# therefore not known at compile or link time. The compiler has no choice ++# but to defer the computation to run time, and to prepare by allocating ++# and populating the data segment with the special value. For further ++# details, refer to the source code of the test program. ++# ++# Note that the test program is never meant to be run. It only exists to ++# host a double float value in a given platform's binary format. Thus, ++# error handling is not included. + # + # LICENSE + # +@@ -91,7 +91,7 @@ m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun + # and this notice are preserved. This file is offered as-is, without any + # warranty. + +-#serial 14 ++#serial 13 + + AC_DEFUN([AX_C_FLOAT_WORDS_BIGENDIAN], + [AC_CACHE_CHECK(whether float word ordering is bigendian, +@@ -112,10 +112,10 @@ int main (int argc, char *argv[]) + + ]])], [ + +-if grep noonsees conftest* > /dev/null ; then ++if grep noonsees conftest$EXEEXT >/dev/null ; then + ax_cv_c_float_words_bigendian=yes + fi +-if grep seesnoon conftest* >/dev/null ; then ++if grep seesnoon conftest$EXEEXT >/dev/null ; then + if test "$ax_cv_c_float_words_bigendian" = unknown; then + ax_cv_c_float_words_bigendian=no + else +@@ -181,14 +181,24 @@ esac + # and this notice are preserved. This file is offered as-is, without any + # warranty. + +-#serial 6 ++#serial 11 + + AC_DEFUN([AX_CHECK_COMPILE_FLAG], + [AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF + AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl +-AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [ ++AC_CACHE_CHECK([whether the _AC_LANG compiler accepts $1], CACHEVAR, [ + ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS +- _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1" ++ if test x"m4_case(_AC_LANG, ++ [C], [$GCC], ++ [C++], [$GXX], ++ [Fortran], [$GFC], ++ [Fortran 77], [$G77], ++ [Objective C], [$GOBJC], ++ [Objective C++], [$GOBJCXX], ++ [no])" = xyes ; then ++ add_gnu_werror="-Werror" ++ fi ++ _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1 $add_gnu_werror" + AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], + [AS_VAR_SET(CACHEVAR,[yes])], + [AS_VAR_SET(CACHEVAR,[no])]) +@@ -224,7 +234,7 @@ AS_VAR_POPDEF([CACHEVAR])dnl + # and this notice are preserved. This file is offered as-is, without any + # warranty. + +-#serial 11 ++#serial 12 + + AU_ALIAS([AC_CHECK_DEFINED], [AC_CHECK_DEFINE]) + AC_DEFUN([AC_CHECK_DEFINE],[ +@@ -264,8 +274,8 @@ AC_CACHE_CHECK([for $2], ac_var, + dnl AC_LANG_FUNC_LINK_TRY + [AC_LINK_IFELSE([AC_LANG_PROGRAM([$1 + #undef $2 +- char $2 ();],[ +- char (*f) () = $2; ++ char $2 (void);],[ ++ char (*f) (void) = $2; + return f != $2; ])], + [AS_VAR_SET(ac_var, yes)], + [AS_VAR_SET(ac_var, no)])]) +@@ -399,7 +409,7 @@ AC_DEFUN([AX_CHECK_OPENSSL], [ + ]) + + # pkg.m4 - Macros to locate and use pkg-config. -*- Autoconf -*- +-# serial 12 (pkg-config-0.29.2) ++# serial 13 (pkgconf) + + dnl Copyright © 2004 Scott James Remnant . + dnl Copyright © 2012-2015 Dan Nicholson +@@ -415,9 +425,7 @@ dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + dnl General Public License for more details. + dnl + dnl You should have received a copy of the GNU General Public License +-dnl along with this program; if not, write to the Free Software +-dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +-dnl 02111-1307, USA. ++dnl along with this program; if not, see . + dnl + dnl As a special exception to the GNU General Public License, if you + dnl distribute this file as part of a program that contains a +@@ -446,8 +454,8 @@ m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, + [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) + ])dnl PKG_PREREQ + +-dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) +-dnl ---------------------------------- ++dnl PKG_PROG_PKG_CONFIG([MIN-VERSION], [ACTION-IF-NOT-FOUND]) ++dnl --------------------------------------------------------- + dnl Since: 0.16 + dnl + dnl Search for the pkg-config tool and set the PKG_CONFIG variable to +@@ -455,6 +463,12 @@ dnl first found in the path. Checks that the version of pkg-config found + dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is + dnl used since that's the first version where most current features of + dnl pkg-config existed. ++dnl ++dnl If pkg-config is not found or older than specified, it will result ++dnl in an empty PKG_CONFIG variable. To avoid widespread issues with ++dnl scripts not checking it, ACTION-IF-NOT-FOUND defaults to aborting. ++dnl You can specify [PKG_CONFIG=false] as an action instead, which would ++dnl result in pkg-config tests failing, but no bogus error messages. + AC_DEFUN([PKG_PROG_PKG_CONFIG], + [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) + m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) +@@ -475,6 +489,9 @@ if test -n "$PKG_CONFIG"; then + AC_MSG_RESULT([no]) + PKG_CONFIG="" + fi ++fi ++if test -z "$PKG_CONFIG"; then ++ m4_default([$2], [AC_MSG_ERROR([pkg-config not found])]) + fi[]dnl + ])dnl PKG_PROG_PKG_CONFIG + +@@ -744,7 +761,7 @@ AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"], + + # AM_CONDITIONAL -*- Autoconf -*- + +-# Copyright (C) 1997-2021 Free Software Foundation, Inc. ++# Copyright (C) 1997-2024 Free Software Foundation, Inc. + # + # This file is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, +@@ -775,7 +792,7 @@ AC_CONFIG_COMMANDS_PRE( + Usually this means the macro was only invoked conditionally.]]) + fi])]) + +-# Copyright (C) 2006-2021 Free Software Foundation, Inc. ++# Copyright (C) 2006-2024 Free Software Foundation, Inc. + # + # This file is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, diff --git a/configure b/configure -index d0ae103014a..308124ef06d 100755 +index d0ae103..cc5d6a0 100755 --- a/configure +++ b/configure -@@ -974,6 +974,8 @@ +@@ -974,6 +974,9 @@ LDFLAGS CFLAGS CC HAS_XCRUN ++XROS_DEPLOYMENT_TARGET +WATCHOS_DEPLOYMENT_TARGET +TVOS_DEPLOYMENT_TARGET IPHONEOS_DEPLOYMENT_TARGET EXPORT_MACOSX_DEPLOYMENT_TARGET CONFIGURE_MACOSX_DEPLOYMENT_TARGET -@@ -4100,6 +4102,12 @@ +@@ -4060,6 +4063,9 @@ printf "%s\n" "yes" >&6; } + printf "%s\n" "no" >&6; } + PKG_CONFIG="" + fi ++fi ++if test -z "$PKG_CONFIG"; then ++ as_fn_error $? "pkg-config not found" "$LINENO" 5 + fi + ;; #( + no) : +@@ -4100,6 +4106,15 @@ then *-apple-ios*) ac_sys_system=iOS ;; @@ -184,20 +444,23 @@ index d0ae103014a..308124ef06d 100755 + ;; + *-apple-watchos*) + ac_sys_system=watchOS ++ ;; ++ *-apple-xros*) ++ ac_sys_system=xrOS + ;; *-*-darwin*) ac_sys_system=Darwin ;; -@@ -4181,7 +4189,7 @@ +@@ -4181,7 +4196,7 @@ fi # On cross-compile builds, configure will look for a host-specific compiler by # prepending the user-provided host triple to the required binary name. # -# On iOS, this results in binaries like "arm64-apple-ios13.0-simulator-gcc", -+# On iOS/tvOS/watchOS, this results in binaries like "arm64-apple-ios13.0-simulator-gcc", ++# On iOS/tvOS/watchOS/xrOS, this results in binaries like "arm64-apple-ios13.0-simulator-gcc", # which isn't a binary that exists, and isn't very convenient, as it contains the # iOS version. As the default cross-compiler name won't exist, configure falls # back to gcc, which *definitely* won't work. We're providing wrapper scripts for -@@ -4196,6 +4204,14 @@ +@@ -4196,6 +4211,18 @@ if test -z "$AR"; then aarch64-apple-ios*-simulator) AR=arm64-apple-ios-simulator-ar ;; aarch64-apple-ios*) AR=arm64-apple-ios-ar ;; x86_64-apple-ios*-simulator) AR=x86_64-apple-ios-simulator-ar ;; @@ -209,10 +472,14 @@ index d0ae103014a..308124ef06d 100755 + aarch64-apple-watchos*-simulator) AR=arm64-apple-watchos-simulator-ar ;; + aarch64-apple-watchos*) AR=arm64_32-apple-watchos-ar ;; + x86_64-apple-watchos*-simulator) AR=x86_64-apple-watchos-simulator-ar ;; ++ ++ aarch64-apple-xros*-simulator) AR=arm64-apple-xros-simulator-ar ;; ++ aarch64-apple-xros*) AR=arm64_32-apple-xros-ar ;; ++ x86_64-apple-xros*-simulator) AR=x86_64-apple-xros-simulator-ar ;; *) esac fi -@@ -4204,6 +4220,14 @@ +@@ -4204,6 +4231,18 @@ if test -z "$CC"; then aarch64-apple-ios*-simulator) CC=arm64-apple-ios-simulator-clang ;; aarch64-apple-ios*) CC=arm64-apple-ios-clang ;; x86_64-apple-ios*-simulator) CC=x86_64-apple-ios-simulator-clang ;; @@ -224,10 +491,14 @@ index d0ae103014a..308124ef06d 100755 + aarch64-apple-watchos*-simulator) CC=arm64-apple-watchos-simulator-clang ;; + aarch64-apple-watchos*) CC=arm64_32-apple-watchos-clang ;; + x86_64-apple-watchos*-simulator) CC=x86_64-apple-watchos-simulator-clang ;; ++ ++ aarch64-apple-xros*-simulator) AR=arm64-apple-xros-simulator-clang ;; ++ aarch64-apple-xros*) AR=arm64_32-apple-xros-clang ;; ++ x86_64-apple-xros*-simulator) AR=x86_64-apple-xros-simulator-clang ;; *) esac fi -@@ -4212,6 +4236,14 @@ +@@ -4212,6 +4251,18 @@ if test -z "$CPP"; then aarch64-apple-ios*-simulator) CPP=arm64-apple-ios-simulator-cpp ;; aarch64-apple-ios*) CPP=arm64-apple-ios-cpp ;; x86_64-apple-ios*-simulator) CPP=x86_64-apple-ios-simulator-cpp ;; @@ -239,10 +510,14 @@ index d0ae103014a..308124ef06d 100755 + aarch64-apple-watchos*-simulator) CPP=arm64-apple-watchos-simulator-cpp ;; + aarch64-apple-watchos*) CPP=arm64_32-apple-watchos-cpp ;; + x86_64-apple-watchos*-simulator) CPP=x86_64-apple-watchos-simulator-cpp ;; ++ ++ aarch64-apple-xros*-simulator) AR=arm64-apple-xros-simulator-cpp ;; ++ aarch64-apple-xros*) AR=arm64_32-apple-xros-cpp ;; ++ x86_64-apple-xros*-simulator) AR=x86_64-apple-xros-simulator-cpp ;; *) esac fi -@@ -4220,6 +4252,14 @@ +@@ -4220,6 +4271,18 @@ if test -z "$CXX"; then aarch64-apple-ios*-simulator) CXX=arm64-apple-ios-simulator-clang++ ;; aarch64-apple-ios*) CXX=arm64-apple-ios-clang++ ;; x86_64-apple-ios*-simulator) CXX=x86_64-apple-ios-simulator-clang++ ;; @@ -254,10 +529,14 @@ index d0ae103014a..308124ef06d 100755 + aarch64-apple-watchos*-simulator) CXX=arm64-apple-watchos-simulator-clang++ ;; + aarch64-apple-watchos*) CXX=arm64_32-apple-watchos-clang++ ;; + x86_64-apple-watchos*-simulator) CXX=x86_64-apple-watchos-simulator-clang++ ;; ++ ++ aarch64-apple-xros*-simulator) AR=arm64-apple-xros-simulator-clang++ ;; ++ aarch64-apple-xros*) AR=arm64_32-apple-xros-clang++ ;; ++ x86_64-apple-xros*-simulator) AR=x86_64-apple-xros-simulator-clang++ ;; *) esac fi -@@ -4342,8 +4382,10 @@ +@@ -4342,8 +4405,11 @@ then : case $enableval in yes) case $ac_sys_system in @@ -267,19 +546,21 @@ index d0ae103014a..308124ef06d 100755 + iOS) enableval=iOS/Frameworks/\$\(MULTIARCH\) ;; + tvOS) enableval=tvOS/Frameworks/\$\(MULTIARCH\) ;; + watchOS) enableval=watchOS/Frameworks/\$\(MULTIARCH\) ;; ++ xrOS) enableval=xrOS/Frameworks/\$\(MULTIARCH\) ;; *) as_fn_error $? "Unknown platform for framework build" "$LINENO" 5 esac esac -@@ -4352,6 +4394,8 @@ +@@ -4352,6 +4418,9 @@ then : no) case $ac_sys_system in iOS) as_fn_error $? "iOS builds must use --enable-framework" "$LINENO" 5 ;; + tvOS) as_fn_error $? "tvOS builds must use --enable-framework" "$LINENO" 5 ;; + watchOS) as_fn_error $? "watchOS builds must use --enable-framework" "$LINENO" 5 ;; ++ xrOS) as_fn_error $? "xrOS builds must use --enable-framework" "$LINENO" 5 ;; *) PYTHONFRAMEWORK= PYTHONFRAMEWORKDIR=no-framework -@@ -4458,6 +4502,36 @@ +@@ -4458,6 +4527,50 @@ then : ac_config_files="$ac_config_files iOS/Resources/Info.plist" @@ -313,41 +594,56 @@ index d0ae103014a..308124ef06d 100755 + + ac_config_files="$ac_config_files watchOS/Resources/Info.plist" + ++ ;; ++ xrOS) : ++ FRAMEWORKINSTALLFIRST="frameworkinstallunversionedstructure" ++ FRAMEWORKALTINSTALLFIRST="frameworkinstallunversionedstructure " ++ FRAMEWORKINSTALLLAST="frameworkinstallmobileheaders" ++ FRAMEWORKALTINSTALLLAST="frameworkinstallmobileheaders" ++ FRAMEWORKPYTHONW= ++ INSTALLTARGETS="libinstall inclinstall sharedinstall" ++ ++ prefix=$PYTHONFRAMEWORKPREFIX ++ PYTHONFRAMEWORKINSTALLNAMEPREFIX="@rpath/$PYTHONFRAMEWORKDIR" ++ RESSRCDIR=watchOS/Resources ++ ++ ac_config_files="$ac_config_files xrOS/Resources/Info.plist" ;; *) as_fn_error $? "Unknown platform for framework build" "$LINENO" 5 -@@ -4469,6 +4543,8 @@ +@@ -4469,6 +4582,9 @@ else case e in #( e) case $ac_sys_system in iOS) as_fn_error $? "iOS builds must use --enable-framework" "$LINENO" 5 ;; + tvOS) as_fn_error $? "tvOS builds must use --enable-framework" "$LINENO" 5 ;; + watchOS) as_fn_error $? "watchOS builds must use --enable-framework" "$LINENO" 5 ;; ++ xrOS) as_fn_error $? "xrOS builds must use --enable-framework" "$LINENO" 5 ;; *) PYTHONFRAMEWORK= PYTHONFRAMEWORKDIR=no-framework -@@ -4523,8 +4599,8 @@ +@@ -4523,8 +4639,8 @@ then : case "$withval" in yes) case $ac_sys_system in - Darwin|iOS) - # iOS is able to share the macOS patch -+ Darwin|iOS|tvOS|watchOS) -+ # iOS/tvOS/watchOS is able to share the macOS patch ++ Darwin|iOS|tvOS|watchOS|xrOS) ++ # iOS/tvOS/watchOS/xrOS is able to share the macOS patch APP_STORE_COMPLIANCE_PATCH="Mac/Resources/app-store-compliance.patch" ;; *) as_fn_error $? "no default app store compliance patch available for $ac_sys_system" "$LINENO" 5 ;; -@@ -4542,8 +4618,8 @@ +@@ -4542,8 +4658,8 @@ printf "%s\n" "applying custom app store compliance patch" >&6; } else case e in #( e) case $ac_sys_system in - iOS) - # Always apply the compliance patch on iOS; we can use the macOS patch -+ iOS|tvOS|watchOS) -+ # Always apply the compliance patch on iOS/tvOS/watchOS; we can use the macOS patch ++ iOS|tvOS|watchOS|xrOS) ++ # Always apply the compliance patch on iOS/tvOS/watchOS/xrOS; we can use the macOS patch APP_STORE_COMPLIANCE_PATCH="Mac/Resources/app-store-compliance.patch" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: applying default app store compliance patch" >&5 printf "%s\n" "applying default app store compliance patch" >&6; } -@@ -4598,6 +4674,50 @@ +@@ -4598,6 +4714,72 @@ printf "%s\n" "$IPHONEOS_DEPLOYMENT_TARGET" >&6; } ;; esac ;; @@ -394,38 +690,63 @@ index d0ae103014a..308124ef06d 100755 + _host_ident=${WATCHOS_DEPLOYMENT_TARGET}-$host_cpu-watch${_host_device} + ;; + esac ++ ;; ++ *-apple-xros*) ++ _host_os=`echo $host | cut -d '-' -f3` ++ _host_device=`echo $host | cut -d '-' -f4` ++ _host_device=${_host_device:=os} ++ ++ # XROS_DEPLOYMENT_TARGET is the minimum supported xrOS version ++ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking xrOS deployment target" >&5 ++printf %s "checking xrOS deployment target... " >&6; } ++ XROS_DEPLOYMENT_TARGET=${_host_os:7} ++ XROS_DEPLOYMENT_TARGET=${XROS_DEPLOYMENT_TARGET:=4.0} ++ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XROS_DEPLOYMENT_TARGET" >&5 ++printf "%s\n" "$XROS_DEPLOYMENT_TARGET" >&6; } ++ ++ case "$host_cpu" in ++ aarch64) ++ _host_ident=${XROS_DEPLOYMENT_TARGET}-arm64-xr${_host_device} ++ ;; ++ *) ++ _host_ident=${XROS_DEPLOYMENT_TARGET}-$host_cpu-xr${_host_device} ++ ;; ++ esac + ;; *-*-darwin*) case "$host_cpu" in arm*) -@@ -4688,9 +4808,13 @@ +@@ -4688,9 +4870,15 @@ printf "%s\n" "#define _BSD_SOURCE 1" >>confdefs.h define_xopen_source=no;; Darwin/[12][0-9].*) define_xopen_source=no;; - # On iOS, defining _POSIX_C_SOURCE also disables platform specific features. -+ # On iOS/tvOS/watchOS, defining _POSIX_C_SOURCE also disables platform specific features. ++ # On iOS/tvOS/watchOS/xrOS, defining _POSIX_C_SOURCE also disables platform specific features. iOS/*) define_xopen_source=no;; + tvOS/*) + define_xopen_source=no;; + watchOS/*) ++ define_xopen_source=no;; ++ xrOS/*) + define_xopen_source=no;; # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from # defining NI_NUMERICHOST. QNX/6.3.2) -@@ -4753,7 +4877,10 @@ +@@ -4753,7 +4941,11 @@ fi CONFIGURE_MACOSX_DEPLOYMENT_TARGET= EXPORT_MACOSX_DEPLOYMENT_TARGET='#' -# Record the value of IPHONEOS_DEPLOYMENT_TARGET enforced by the selected host triple. +# Record the value of IPHONEOS_DEPLOYMENT_TARGET / TVOS_DEPLOYMENT_TARGET / -+# WATCHOS_DEPLOYMENT_TARGET enforced by the selected host triple. ++# WATCHOS_DEPLOYMENT_TARGET / XROS_DEPLOYMENT_TARGET enforced by the selected host triple. ++ + + # checks for alternative programs -@@ -4794,6 +4921,16 @@ +@@ -4794,6 +4986,21 @@ case $ac_sys_system in #( as_fn_append CFLAGS " -mios-version-min=${IPHONEOS_DEPLOYMENT_TARGET}" as_fn_append LDFLAGS " -mios-version-min=${IPHONEOS_DEPLOYMENT_TARGET}" ;; #( @@ -438,31 +759,38 @@ index d0ae103014a..308124ef06d 100755 + + as_fn_append CFLAGS " -mwatchos-version-min=${WATCHOS_DEPLOYMENT_TARGET}" + as_fn_append LDFLAGS " -mwatchos-version-min=${WATCHOS_DEPLOYMENT_TARGET}" ++ ;; #( ++ xrOS) : ++ ++ as_fn_append CFLAGS " -mxros-version-min=${XROS_DEPLOYMENT_TARGET}" ++ as_fn_append LDFLAGS " -mxros-version-min=${XROS_DEPLOYMENT_TARGET}" + ;; #( *) : ;; esac -@@ -7163,6 +7300,10 @@ +@@ -7163,6 +7370,12 @@ case $ac_sys_system in #( MULTIARCH="" ;; #( iOS) : MULTIARCH="" ;; #( + tvOS) : + MULTIARCH="" ;; #( + watchOS) : ++ MULTIARCH="" ;; #( ++ xrOS) : + MULTIARCH="" ;; #( FreeBSD*) : MULTIARCH="" ;; #( *) : -@@ -7183,7 +7324,7 @@ +@@ -7183,7 +7396,7 @@ fi printf "%s\n" "$MULTIARCH" >&6; } case $ac_sys_system in #( - iOS) : -+ iOS|tvOS|watchOS) : ++ iOS|tvOS|watchOS|xrOS) : SOABI_PLATFORM=`echo "$PLATFORM_TRIPLET" | cut -d '-' -f2` ;; #( *) : SOABI_PLATFORM=$PLATFORM_TRIPLET -@@ -7234,6 +7375,14 @@ +@@ -7234,6 +7447,18 @@ case $host/$ac_cv_cc_name in #( PY_SUPPORT_TIER=3 ;; #( aarch64-apple-ios*/clang) : PY_SUPPORT_TIER=3 ;; #( @@ -473,65 +801,377 @@ index d0ae103014a..308124ef06d 100755 + aarch64-apple-watchos*-simulator/clang) : + PY_SUPPORT_TIER=3 ;; #( + arm64_32-apple-watchos*/clang) : ++ PY_SUPPORT_TIER=3 ;; #( ++ aarch64-apple-xros*-simulator/clang) : ++ PY_SUPPORT_TIER=3 ;; #( ++ arm64_32-apple-xros*/clang) : + PY_SUPPORT_TIER=3 ;; #( aarch64-*-linux-android/clang) : PY_SUPPORT_TIER=3 ;; #( x86_64-*-linux-android/clang) : -@@ -7670,7 +7819,7 @@ +@@ -7670,7 +7895,7 @@ then case $ac_sys_system in Darwin) LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)';; - iOS) -+ iOS|tvOS|watchOS) ++ iOS|tvOS|watchOS|xrOS) LDLIBRARY='$(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK)';; *) as_fn_error $? "Unknown platform for framework build" "$LINENO" 5;; -@@ -7736,7 +7885,7 @@ +@@ -7736,7 +7961,7 @@ printf "%s\n" "#define Py_ENABLE_SHARED 1" >>confdefs.h BLDLIBRARY='-L. -lpython$(LDVERSION)' RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}} ;; - iOS) -+ iOS|tvOS|watchOS) ++ iOS|tvOS|watchOS|xrOS) LDLIBRARY='libpython$(LDVERSION).dylib' ;; AIX*) -@@ -13544,7 +13693,7 @@ +@@ -8444,15 +8669,18 @@ if test "$Py_OPT" = 'true' ; then + if test "x$ac_cv_gcc_compat" = xyes + then : + +- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fno-semantic-interposition" >&5 +-printf %s "checking whether C compiler accepts -fno-semantic-interposition... " >&6; } ++ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -fno-semantic-interposition" >&5 ++printf %s "checking whether the C compiler accepts -fno-semantic-interposition... " >&6; } + if test ${ax_cv_check_cflags__Werror__fno_semantic_interposition+y} + then : + printf %s "(cached) " >&6 + else case e in #( + e) + ax_check_save_flags=$CFLAGS +- CFLAGS="$CFLAGS -Werror -fno-semantic-interposition" ++ if test x"$GCC" = xyes ; then ++ add_gnu_werror="-Werror" ++ fi ++ CFLAGS="$CFLAGS -Werror -fno-semantic-interposition $add_gnu_werror" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -8582,15 +8810,18 @@ if test "$Py_LTO" = 'true' ; then + case $ac_cv_cc_name in + clang) + LDFLAGS_NOLTO="-fno-lto" +- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -flto=thin" >&5 +-printf %s "checking whether C compiler accepts -flto=thin... " >&6; } ++ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -flto=thin" >&5 ++printf %s "checking whether the C compiler accepts -flto=thin... " >&6; } + if test ${ax_cv_check_cflags___flto_thin+y} + then : + printf %s "(cached) " >&6 + else case e in #( + e) + ax_check_save_flags=$CFLAGS +- CFLAGS="$CFLAGS -flto=thin" ++ if test x"$GCC" = xyes ; then ++ add_gnu_werror="-Werror" ++ fi ++ CFLAGS="$CFLAGS -flto=thin $add_gnu_werror" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -8767,15 +8998,18 @@ printf "%s\n" "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;} + if test $Py_LTO_POLICY = default + then + # Check that ThinLTO is accepted. +- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -flto=thin" >&5 +-printf %s "checking whether C compiler accepts -flto=thin... " >&6; } ++ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -flto=thin" >&5 ++printf %s "checking whether the C compiler accepts -flto=thin... " >&6; } + if test ${ax_cv_check_cflags___flto_thin+y} + then : + printf %s "(cached) " >&6 + else case e in #( + e) + ax_check_save_flags=$CFLAGS +- CFLAGS="$CFLAGS -flto=thin" ++ if test x"$GCC" = xyes ; then ++ add_gnu_werror="-Werror" ++ fi ++ CFLAGS="$CFLAGS -flto=thin $add_gnu_werror" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -8824,15 +9058,18 @@ fi + if test $Py_LTO_POLICY = default + then + # Check that ThinLTO is accepted +- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -flto=thin" >&5 +-printf %s "checking whether C compiler accepts -flto=thin... " >&6; } ++ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -flto=thin" >&5 ++printf %s "checking whether the C compiler accepts -flto=thin... " >&6; } + if test ${ax_cv_check_cflags___flto_thin+y} + then : + printf %s "(cached) " >&6 + else case e in #( + e) + ax_check_save_flags=$CFLAGS +- CFLAGS="$CFLAGS -flto=thin" ++ if test x"$GCC" = xyes ; then ++ add_gnu_werror="-Werror" ++ fi ++ CFLAGS="$CFLAGS -flto=thin $add_gnu_werror" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -9109,15 +9346,18 @@ if test "$Py_BOLT" = 'true' ; then + + # -fno-reorder-blocks-and-partition is required for bolt to work. + # Possibly GCC only. +- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fno-reorder-blocks-and-partition" >&5 +-printf %s "checking whether C compiler accepts -fno-reorder-blocks-and-partition... " >&6; } ++ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -fno-reorder-blocks-and-partition" >&5 ++printf %s "checking whether the C compiler accepts -fno-reorder-blocks-and-partition... " >&6; } + if test ${ax_cv_check_cflags___fno_reorder_blocks_and_partition+y} + then : + printf %s "(cached) " >&6 + else case e in #( + e) + ax_check_save_flags=$CFLAGS +- CFLAGS="$CFLAGS -fno-reorder-blocks-and-partition" ++ if test x"$GCC" = xyes ; then ++ add_gnu_werror="-Werror" ++ fi ++ CFLAGS="$CFLAGS -fno-reorder-blocks-and-partition $add_gnu_werror" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -9765,15 +10005,18 @@ printf "%s\n" "$enable_safety" >&6; } + + if test "$enable_safety" = "yes" + then +- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fstack-protector-strong" >&5 +-printf %s "checking whether C compiler accepts -fstack-protector-strong... " >&6; } ++ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -fstack-protector-strong" >&5 ++printf %s "checking whether the C compiler accepts -fstack-protector-strong... " >&6; } + if test ${ax_cv_check_cflags__Werror__fstack_protector_strong+y} + then : + printf %s "(cached) " >&6 + else case e in #( + e) + ax_check_save_flags=$CFLAGS +- CFLAGS="$CFLAGS -Werror -fstack-protector-strong" ++ if test x"$GCC" = xyes ; then ++ add_gnu_werror="-Werror" ++ fi ++ CFLAGS="$CFLAGS -Werror -fstack-protector-strong $add_gnu_werror" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -9807,15 +10050,18 @@ printf "%s\n" "$as_me: WARNING: -fstack-protector-strong not supported" >&2;} ;; + esac + fi + +- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wtrampolines" >&5 +-printf %s "checking whether C compiler accepts -Wtrampolines... " >&6; } ++ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -Wtrampolines" >&5 ++printf %s "checking whether the C compiler accepts -Wtrampolines... " >&6; } + if test ${ax_cv_check_cflags__Werror__Wtrampolines+y} + then : + printf %s "(cached) " >&6 + else case e in #( + e) + ax_check_save_flags=$CFLAGS +- CFLAGS="$CFLAGS -Werror -Wtrampolines" ++ if test x"$GCC" = xyes ; then ++ add_gnu_werror="-Werror" ++ fi ++ CFLAGS="$CFLAGS -Werror -Wtrampolines $add_gnu_werror" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -9849,15 +10095,18 @@ printf "%s\n" "$as_me: WARNING: -Wtrampolines not supported" >&2;} ;; + esac + fi + +- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wimplicit-fallthrough" >&5 +-printf %s "checking whether C compiler accepts -Wimplicit-fallthrough... " >&6; } ++ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -Wimplicit-fallthrough" >&5 ++printf %s "checking whether the C compiler accepts -Wimplicit-fallthrough... " >&6; } + if test ${ax_cv_check_cflags__Werror__Wimplicit_fallthrough+y} + then : + printf %s "(cached) " >&6 + else case e in #( + e) + ax_check_save_flags=$CFLAGS +- CFLAGS="$CFLAGS -Werror -Wimplicit-fallthrough" ++ if test x"$GCC" = xyes ; then ++ add_gnu_werror="-Werror" ++ fi ++ CFLAGS="$CFLAGS -Werror -Wimplicit-fallthrough $add_gnu_werror" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -9891,15 +10140,18 @@ printf "%s\n" "$as_me: WARNING: -Wimplicit-fallthrough not supported" >&2;} ;; + esac + fi + +- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Werror=format-security" >&5 +-printf %s "checking whether C compiler accepts -Werror=format-security... " >&6; } ++ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -Werror=format-security" >&5 ++printf %s "checking whether the C compiler accepts -Werror=format-security... " >&6; } + if test ${ax_cv_check_cflags__Werror__Werror_format_security+y} + then : + printf %s "(cached) " >&6 + else case e in #( + e) + ax_check_save_flags=$CFLAGS +- CFLAGS="$CFLAGS -Werror -Werror=format-security" ++ if test x"$GCC" = xyes ; then ++ add_gnu_werror="-Werror" ++ fi ++ CFLAGS="$CFLAGS -Werror -Werror=format-security $add_gnu_werror" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -9933,15 +10185,18 @@ printf "%s\n" "$as_me: WARNING: -Werror=format-security not supported" >&2;} ;; + esac + fi + +- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wbidi-chars=any" >&5 +-printf %s "checking whether C compiler accepts -Wbidi-chars=any... " >&6; } ++ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -Wbidi-chars=any" >&5 ++printf %s "checking whether the C compiler accepts -Wbidi-chars=any... " >&6; } + if test ${ax_cv_check_cflags__Werror__Wbidi_chars_any+y} + then : + printf %s "(cached) " >&6 + else case e in #( + e) + ax_check_save_flags=$CFLAGS +- CFLAGS="$CFLAGS -Werror -Wbidi-chars=any" ++ if test x"$GCC" = xyes ; then ++ add_gnu_werror="-Werror" ++ fi ++ CFLAGS="$CFLAGS -Werror -Wbidi-chars=any $add_gnu_werror" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -9975,15 +10230,18 @@ printf "%s\n" "$as_me: WARNING: -Wbidi-chars=any not supported" >&2;} ;; + esac + fi + +- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wall" >&5 +-printf %s "checking whether C compiler accepts -Wall... " >&6; } ++ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -Wall" >&5 ++printf %s "checking whether the C compiler accepts -Wall... " >&6; } + if test ${ax_cv_check_cflags__Werror__Wall+y} + then : + printf %s "(cached) " >&6 + else case e in #( + e) + ax_check_save_flags=$CFLAGS +- CFLAGS="$CFLAGS -Werror -Wall" ++ if test x"$GCC" = xyes ; then ++ add_gnu_werror="-Werror" ++ fi ++ CFLAGS="$CFLAGS -Werror -Wall $add_gnu_werror" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -10041,15 +10299,18 @@ printf "%s\n" "$enable_slower_safety" >&6; } + + if test "$enable_slower_safety" = "yes" + then +- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -D_FORTIFY_SOURCE=3" >&5 +-printf %s "checking whether C compiler accepts -D_FORTIFY_SOURCE=3... " >&6; } ++ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -D_FORTIFY_SOURCE=3" >&5 ++printf %s "checking whether the C compiler accepts -D_FORTIFY_SOURCE=3... " >&6; } + if test ${ax_cv_check_cflags__Werror__D_FORTIFY_SOURCE_3+y} + then : + printf %s "(cached) " >&6 + else case e in #( + e) + ax_check_save_flags=$CFLAGS +- CFLAGS="$CFLAGS -Werror -D_FORTIFY_SOURCE=3" ++ if test x"$GCC" = xyes ; then ++ add_gnu_werror="-Werror" ++ fi ++ CFLAGS="$CFLAGS -Werror -D_FORTIFY_SOURCE=3 $add_gnu_werror" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -10650,15 +10911,18 @@ printf "%s\n" "$CC" >&6; } + + # Error on unguarded use of new symbols, which will fail at runtime for + # users on older versions of macOS +- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wunguarded-availability" >&5 +-printf %s "checking whether C compiler accepts -Wunguarded-availability... " >&6; } ++ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -Wunguarded-availability" >&5 ++printf %s "checking whether the C compiler accepts -Wunguarded-availability... " >&6; } + if test ${ax_cv_check_cflags__Werror__Wunguarded_availability+y} + then : + printf %s "(cached) " >&6 + else case e in #( + e) + ax_check_save_flags=$CFLAGS +- CFLAGS="$CFLAGS -Werror -Wunguarded-availability" ++ if test x"$GCC" = xyes ; then ++ add_gnu_werror="-Werror" ++ fi ++ CFLAGS="$CFLAGS -Werror -Wunguarded-availability $add_gnu_werror" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -13341,15 +13605,18 @@ then : + withval=$with_memory_sanitizer; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5 + printf "%s\n" "$withval" >&6; } +-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fsanitize=memory" >&5 +-printf %s "checking whether C compiler accepts -fsanitize=memory... " >&6; } ++{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -fsanitize=memory" >&5 ++printf %s "checking whether the C compiler accepts -fsanitize=memory... " >&6; } + if test ${ax_cv_check_cflags___fsanitize_memory+y} + then : + printf %s "(cached) " >&6 + else case e in #( + e) + ax_check_save_flags=$CFLAGS +- CFLAGS="$CFLAGS -fsanitize=memory" ++ if test x"$GCC" = xyes ; then ++ add_gnu_werror="-Werror" ++ fi ++ CFLAGS="$CFLAGS -fsanitize=memory $add_gnu_werror" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -13544,7 +13811,7 @@ then BLDSHARED="$LDSHARED" fi ;; - iOS/*) -+ iOS/*|tvOS/*|watchOS/*) ++ iOS/*|tvOS/*|watchOS/*|xrOS/*) LDSHARED='$(CC) -dynamiclib -F . -framework $(PYTHONFRAMEWORK)' LDCXXSHARED='$(CXX) -dynamiclib -F . -framework $(PYTHONFRAMEWORK)' BLDSHARED="$LDSHARED" -@@ -13677,7 +13826,7 @@ +@@ -13677,7 +13944,7 @@ then Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";; Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";; # -u libsys_s pulls in all symbols in libsys - Darwin/*|iOS/*) -+ Darwin/*|iOS/*|tvOS/*|watchOS/*) ++ Darwin/*|iOS/*|tvOS/*|watchOS/*|xrOS/*) LINKFORSHARED="$extra_undefs -framework CoreFoundation" # Issue #18075: the default maximum stack size (8MBytes) is too -@@ -13701,7 +13850,7 @@ +@@ -13701,7 +13968,7 @@ printf "%s\n" "#define THREAD_STACK_SIZE 0x$stack_size" >>confdefs.h LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' fi LINKFORSHARED="$LINKFORSHARED" - elif test $ac_sys_system = "iOS"; then -+ elif test "$ac_sys_system" = "iOS" -o "$ac_sys_system" = "tvOS" -o "$ac_sys_system" = "watchOS"; then ++ elif test "$ac_sys_system" = "iOS" -o "$ac_sys_system" = "tvOS" -o "$ac_sys_system" = "watchOS" -o "$ac_sys_system" = "xrOS"; then LINKFORSHARED="-Wl,-stack_size,$stack_size $LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK)' fi ;; -@@ -15286,7 +15435,7 @@ +@@ -15286,7 +15553,7 @@ then : ctypes_malloc_closure=yes ;; #( - iOS) : -+ iOS|tvOS|watchOS) : ++ iOS|tvOS|watchOS|xrOS) : ctypes_malloc_closure=yes ;; #( -@@ -19038,12 +19187,6 @@ +@@ -19038,12 +19305,6 @@ if test "x$ac_cv_func_dup3" = xyes then : printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h @@ -544,7 +1184,7 @@ index d0ae103014a..308124ef06d 100755 fi ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero" if test "x$ac_cv_func_explicit_bzero" = xyes -@@ -19104,18 +19247,6 @@ +@@ -19104,18 +19365,6 @@ if test "x$ac_cv_func_fexecve" = xyes then : printf "%s\n" "#define HAVE_FEXECVE 1" >>confdefs.h @@ -563,7 +1203,7 @@ index d0ae103014a..308124ef06d 100755 fi ac_fn_c_check_func "$LINENO" "fpathconf" "ac_cv_func_fpathconf" if test "x$ac_cv_func_fpathconf" = xyes -@@ -19542,24 +19673,6 @@ +@@ -19542,24 +19791,6 @@ if test "x$ac_cv_func_posix_openpt" = xyes then : printf "%s\n" "#define HAVE_POSIX_OPENPT 1" >>confdefs.h @@ -588,7 +1228,7 @@ index d0ae103014a..308124ef06d 100755 fi ac_fn_c_check_func "$LINENO" "pread" "ac_cv_func_pread" if test "x$ac_cv_func_pread" = xyes -@@ -19866,12 +19979,6 @@ +@@ -19866,12 +20097,6 @@ if test "x$ac_cv_func_sigaction" = xyes then : printf "%s\n" "#define HAVE_SIGACTION 1" >>confdefs.h @@ -601,26 +1241,26 @@ index d0ae103014a..308124ef06d 100755 fi ac_fn_c_check_func "$LINENO" "sigfillset" "ac_cv_func_sigfillset" if test "x$ac_cv_func_sigfillset" = xyes -@@ -20140,11 +20247,11 @@ +@@ -20140,11 +20365,11 @@ fi fi -# iOS defines some system methods that can be linked (so they are -+# iOS/tvOS/watchOS define some system methods that can be linked (so they are ++# iOS/tvOS/watchOS/xrOS define some system methods that can be linked (so they are # found by configure), but either raise a compilation error (because the # header definition prevents usage - autoconf doesn't use the headers), or # raise an error if used at runtime. Force these symbols off. -if test "$ac_sys_system" != "iOS" ; then -+if test "$ac_sys_system" != "iOS" -a "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "watchOS" ; then ++if test "$ac_sys_system" != "iOS" -a "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "watchOS" -a "$ac_sys_system" != "xrOS" ; then ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy" if test "x$ac_cv_func_getentropy" = xyes then : -@@ -20166,6 +20273,53 @@ +@@ -20166,6 +20391,53 @@ fi fi -+# tvOS/watchOS have some additional methods that can be found, but not used. -+if test "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "watchOS" ; then ++# tvOS/watchOS.xrOS have some additional methods that can be found, but not used. ++if test "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "watchOS" -a "$ac_sys_system" != "xrOS"; then + ac_fn_c_check_func "$LINENO" "execv" "ac_cv_func_execv" +if test "x$ac_cv_func_execv" = xyes +then : @@ -669,17 +1309,17 @@ index d0ae103014a..308124ef06d 100755 { 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} -@@ -23248,7 +23402,8 @@ +@@ -23248,7 +23520,8 @@ fi # check for openpty, login_tty, and forkpty - +# tvOS/watchOS have functions for tty, but can't use them -+if test "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "watchOS" ; then ++if test "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "watchOS" -a "$ac_sys_system" != "xrOS"; then for ac_func in openpty do : -@@ -23362,7 +23517,7 @@ +@@ -23362,7 +23635,7 @@ esac fi done @@ -688,7 +1328,7 @@ index d0ae103014a..308124ef06d 100755 printf %s "checking for library containing login_tty... " >&6; } if test ${ac_cv_search_login_tty+y} then : -@@ -23545,6 +23700,7 @@ +@@ -23545,6 +23818,7 @@ esac fi done @@ -696,58 +1336,115 @@ index d0ae103014a..308124ef06d 100755 # check for long file support functions ac_fn_c_check_func "$LINENO" "fseek64" "ac_cv_func_fseek64" -@@ -23810,10 +23966,10 @@ +@@ -23810,10 +24084,10 @@ fi done -# On Android and iOS, clock_settime can be linked (so it is found by -+# On Android, iOS, tvOS and watchOS, clock_settime can be linked (so it is found by ++# On Android, iOS, tvOS, watchOS, and xrOS, clock_settime can be linked (so it is found by # configure), but when used in an unprivileged process, it crashes rather than # returning an error. Force the symbol off. -if test "$ac_sys_system" != "Linux-android" && test "$ac_sys_system" != "iOS" -+if test "$ac_sys_system" != "Linux-android" -a "$ac_sys_system" != "iOS" -a "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "watchOS" ++if test "$ac_sys_system" != "Linux-android" -a "$ac_sys_system" != "iOS" -a "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "watchOS" -a "$ac_sys_system" != "xrOS" then for ac_func in clock_settime -@@ -26152,8 +26308,8 @@ +@@ -25236,10 +25510,10 @@ if ac_fn_c_try_link "$LINENO" + then : + + +-if grep noonsees conftest* > /dev/null ; then ++if grep noonsees conftest$EXEEXT >/dev/null ; then + ax_cv_c_float_words_bigendian=yes + fi +-if grep seesnoon conftest* >/dev/null ; then ++if grep seesnoon conftest$EXEEXT >/dev/null ; then + if test "$ax_cv_c_float_words_bigendian" = unknown; then + ax_cv_c_float_words_bigendian=no + else +@@ -26152,8 +26426,8 @@ if test "$PY_ENABLE_SHARED" = "1" && ( test -n "$ANDROID_API_LEVEL" || test "$MA LIBPYTHON="\$(BLDLIBRARY)" fi -# On iOS the shared libraries must be linked with the Python framework -if test "$ac_sys_system" = "iOS"; then +# On iOS/tvOS/watchOS the shared libraries must be linked with the Python framework -+if test "$ac_sys_system" = "iOS" -o $ac_sys_system = "tvOS" -o $ac_sys_system = "watchOS"; then ++if test "$ac_sys_system" = "iOS" -o $ac_sys_system = "tvOS" -o $ac_sys_system = "watchOS" -o $ac_sys_system = "xrOS"; then MODULE_DEPS_SHARED="$MODULE_DEPS_SHARED \$(PYTHONFRAMEWORKDIR)/\$(PYTHONFRAMEWORK)" fi -@@ -29023,7 +29179,7 @@ +@@ -29023,7 +29297,7 @@ LIBS=$save_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for device files" >&5 printf "%s\n" "$as_me: checking for device files" >&6;} -if test "$ac_sys_system" = "Linux-android" || test "$ac_sys_system" = "iOS"; then -+if test "$ac_sys_system" = "Linux-android" -o "$ac_sys_system" = "iOS" -o "$ac_sys_system" = "tvOS" -o "$ac_sys_system" = "watchOS" ; then ++if test "$ac_sys_system" = "Linux-android" -o "$ac_sys_system" = "iOS" -o "$ac_sys_system" = "tvOS" -o "$ac_sys_system" = "watchOS" -o "$ac_sys_system" = "xrOS"; then ac_cv_file__dev_ptmx=no ac_cv_file__dev_ptc=no else -@@ -29504,7 +29660,7 @@ +@@ -29504,7 +29778,7 @@ else case e in #( with_ensurepip=no ;; #( WASI) : with_ensurepip=no ;; #( - iOS) : -+ iOS|tvOS|watchOS) : ++ iOS|tvOS|watchOS|xrOS) : with_ensurepip=no ;; #( *) : with_ensurepip=upgrade -@@ -30484,7 +30640,7 @@ +@@ -30484,7 +30758,7 @@ case $ac_sys_system in #( ;; #( Darwin) : ;; #( - iOS) : -+ iOS|tvOS|watchOS) : ++ iOS|tvOS|watchOS|xrOS) : -@@ -34487,6 +34643,8 @@ +@@ -32082,15 +32356,18 @@ esac + # Android. + # The *mmintrin.h headers are x86-family-specific, so can't be used on WASI. + if test "$ac_sys_system" != "Linux-android" -a "$ac_sys_system" != "WASI" || test "$ANDROID_API_LEVEL" -ge 28; then +- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -msse -msse2 -msse3 -msse4.1 -msse4.2" >&5 +-printf %s "checking whether C compiler accepts -msse -msse2 -msse3 -msse4.1 -msse4.2... " >&6; } ++ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -msse -msse2 -msse3 -msse4.1 -msse4.2" >&5 ++printf %s "checking whether the C compiler accepts -msse -msse2 -msse3 -msse4.1 -msse4.2... " >&6; } + if test ${ax_cv_check_cflags__Werror__msse__msse2__msse3__msse4_1__msse4_2+y} + then : + printf %s "(cached) " >&6 + else case e in #( + e) + ax_check_save_flags=$CFLAGS +- CFLAGS="$CFLAGS -Werror -msse -msse2 -msse3 -msse4.1 -msse4.2" ++ if test x"$GCC" = xyes ; then ++ add_gnu_werror="-Werror" ++ fi ++ CFLAGS="$CFLAGS -Werror -msse -msse2 -msse3 -msse4.1 -msse4.2 $add_gnu_werror" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -32157,15 +32434,18 @@ fi + # (https://developer.android.com/ndk/guides/abis#86-64), this is safe because we do a + # runtime CPUID check. + if test "$ac_sys_system" != "Linux-android" -a "$ac_sys_system" != "WASI" || test "$ANDROID_API_LEVEL" -ge 28; then +- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -mavx2" >&5 +-printf %s "checking whether C compiler accepts -mavx2... " >&6; } ++ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -mavx2" >&5 ++printf %s "checking whether the C compiler accepts -mavx2... " >&6; } + if test ${ax_cv_check_cflags__Werror__mavx2+y} + then : + printf %s "(cached) " >&6 + else case e in #( + e) + ax_check_save_flags=$CFLAGS +- CFLAGS="$CFLAGS -Werror -mavx2" ++ if test x"$GCC" = xyes ; then ++ add_gnu_werror="-Werror" ++ fi ++ CFLAGS="$CFLAGS -Werror -mavx2 $add_gnu_werror" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -34487,6 +34767,8 @@ do "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;; "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;; "iOS/Resources/Info.plist") CONFIG_FILES="$CONFIG_FILES iOS/Resources/Info.plist" ;; @@ -757,10 +1454,10 @@ index d0ae103014a..308124ef06d 100755 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;; "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;; diff --git a/configure.ac b/configure.ac -index 8bb0f1c6ef4..bfd67de48bb 100644 +index 8bb0f1c..812f548 100644 --- a/configure.ac +++ b/configure.ac -@@ -330,6 +330,12 @@ +@@ -330,6 +330,15 @@ then *-apple-ios*) ac_sys_system=iOS ;; @@ -769,20 +1466,23 @@ index 8bb0f1c6ef4..bfd67de48bb 100644 + ;; + *-apple-watchos*) + ac_sys_system=watchOS ++ ;; ++ *-apple-xros*) ++ ac_sys_system=xrOS + ;; *-*-darwin*) ac_sys_system=Darwin ;; -@@ -405,7 +411,7 @@ +@@ -405,7 +414,7 @@ AC_SUBST([host_exec_prefix]) # On cross-compile builds, configure will look for a host-specific compiler by # prepending the user-provided host triple to the required binary name. # -# On iOS, this results in binaries like "arm64-apple-ios13.0-simulator-gcc", -+# On iOS/tvOS/watchOS, this results in binaries like "arm64-apple-ios13.0-simulator-gcc", ++# On iOS/tvOS/watchOS/xrOS, this results in binaries like "arm64-apple-ios13.0-simulator-gcc", # which isn't a binary that exists, and isn't very convenient, as it contains the # iOS version. As the default cross-compiler name won't exist, configure falls # back to gcc, which *definitely* won't work. We're providing wrapper scripts for -@@ -420,6 +426,14 @@ +@@ -420,6 +429,18 @@ if test -z "$AR"; then aarch64-apple-ios*-simulator) AR=arm64-apple-ios-simulator-ar ;; aarch64-apple-ios*) AR=arm64-apple-ios-ar ;; x86_64-apple-ios*-simulator) AR=x86_64-apple-ios-simulator-ar ;; @@ -794,10 +1494,14 @@ index 8bb0f1c6ef4..bfd67de48bb 100644 + aarch64-apple-watchos*-simulator) AR=arm64-apple-watchos-simulator-ar ;; + aarch64-apple-watchos*) AR=arm64_32-apple-watchos-ar ;; + x86_64-apple-watchos*-simulator) AR=x86_64-apple-watchos-simulator-ar ;; ++ ++ aarch64-apple-xros*-simulator) AR=arm64-apple-xros-simulator-ar ;; ++ aarch64-apple-xros*) AR=arm64_32-apple-xros-ar ;; ++ x86_64-apple-xros*-simulator) AR=x86_64-apple-xros-simulator-ar ;; *) esac fi -@@ -428,6 +442,14 @@ +@@ -428,6 +449,18 @@ if test -z "$CC"; then aarch64-apple-ios*-simulator) CC=arm64-apple-ios-simulator-clang ;; aarch64-apple-ios*) CC=arm64-apple-ios-clang ;; x86_64-apple-ios*-simulator) CC=x86_64-apple-ios-simulator-clang ;; @@ -809,10 +1513,14 @@ index 8bb0f1c6ef4..bfd67de48bb 100644 + aarch64-apple-watchos*-simulator) CC=arm64-apple-watchos-simulator-clang ;; + aarch64-apple-watchos*) CC=arm64_32-apple-watchos-clang ;; + x86_64-apple-watchos*-simulator) CC=x86_64-apple-watchos-simulator-clang ;; ++ ++ aarch64-apple-xros*-simulator) AR=arm64-apple-xros-simulator-clang ;; ++ aarch64-apple-xros*) AR=arm64_32-apple-xros-clang ;; ++ x86_64-apple-xros*-simulator) AR=x86_64-apple-xros-simulator-clang ;; *) esac fi -@@ -436,6 +458,14 @@ +@@ -436,6 +469,18 @@ if test -z "$CPP"; then aarch64-apple-ios*-simulator) CPP=arm64-apple-ios-simulator-cpp ;; aarch64-apple-ios*) CPP=arm64-apple-ios-cpp ;; x86_64-apple-ios*-simulator) CPP=x86_64-apple-ios-simulator-cpp ;; @@ -824,10 +1532,14 @@ index 8bb0f1c6ef4..bfd67de48bb 100644 + aarch64-apple-watchos*-simulator) CPP=arm64-apple-watchos-simulator-cpp ;; + aarch64-apple-watchos*) CPP=arm64_32-apple-watchos-cpp ;; + x86_64-apple-watchos*-simulator) CPP=x86_64-apple-watchos-simulator-cpp ;; ++ ++ aarch64-apple-xros*-simulator) AR=arm64-apple-xros-simulator-cpp ;; ++ aarch64-apple-xros*) AR=arm64_32-apple-xros-cpp ;; ++ x86_64-apple-xros*-simulator) AR=x86_64-apple-xros-simulator-cpp ;; *) esac fi -@@ -444,6 +474,14 @@ +@@ -444,6 +489,18 @@ if test -z "$CXX"; then aarch64-apple-ios*-simulator) CXX=arm64-apple-ios-simulator-clang++ ;; aarch64-apple-ios*) CXX=arm64-apple-ios-clang++ ;; x86_64-apple-ios*-simulator) CXX=x86_64-apple-ios-simulator-clang++ ;; @@ -839,10 +1551,14 @@ index 8bb0f1c6ef4..bfd67de48bb 100644 + aarch64-apple-watchos*-simulator) CXX=arm64-apple-watchos-simulator-clang++ ;; + aarch64-apple-watchos*) CXX=arm64_32-apple-watchos-clang++ ;; + x86_64-apple-watchos*-simulator) CXX=x86_64-apple-watchos-simulator-clang++ ;; ++ ++ aarch64-apple-xros*-simulator) AR=arm64-apple-xros-simulator-clang++ ;; ++ aarch64-apple-xros*) AR=arm64_32-apple-xros-clang++ ;; ++ x86_64-apple-xros*-simulator) AR=x86_64-apple-xros-simulator-clang++ ;; *) esac fi -@@ -558,8 +596,10 @@ +@@ -558,8 +615,11 @@ AC_ARG_ENABLE([framework], case $enableval in yes) case $ac_sys_system in @@ -852,19 +1568,21 @@ index 8bb0f1c6ef4..bfd67de48bb 100644 + iOS) enableval=iOS/Frameworks/\$\(MULTIARCH\) ;; + tvOS) enableval=tvOS/Frameworks/\$\(MULTIARCH\) ;; + watchOS) enableval=watchOS/Frameworks/\$\(MULTIARCH\) ;; ++ xrOS) enableval=xrOS/Frameworks/\$\(MULTIARCH\) ;; *) AC_MSG_ERROR([Unknown platform for framework build]) esac esac -@@ -568,6 +608,8 @@ +@@ -568,6 +628,9 @@ AC_ARG_ENABLE([framework], no) case $ac_sys_system in iOS) AC_MSG_ERROR([iOS builds must use --enable-framework]) ;; + tvOS) AC_MSG_ERROR([tvOS builds must use --enable-framework]) ;; + watchOS) AC_MSG_ERROR([watchOS builds must use --enable-framework]) ;; ++ xrOS) AC_MSG_ERROR([xrOS builds must use --enable-framework]) ;; *) PYTHONFRAMEWORK= PYTHONFRAMEWORKDIR=no-framework -@@ -670,6 +712,34 @@ +@@ -670,6 +733,48 @@ AC_ARG_ENABLE([framework], AC_CONFIG_FILES([iOS/Resources/Info.plist]) ;; @@ -895,42 +1613,57 @@ index 8bb0f1c6ef4..bfd67de48bb 100644 + RESSRCDIR=watchOS/Resources + + AC_CONFIG_FILES([watchOS/Resources/Info.plist]) ++ ;; ++ xrOS) : ++ FRAMEWORKINSTALLFIRST="frameworkinstallunversionedstructure" ++ FRAMEWORKALTINSTALLFIRST="frameworkinstallunversionedstructure " ++ FRAMEWORKINSTALLLAST="frameworkinstallmobileheaders" ++ FRAMEWORKALTINSTALLLAST="frameworkinstallmobileheaders" ++ FRAMEWORKPYTHONW= ++ INSTALLTARGETS="libinstall inclinstall sharedinstall" ++ ++ prefix=$PYTHONFRAMEWORKPREFIX ++ PYTHONFRAMEWORKINSTALLNAMEPREFIX="@rpath/$PYTHONFRAMEWORKDIR" ++ RESSRCDIR=watchOS/Resources ++ ++ ac_config_files="$ac_config_files xrOS/Resources/Info.plist" + ;; *) AC_MSG_ERROR([Unknown platform for framework build]) ;; -@@ -678,6 +748,8 @@ +@@ -678,6 +783,9 @@ AC_ARG_ENABLE([framework], ],[ case $ac_sys_system in iOS) AC_MSG_ERROR([iOS builds must use --enable-framework]) ;; + tvOS) AC_MSG_ERROR([tvOS builds must use --enable-framework]) ;; + watchOS) AC_MSG_ERROR([watchOS builds must use --enable-framework]) ;; ++ xrOS) AC_MSG_ERROR([xrOS builds must use --enable-framework]) ;; *) PYTHONFRAMEWORK= PYTHONFRAMEWORKDIR=no-framework -@@ -730,8 +802,8 @@ +@@ -730,8 +838,8 @@ AC_ARG_WITH( case "$withval" in yes) case $ac_sys_system in - Darwin|iOS) - # iOS is able to share the macOS patch -+ Darwin|iOS|tvOS|watchOS) -+ # iOS/tvOS/watchOS is able to share the macOS patch ++ Darwin|iOS|tvOS|watchOS|xrOS) ++ # iOS/tvOS/watchOS/xrOS is able to share the macOS patch APP_STORE_COMPLIANCE_PATCH="Mac/Resources/app-store-compliance.patch" ;; *) AC_MSG_ERROR([no default app store compliance patch available for $ac_sys_system]) ;; -@@ -745,8 +817,8 @@ +@@ -745,8 +853,8 @@ AC_ARG_WITH( esac ],[ case $ac_sys_system in - iOS) - # Always apply the compliance patch on iOS; we can use the macOS patch -+ iOS|tvOS|watchOS) -+ # Always apply the compliance patch on iOS/tvOS/watchOS; we can use the macOS patch ++ iOS|tvOS|watchOS|xrOS) ++ # Always apply the compliance patch on iOS/tvOS/watchOS/xrOS; we can use the macOS patch APP_STORE_COMPLIANCE_PATCH="Mac/Resources/app-store-compliance.patch" AC_MSG_RESULT([applying default app store compliance patch]) ;; -@@ -794,6 +866,46 @@ +@@ -794,6 +902,66 @@ if test "$cross_compiling" = yes; then ;; esac ;; @@ -973,44 +1706,67 @@ index 8bb0f1c6ef4..bfd67de48bb 100644 + _host_ident=${WATCHOS_DEPLOYMENT_TARGET}-$host_cpu-watch${_host_device} + ;; + esac ++ ;; ++ *-apple-xros*) ++ _host_os=`echo $host | cut -d '-' -f3` ++ _host_device=`echo $host | cut -d '-' -f4` ++ _host_device=${_host_device:=os} ++ ++ # XROS_DEPLOYMENT_TARGET is the minimum supported xrOS version ++ AC_MSG_CHECKING([xrOS deployment target]) ++ XROS_DEPLOYMENT_TARGET=${_host_os:7} ++ XROS_DEPLOYMENT_TARGET=${XROS_DEPLOYMENT_TARGET:=4.0} ++ AC_MSG_RESULT([$XROS_DEPLOYMENT_TARGET]) ++ ++ case "$host_cpu" in ++ aarch64) ++ _host_ident=${XROS_DEPLOYMENT_TARGET}-arm64-xr${_host_device} ++ ;; ++ *) ++ _host_ident=${XROS_DEPLOYMENT_TARGET}-$host_cpu-xr${_host_device} ++ ;; ++ esac + ;; *-*-darwin*) case "$host_cpu" in arm*) -@@ -883,9 +995,13 @@ +@@ -883,9 +1051,15 @@ case $ac_sys_system/$ac_sys_release in define_xopen_source=no;; Darwin/@<:@[12]@:>@@<:@0-9@:>@.*) define_xopen_source=no;; - # On iOS, defining _POSIX_C_SOURCE also disables platform specific features. -+ # On iOS/tvOS/watchOS, defining _POSIX_C_SOURCE also disables platform specific features. ++ # On iOS/tvOS/watchOS/xrOS, defining _POSIX_C_SOURCE also disables platform specific features. iOS/*) define_xopen_source=no;; + tvOS/*) + define_xopen_source=no;; + watchOS/*) ++ define_xopen_source=no;; ++ xrOS/*) + define_xopen_source=no;; # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from # defining NI_NUMERICHOST. QNX/6.3.2) -@@ -944,8 +1060,11 @@ +@@ -944,8 +1118,12 @@ AC_SUBST([EXPORT_MACOSX_DEPLOYMENT_TARGET]) CONFIGURE_MACOSX_DEPLOYMENT_TARGET= EXPORT_MACOSX_DEPLOYMENT_TARGET='#' -# Record the value of IPHONEOS_DEPLOYMENT_TARGET enforced by the selected host triple. +# Record the value of IPHONEOS_DEPLOYMENT_TARGET / TVOS_DEPLOYMENT_TARGET / -+# WATCHOS_DEPLOYMENT_TARGET enforced by the selected host triple. ++# WATCHOS_DEPLOYMENT_TARGET / XROS_DEPLOYMENT_TARGET enforced by the selected host triple. AC_SUBST([IPHONEOS_DEPLOYMENT_TARGET]) +AC_SUBST([TVOS_DEPLOYMENT_TARGET]) +AC_SUBST([WATCHOS_DEPLOYMENT_TARGET]) ++AC_SUBST([XROS_DEPLOYMENT_TARGET]) # checks for alternative programs -@@ -979,11 +1098,17 @@ +@@ -979,11 +1157,20 @@ AS_CASE([$host], ], ) -dnl Add the compiler flag for the iOS minimum supported OS version. -+dnl Add the compiler flag for the iOS/tvOS/watchOS minimum supported OS version. ++dnl Add the compiler flag for the iOS/tvOS/watchOS/xrOS minimum supported OS version. AS_CASE([$ac_sys_system], [iOS], [ AS_VAR_APPEND([CFLAGS], [" -mios-version-min=${IPHONEOS_DEPLOYMENT_TARGET}"]) @@ -1021,28 +1777,32 @@ index 8bb0f1c6ef4..bfd67de48bb 100644 + ],[watchOS], [ + AS_VAR_APPEND([CFLAGS], [" -mwatchos-version-min=${WATCHOS_DEPLOYMENT_TARGET}"]) + AS_VAR_APPEND([LDFLAGS], [" -mwatchos-version-min=${WATCHOS_DEPLOYMENT_TARGET}"]) ++ ],[xrOS], [ ++ AS_VAR_APPEND([CFLAGS], [" -mxros-version-min=${XROS_DEPLOYMENT_TARGET}"]) ++ AS_VAR_APPEND([LDFLAGS], [" -mxros-version-min=${XROS_DEPLOYMENT_TARGET}"]) ], ) -@@ -1172,6 +1297,8 @@ +@@ -1172,6 +1359,9 @@ AC_MSG_CHECKING([for multiarch]) AS_CASE([$ac_sys_system], [Darwin*], [MULTIARCH=""], [iOS], [MULTIARCH=""], + [tvOS], [MULTIARCH=""], + [watchOS], [MULTIARCH=""], ++ [xrOS], [MULTIARCH=""], [FreeBSD*], [MULTIARCH=""], [MULTIARCH=$($CC --print-multiarch 2>/dev/null)] ) -@@ -1193,7 +1320,7 @@ +@@ -1193,7 +1383,7 @@ dnl will have multiple sysconfig modules (one for each CPU architecture), but dnl use a single "fat" binary at runtime. SOABI_PLATFORM is the component of dnl the PLATFORM_TRIPLET that will be used in binary module extensions. AS_CASE([$ac_sys_system], - [iOS], [SOABI_PLATFORM=`echo "$PLATFORM_TRIPLET" | cut -d '-' -f2`], -+ [iOS|tvOS|watchOS], [SOABI_PLATFORM=`echo "$PLATFORM_TRIPLET" | cut -d '-' -f2`], ++ [iOS|tvOS|watchOS|xrOS], [SOABI_PLATFORM=`echo "$PLATFORM_TRIPLET" | cut -d '-' -f2`], [SOABI_PLATFORM=$PLATFORM_TRIPLET] ) -@@ -1227,6 +1354,10 @@ +@@ -1227,6 +1417,12 @@ AS_CASE([$host/$ac_cv_cc_name], [x86_64-*-freebsd*/clang], [PY_SUPPORT_TIER=3], dnl FreeBSD on AMD64 [aarch64-apple-ios*-simulator/clang], [PY_SUPPORT_TIER=3], dnl iOS Simulator on arm64 [aarch64-apple-ios*/clang], [PY_SUPPORT_TIER=3], dnl iOS on ARM64 @@ -1050,64 +1810,66 @@ index 8bb0f1c6ef4..bfd67de48bb 100644 + [aarch64-apple-tvos*/clang], [PY_SUPPORT_TIER=3], dnl tvOS on ARM64 + [aarch64-apple-watchos*-simulator/clang], [PY_SUPPORT_TIER=3], dnl watchOS Simulator on arm64 + [arm64_32-apple-watchos*/clang], [PY_SUPPORT_TIER=3], dnl watchOS on ARM64 ++ [aarch64-apple-xros*-simulator/clang], [PY_SUPPORT_TIER=3], dnl xrOS Simulator on arm64 ++ [arm64_32-apple-xros*/clang], [PY_SUPPORT_TIER=3], dnl xrOS on ARM64 [aarch64-*-linux-android/clang], [PY_SUPPORT_TIER=3], dnl Android on ARM64 [x86_64-*-linux-android/clang], [PY_SUPPORT_TIER=3], dnl Android on AMD64 -@@ -1536,7 +1667,7 @@ +@@ -1536,7 +1732,7 @@ then case $ac_sys_system in Darwin) LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)';; - iOS) -+ iOS|tvOS|watchOS) ++ iOS|tvOS|watchOS|xrOS) LDLIBRARY='$(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK)';; *) AC_MSG_ERROR([Unknown platform for framework build]);; -@@ -1601,7 +1732,7 @@ +@@ -1601,7 +1797,7 @@ if test $enable_shared = "yes"; then BLDLIBRARY='-L. -lpython$(LDVERSION)' RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}} ;; - iOS) -+ iOS|tvOS|watchOS) ++ iOS|tvOS|watchOS|xrOS) LDLIBRARY='libpython$(LDVERSION).dylib' ;; AIX*) -@@ -3456,7 +3587,7 @@ +@@ -3456,7 +3652,7 @@ then BLDSHARED="$LDSHARED" fi ;; - iOS/*) -+ iOS/*|tvOS/*|watchOS/*) ++ iOS/*|tvOS/*|watchOS/*|xrOS/*) LDSHARED='$(CC) -dynamiclib -F . -framework $(PYTHONFRAMEWORK)' LDCXXSHARED='$(CXX) -dynamiclib -F . -framework $(PYTHONFRAMEWORK)' BLDSHARED="$LDSHARED" -@@ -3580,7 +3711,7 @@ +@@ -3580,7 +3776,7 @@ then Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";; Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";; # -u libsys_s pulls in all symbols in libsys - Darwin/*|iOS/*) -+ Darwin/*|iOS/*|tvOS/*|watchOS/*) ++ Darwin/*|iOS/*|tvOS/*|watchOS/*|xrOS/*) LINKFORSHARED="$extra_undefs -framework CoreFoundation" # Issue #18075: the default maximum stack size (8MBytes) is too -@@ -3604,7 +3735,7 @@ +@@ -3604,7 +3800,7 @@ then LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' fi LINKFORSHARED="$LINKFORSHARED" - elif test $ac_sys_system = "iOS"; then -+ elif test "$ac_sys_system" = "iOS" -o "$ac_sys_system" = "tvOS" -o "$ac_sys_system" = "watchOS"; then ++ elif test "$ac_sys_system" = "iOS" -o "$ac_sys_system" = "tvOS" -o "$ac_sys_system" = "watchOS" -o "$ac_sys_system" = "xrOS"; then LINKFORSHARED="-Wl,-stack_size,$stack_size $LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK)' fi ;; -@@ -4024,7 +4155,7 @@ +@@ -4024,7 +4220,7 @@ AS_VAR_IF([have_libffi], [yes], [ dnl when do we need USING_APPLE_OS_LIBFFI? ctypes_malloc_closure=yes ], - [iOS], [ -+ [iOS|tvOS|watchOS], [ ++ [iOS|tvOS|watchOS|xrOS], [ ctypes_malloc_closure=yes ], [sunos5], [AS_VAR_APPEND([LIBFFI_LIBS], [" -mimpure-text"])] -@@ -5133,9 +5264,9 @@ +@@ -5133,9 +5329,9 @@ fi # checks for library functions AC_CHECK_FUNCS([ \ accept4 alarm bind_textdomain_codeset chmod chown clock closefrom close_range confstr \ @@ -1119,7 +1881,7 @@ index 8bb0f1c6ef4..bfd67de48bb 100644 gai_strerror getegid geteuid getgid getgrent getgrgid getgrgid_r \ getgrnam_r getgrouplist gethostname getitimer getloadavg getlogin \ getpeername getpgid getpid getppid getpriority _getpty \ -@@ -5143,8 +5274,7 @@ +@@ -5143,8 +5339,7 @@ AC_CHECK_FUNCS([ \ getspnam getuid getwd grantpt 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 \ @@ -1129,7 +1891,7 @@ index 8bb0f1c6ef4..bfd67de48bb 100644 pread preadv preadv2 process_vm_readv \ pthread_cond_timedwait_relative_np pthread_condattr_setclock pthread_init \ pthread_kill pthread_getname_np pthread_setname_np pthread_getattr_np \ -@@ -5153,7 +5283,7 @@ +@@ -5153,7 +5348,7 @@ AC_CHECK_FUNCS([ \ sched_setparam sched_setscheduler sem_clockwait sem_getvalue sem_open \ sem_timedwait sem_unlink sendfile setegid seteuid setgid sethostname \ setitimer setlocale setpgid setpgrp setpriority setregid setresgid \ @@ -1138,23 +1900,23 @@ index 8bb0f1c6ef4..bfd67de48bb 100644 sigfillset siginterrupt sigpending sigrelse sigtimedwait sigwait \ sigwaitinfo snprintf splice strftime strlcpy strsignal symlinkat sync \ sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile \ -@@ -5168,12 +5298,20 @@ +@@ -5168,12 +5363,20 @@ if test "$MACHDEP" != linux; then AC_CHECK_FUNCS([lchmod]) fi -# iOS defines some system methods that can be linked (so they are -+# iOS/tvOS/watchOS define some system methods that can be linked (so they are ++# iOS/tvOS/watchOS/xrOS define some system methods that can be linked (so they are # found by configure), but either raise a compilation error (because the # header definition prevents usage - autoconf doesn't use the headers), or # raise an error if used at runtime. Force these symbols off. -if test "$ac_sys_system" != "iOS" ; then - AC_CHECK_FUNCS([getentropy getgroups system]) -+if test "$ac_sys_system" != "iOS" -a "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "watchOS" ; then ++if test "$ac_sys_system" != "iOS" -a "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "watchOS" -a "$ac_sys_system" != "xrOS" ; then + AC_CHECK_FUNCS([ getentropy getgroups system ]) +fi + -+# tvOS/watchOS have some additional methods that can be found, but not used. -+if test "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "watchOS" ; then ++# tvOS/watchOS.xrOS have some additional methods that can be found, but not used. ++if test "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "watchOS" -a "$ac_sys_system" != "xrOS"; then + AC_CHECK_FUNCS([ \ + execv fork fork1 posix_spawn posix_spawnp posix_spawn_file_actions_addclosefrom_np \ + sigaltstack \ @@ -1162,7 +1924,7 @@ index 8bb0f1c6ef4..bfd67de48bb 100644 fi AC_CHECK_DECL([dirfd], -@@ -5427,20 +5565,22 @@ +@@ -5427,20 +5630,22 @@ PY_CHECK_FUNC([setgroups], [ ]) # check for openpty, login_tty, and forkpty @@ -1181,7 +1943,7 @@ index 8bb0f1c6ef4..bfd67de48bb 100644 - [AC_CHECK_LIB([bsd], [forkpty], - [AC_DEFINE([HAVE_FORKPTY]) LIBS="$LIBS -lbsd"])])]) +# tvOS/watchOS have functions for tty, but can't use them -+if test "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "watchOS" ; then ++if test "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "watchOS" -a "$ac_sys_system" != "xrOS"; then + AC_CHECK_FUNCS([openpty], [], + [AC_CHECK_LIB([util], [openpty], + [AC_DEFINE([HAVE_OPENPTY]) LIBS="$LIBS -lutil"], @@ -1199,59 +1961,59 @@ index 8bb0f1c6ef4..bfd67de48bb 100644 # check for long file support functions AC_CHECK_FUNCS([fseek64 fseeko fstatvfs ftell64 ftello statvfs]) -@@ -5479,10 +5619,10 @@ +@@ -5479,10 +5684,10 @@ AC_CHECK_FUNCS([clock_getres], [], [ ]) ]) -# On Android and iOS, clock_settime can be linked (so it is found by -+# On Android, iOS, tvOS and watchOS, clock_settime can be linked (so it is found by ++# On Android, iOS, tvOS, watchOS, and xrOS, clock_settime can be linked (so it is found by # configure), but when used in an unprivileged process, it crashes rather than # returning an error. Force the symbol off. -if test "$ac_sys_system" != "Linux-android" && test "$ac_sys_system" != "iOS" -+if test "$ac_sys_system" != "Linux-android" -a "$ac_sys_system" != "iOS" -a "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "watchOS" ++if test "$ac_sys_system" != "Linux-android" -a "$ac_sys_system" != "iOS" -a "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "watchOS" -a "$ac_sys_system" != "xrOS" then AC_CHECK_FUNCS([clock_settime], [], [ AC_CHECK_LIB([rt], [clock_settime], [ -@@ -6233,8 +6373,8 @@ +@@ -6233,8 +6438,8 @@ if test "$PY_ENABLE_SHARED" = "1" && ( test -n "$ANDROID_API_LEVEL" || test "$MA LIBPYTHON="\$(BLDLIBRARY)" fi -# On iOS the shared libraries must be linked with the Python framework -if test "$ac_sys_system" = "iOS"; then +# On iOS/tvOS/watchOS the shared libraries must be linked with the Python framework -+if test "$ac_sys_system" = "iOS" -o $ac_sys_system = "tvOS" -o $ac_sys_system = "watchOS"; then ++if test "$ac_sys_system" = "iOS" -o $ac_sys_system = "tvOS" -o $ac_sys_system = "watchOS" -o $ac_sys_system = "xrOS"; then MODULE_DEPS_SHARED="$MODULE_DEPS_SHARED \$(PYTHONFRAMEWORKDIR)/\$(PYTHONFRAMEWORK)" fi -@@ -6893,7 +7033,7 @@ +@@ -6893,7 +7098,7 @@ AC_MSG_NOTICE([checking for device files]) dnl NOTE: Inform user how to proceed with files when cross compiling. dnl Some cross-compile builds are predictable; they won't ever dnl have /dev/ptmx or /dev/ptc, so we can set them explicitly. -if test "$ac_sys_system" = "Linux-android" || test "$ac_sys_system" = "iOS"; then -+if test "$ac_sys_system" = "Linux-android" -o "$ac_sys_system" = "iOS" -o "$ac_sys_system" = "tvOS" -o "$ac_sys_system" = "watchOS" ; then ++if test "$ac_sys_system" = "Linux-android" -o "$ac_sys_system" = "iOS" -o "$ac_sys_system" = "tvOS" -o "$ac_sys_system" = "watchOS" -o "$ac_sys_system" = "xrOS"; then ac_cv_file__dev_ptmx=no ac_cv_file__dev_ptc=no else -@@ -7174,7 +7314,7 @@ +@@ -7174,7 +7379,7 @@ AC_ARG_WITH([ensurepip], AS_CASE([$ac_sys_system], [Emscripten], [with_ensurepip=no], [WASI], [with_ensurepip=no], - [iOS], [with_ensurepip=no], -+ [iOS|tvOS|watchOS], [with_ensurepip=no], ++ [iOS|tvOS|watchOS|xrOS], [with_ensurepip=no], [with_ensurepip=upgrade] ) ]) -@@ -7585,7 +7725,7 @@ +@@ -7585,7 +7790,7 @@ AS_CASE([$ac_sys_system], [VxWorks*], [PY_STDLIB_MOD_SET_NA([_scproxy], [termios], [grp])], dnl The _scproxy module is available on macOS [Darwin], [], - [iOS], [ -+ [iOS|tvOS|watchOS], [ ++ [iOS|tvOS|watchOS|xrOS], [ dnl subprocess and multiprocessing are not supported (no fork syscall). dnl curses and tkinter user interface are not available. dnl gdbm and nis aren't available diff --git a/iOS/Resources/Info.plist.in b/iOS/Resources/Info.plist.in -index c3e261ecd9e..26ef7a95de4 100644 +index c3e261e..26ef7a9 100644 --- a/iOS/Resources/Info.plist.in +++ b/iOS/Resources/Info.plist.in @@ -17,13 +17,13 @@ @@ -1270,6 +2032,9 @@ index c3e261ecd9e..26ef7a95de4 100644 CFBundleSupportedPlatforms iPhoneOS +diff --git a/tvOS/README.rst b/tvOS/README.rst +new file mode 100644 +index 0000000..1f79325 --- /dev/null +++ b/tvOS/README.rst @@ -0,0 +1,108 @@ @@ -1381,6 +2146,9 @@ index c3e261ecd9e..26ef7a95de4 100644 + +Using a framework-based Python on tvOS +====================================== +diff --git a/tvOS/Resources/Info.plist.in b/tvOS/Resources/Info.plist.in +new file mode 100644 +index 0000000..ab30508 --- /dev/null +++ b/tvOS/Resources/Info.plist.in @@ -0,0 +1,34 @@ @@ -1418,66 +2186,105 @@ index c3e261ecd9e..26ef7a95de4 100644 + @TVOS_DEPLOYMENT_TARGET@ + + +diff --git a/tvOS/Resources/bin/arm64-apple-tvos-ar b/tvOS/Resources/bin/arm64-apple-tvos-ar +new file mode 100644 +index 0000000..e302748 --- /dev/null +++ b/tvOS/Resources/bin/arm64-apple-tvos-ar @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk appletvos${TVOS_SDK_VERSION} ar "$@" +diff --git a/tvOS/Resources/bin/arm64-apple-tvos-clang b/tvOS/Resources/bin/arm64-apple-tvos-clang +new file mode 100644 +index 0000000..bef66ed --- /dev/null +++ b/tvOS/Resources/bin/arm64-apple-tvos-clang @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk appletvos${TVOS_SDK_VERSION} clang -target arm64-apple-tvos "$@" +diff --git a/tvOS/Resources/bin/arm64-apple-tvos-clang++ b/tvOS/Resources/bin/arm64-apple-tvos-clang++ +new file mode 100644 +index 0000000..04ca4df --- /dev/null +++ b/tvOS/Resources/bin/arm64-apple-tvos-clang++ @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk appletvos${TVOS_SDK_VERSION} clang++ -target arm64-apple-tvos "$@" +diff --git a/tvOS/Resources/bin/arm64-apple-tvos-cpp b/tvOS/Resources/bin/arm64-apple-tvos-cpp +new file mode 100644 +index 0000000..cb797b5 --- /dev/null +++ b/tvOS/Resources/bin/arm64-apple-tvos-cpp @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk appletvos${TVOS_SDK_VERSION} clang -target arm64-apple-tvos -E "$@" +diff --git a/tvOS/Resources/bin/arm64-apple-tvos-simulator-ar b/tvOS/Resources/bin/arm64-apple-tvos-simulator-ar +new file mode 100644 +index 0000000..87ef501 --- /dev/null +++ b/tvOS/Resources/bin/arm64-apple-tvos-simulator-ar @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk appletvsimulator${TVOS_SDK_VERSION} ar "$@" +diff --git a/tvOS/Resources/bin/arm64-apple-tvos-simulator-clang b/tvOS/Resources/bin/arm64-apple-tvos-simulator-clang +new file mode 100644 +index 0000000..729f375 --- /dev/null +++ b/tvOS/Resources/bin/arm64-apple-tvos-simulator-clang @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk appletvsimulator${TVOS_SDK_VERSION} clang -target arm64-apple-tvos-simulator "$@" +diff --git a/tvOS/Resources/bin/arm64-apple-tvos-simulator-clang++ b/tvOS/Resources/bin/arm64-apple-tvos-simulator-clang++ +new file mode 100644 +index 0000000..f98b36a --- /dev/null +++ b/tvOS/Resources/bin/arm64-apple-tvos-simulator-clang++ @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk appletvsimulator${TVOS_SDK_VERSION} clang++ -target arm64-apple-tvos-simulator "$@" +diff --git a/tvOS/Resources/bin/arm64-apple-tvos-simulator-cpp b/tvOS/Resources/bin/arm64-apple-tvos-simulator-cpp +new file mode 100644 +index 0000000..4055526 --- /dev/null +++ b/tvOS/Resources/bin/arm64-apple-tvos-simulator-cpp @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk appletvsimulator${TVOS_SDK_VERSION} clang -target arm64-apple-tvos-simulator -E "$@" +diff --git a/tvOS/Resources/bin/x86_64-apple-tvos-simulator-ar b/tvOS/Resources/bin/x86_64-apple-tvos-simulator-ar +new file mode 100644 +index 0000000..87ef501 --- /dev/null +++ b/tvOS/Resources/bin/x86_64-apple-tvos-simulator-ar @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk appletvsimulator${TVOS_SDK_VERSION} ar "$@" +diff --git a/tvOS/Resources/bin/x86_64-apple-tvos-simulator-clang b/tvOS/Resources/bin/x86_64-apple-tvos-simulator-clang +new file mode 100644 +index 0000000..27b93b5 --- /dev/null +++ b/tvOS/Resources/bin/x86_64-apple-tvos-simulator-clang @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk appletvsimulator${TVOS_SDK_VERSION} clang -target x86_64-apple-tvos-simulator "$@" +diff --git a/tvOS/Resources/bin/x86_64-apple-tvos-simulator-clang++ b/tvOS/Resources/bin/x86_64-apple-tvos-simulator-clang++ +new file mode 100644 +index 0000000..df08331 --- /dev/null +++ b/tvOS/Resources/bin/x86_64-apple-tvos-simulator-clang++ @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk appletvsimulator${TVOS_SDK_VERSION} clang++ -target x86_64-apple-tvos-simulator "$@" +diff --git a/tvOS/Resources/bin/x86_64-apple-tvos-simulator-cpp b/tvOS/Resources/bin/x86_64-apple-tvos-simulator-cpp +new file mode 100644 +index 0000000..ad0c98a --- /dev/null +++ b/tvOS/Resources/bin/x86_64-apple-tvos-simulator-cpp @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk appletvsimulator${TVOS_SDK_VERSION} clang -target x86_64-apple-tvos-simulator -E "$@" +diff --git a/tvOS/Resources/dylib-Info-template.plist b/tvOS/Resources/dylib-Info-template.plist +new file mode 100644 +index 0000000..a20d476 --- /dev/null +++ b/tvOS/Resources/dylib-Info-template.plist @@ -0,0 +1,26 @@ @@ -1507,6 +2314,9 @@ index c3e261ecd9e..26ef7a95de4 100644 + 1 + + +diff --git a/tvOS/Resources/pyconfig.h b/tvOS/Resources/pyconfig.h +new file mode 100644 +index 0000000..4acff2c --- /dev/null +++ b/tvOS/Resources/pyconfig.h @@ -0,0 +1,7 @@ @@ -1517,6 +2327,9 @@ index c3e261ecd9e..26ef7a95de4 100644 +#ifdef __x86_64__ +#include "pyconfig-x86_64.h" +#endif +diff --git a/watchOS/README.rst b/watchOS/README.rst +new file mode 100644 +index 0000000..3522147 --- /dev/null +++ b/watchOS/README.rst @@ -0,0 +1,108 @@ @@ -1628,6 +2441,9 @@ index c3e261ecd9e..26ef7a95de4 100644 + +Using a framework-based Python on watchOS +====================================== +diff --git a/watchOS/Resources/Info.plist.in b/watchOS/Resources/Info.plist.in +new file mode 100644 +index 0000000..e83ddfd --- /dev/null +++ b/watchOS/Resources/Info.plist.in @@ -0,0 +1,34 @@ @@ -1665,66 +2481,105 @@ index c3e261ecd9e..26ef7a95de4 100644 + @WATCHOS_DEPLOYMENT_TARGET@ + + +diff --git a/watchOS/Resources/bin/arm64-apple-watchos-simulator-ar b/watchOS/Resources/bin/arm64-apple-watchos-simulator-ar +new file mode 100644 +index 0000000..dda2b21 --- /dev/null +++ b/watchOS/Resources/bin/arm64-apple-watchos-simulator-ar @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk watchsimulator${WATCHOS_SDK_VERSION} ar "$@" +diff --git a/watchOS/Resources/bin/arm64-apple-watchos-simulator-clang b/watchOS/Resources/bin/arm64-apple-watchos-simulator-clang +new file mode 100644 +index 0000000..38c3de7 --- /dev/null +++ b/watchOS/Resources/bin/arm64-apple-watchos-simulator-clang @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk watchsimulator${WATCHOS_SDK_VERSION} clang -target arm64-apple-watchos-simulator "$@" +diff --git a/watchOS/Resources/bin/arm64-apple-watchos-simulator-clang++ b/watchOS/Resources/bin/arm64-apple-watchos-simulator-clang++ +new file mode 100644 +index 0000000..e25acb1 --- /dev/null +++ b/watchOS/Resources/bin/arm64-apple-watchos-simulator-clang++ @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk watchsimulator${WATCHOS_SDK_VERSION} clang++ -target arm64-apple-watchos-simulator "$@" +diff --git a/watchOS/Resources/bin/arm64-apple-watchos-simulator-cpp b/watchOS/Resources/bin/arm64-apple-watchos-simulator-cpp +new file mode 100644 +index 0000000..0503ed4 --- /dev/null +++ b/watchOS/Resources/bin/arm64-apple-watchos-simulator-cpp @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk watchsimulator clang -target arm64-apple-watchos-simulator -E "$@" +diff --git a/watchOS/Resources/bin/arm64_32-apple-watchos-ar b/watchOS/Resources/bin/arm64_32-apple-watchos-ar +new file mode 100644 +index 0000000..029f9a3 --- /dev/null +++ b/watchOS/Resources/bin/arm64_32-apple-watchos-ar @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk watchos${WATCHOS_SDK_VERSION} ar "$@" +diff --git a/watchOS/Resources/bin/arm64_32-apple-watchos-clang b/watchOS/Resources/bin/arm64_32-apple-watchos-clang +new file mode 100644 +index 0000000..0c6a207 --- /dev/null +++ b/watchOS/Resources/bin/arm64_32-apple-watchos-clang @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk watchos${WATCHOS_SDK_VERSION} clang -target arm64_32-apple-watchos "$@" +diff --git a/watchOS/Resources/bin/arm64_32-apple-watchos-clang++ b/watchOS/Resources/bin/arm64_32-apple-watchos-clang++ +new file mode 100644 +index 0000000..89da49a --- /dev/null +++ b/watchOS/Resources/bin/arm64_32-apple-watchos-clang++ @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk watchos${WATCHOS_SDK_VERSION} clang++ -target arm64_32-apple-watchos "$@" +diff --git a/watchOS/Resources/bin/arm64_32-apple-watchos-cpp b/watchOS/Resources/bin/arm64_32-apple-watchos-cpp +new file mode 100644 +index 0000000..1b91127 --- /dev/null +++ b/watchOS/Resources/bin/arm64_32-apple-watchos-cpp @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk watchos${WATCHOS_SDK_VERSION} clang -target arm64_32-apple-watchos -E "$@" +diff --git a/watchOS/Resources/bin/x86_64-apple-watchos-simulator-ar b/watchOS/Resources/bin/x86_64-apple-watchos-simulator-ar +new file mode 100644 +index 0000000..dda2b21 --- /dev/null +++ b/watchOS/Resources/bin/x86_64-apple-watchos-simulator-ar @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk watchsimulator${WATCHOS_SDK_VERSION} ar "$@" +diff --git a/watchOS/Resources/bin/x86_64-apple-watchos-simulator-clang b/watchOS/Resources/bin/x86_64-apple-watchos-simulator-clang +new file mode 100644 +index 0000000..185a8fb --- /dev/null +++ b/watchOS/Resources/bin/x86_64-apple-watchos-simulator-clang @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk watchsimulator${WATCHOS_SDK_VERSION} clang -target x86_64-apple-watchos-simulator "$@" +diff --git a/watchOS/Resources/bin/x86_64-apple-watchos-simulator-clang++ b/watchOS/Resources/bin/x86_64-apple-watchos-simulator-clang++ +new file mode 100644 +index 0000000..d112772 --- /dev/null +++ b/watchOS/Resources/bin/x86_64-apple-watchos-simulator-clang++ @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk watchsimulator${WATCHOS_SDK_VERSION} clang++ -target x86_64-apple-watchos-simulator "$@" +diff --git a/watchOS/Resources/bin/x86_64-apple-watchos-simulator-cpp b/watchOS/Resources/bin/x86_64-apple-watchos-simulator-cpp +new file mode 100644 +index 0000000..bd436d8 --- /dev/null +++ b/watchOS/Resources/bin/x86_64-apple-watchos-simulator-cpp @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk watchsimulator${WATCHOS_SDK_VERSION} clang -target x86_64-apple-watchos-simulator -E "$@" +diff --git a/watchOS/Resources/dylib-Info-template.plist b/watchOS/Resources/dylib-Info-template.plist +new file mode 100644 +index 0000000..6f8c0bc --- /dev/null +++ b/watchOS/Resources/dylib-Info-template.plist @@ -0,0 +1,26 @@ @@ -1754,6 +2609,9 @@ index c3e261ecd9e..26ef7a95de4 100644 + 1 + + +diff --git a/watchOS/Resources/pyconfig.h b/watchOS/Resources/pyconfig.h +new file mode 100644 +index 0000000..f842b98 --- /dev/null +++ b/watchOS/Resources/pyconfig.h @@ -0,0 +1,11 @@ @@ -1768,3 +2626,209 @@ index c3e261ecd9e..26ef7a95de4 100644 +#ifdef __x86_64__ +#include "pyconfig-x86_64.h" +#endif +diff --git a/xrOS/Resources/Info.plist.in b/xrOS/Resources/Info.plist.in +new file mode 100644 +index 0000000..d62cb35 +--- /dev/null ++++ b/xrOS/Resources/Info.plist.in +@@ -0,0 +1,34 @@ ++ ++ ++ ++ ++ CFBundleDevelopmentRegion ++ en ++ CFBundleExecutable ++ Python ++ CFBundleGetInfoString ++ Python Runtime and Library ++ CFBundleIdentifier ++ @PYTHONFRAMEWORKIDENTIFIER@ ++ CFBundleInfoDictionaryVersion ++ 6.0 ++ CFBundleName ++ Python ++ CFBundlePackageType ++ FMWK ++ CFBundleShortVersionString ++ %VERSION% ++ CFBundleLongVersionString ++ %VERSION%, (c) 2001-2023 Python Software Foundation. ++ CFBundleSignature ++ ???? ++ CFBundleVersion ++ %VERSION% ++ CFBundleSupportedPlatforms ++ ++ xrOS ++ ++ MinimumOSVersion ++ @XROS_DEPLOYMENT_TARGET@ ++ ++ +diff --git a/xrOS/Resources/bin/arm64-apple-xros-simulator-ar b/xrOS/Resources/bin/arm64-apple-xros-simulator-ar +new file mode 100644 +index 0000000..b202330 +--- /dev/null ++++ b/xrOS/Resources/bin/arm64-apple-xros-simulator-ar +@@ -0,0 +1,2 @@ ++#!/bin/bash ++xcrun --sdk xrsimulator${XROS_SDK_VERSION} ar "$@" +diff --git a/xrOS/Resources/bin/arm64-apple-xros-simulator-clang b/xrOS/Resources/bin/arm64-apple-xros-simulator-clang +new file mode 100644 +index 0000000..9aefb41 +--- /dev/null ++++ b/xrOS/Resources/bin/arm64-apple-xros-simulator-clang +@@ -0,0 +1,2 @@ ++#!/bin/bash ++xcrun --sdk xrsimulator${XROS_SDK_VERSION} clang -target arm64-apple-xros-simulator "$@" +diff --git a/xrOS/Resources/bin/arm64-apple-xros-simulator-clang++ b/xrOS/Resources/bin/arm64-apple-xros-simulator-clang++ +new file mode 100644 +index 0000000..3d25641 +--- /dev/null ++++ b/xrOS/Resources/bin/arm64-apple-xros-simulator-clang++ +@@ -0,0 +1,2 @@ ++#!/bin/bash ++xcrun --sdk xrsimulator${XROS_SDK_VERSION} clang++ -target arm64-apple-xros-simulator "$@" +diff --git a/xrOS/Resources/bin/arm64-apple-xros-simulator-cpp b/xrOS/Resources/bin/arm64-apple-xros-simulator-cpp +new file mode 100644 +index 0000000..2e7be87 +--- /dev/null ++++ b/xrOS/Resources/bin/arm64-apple-xros-simulator-cpp +@@ -0,0 +1,2 @@ ++#!/bin/bash ++xcrun --sdk xrsimulator clang -target arm64-apple-xros-simulator -E "$@" +diff --git a/xrOS/Resources/bin/arm64_32-apple-xros-ar b/xrOS/Resources/bin/arm64_32-apple-xros-ar +new file mode 100644 +index 0000000..9fd78a2 +--- /dev/null ++++ b/xrOS/Resources/bin/arm64_32-apple-xros-ar +@@ -0,0 +1,2 @@ ++#!/bin/bash ++xcrun --sdk xros${XROS_SDK_VERSION} ar "$@" +diff --git a/xrOS/Resources/bin/arm64_32-apple-xros-clang b/xrOS/Resources/bin/arm64_32-apple-xros-clang +new file mode 100644 +index 0000000..5ac7a31 +--- /dev/null ++++ b/xrOS/Resources/bin/arm64_32-apple-xros-clang +@@ -0,0 +1,2 @@ ++#!/bin/bash ++xcrun --sdk xros${XROS_SDK_VERSION} clang -target arm64_32-apple-xros "$@" +diff --git a/xrOS/Resources/bin/arm64_32-apple-xros-clang++ b/xrOS/Resources/bin/arm64_32-apple-xros-clang++ +new file mode 100644 +index 0000000..35f1820 +--- /dev/null ++++ b/xrOS/Resources/bin/arm64_32-apple-xros-clang++ +@@ -0,0 +1,2 @@ ++#!/bin/bash ++xcrun --sdk xros${XROS_SDK_VERSION} clang++ -target arm64_32-apple-xros "$@" +diff --git a/xrOS/Resources/bin/arm64_32-apple-xros-cpp b/xrOS/Resources/bin/arm64_32-apple-xros-cpp +new file mode 100644 +index 0000000..e34ba5d +--- /dev/null ++++ b/xrOS/Resources/bin/arm64_32-apple-xros-cpp +@@ -0,0 +1,2 @@ ++#!/bin/bash ++xcrun --sdk xros${XROS_SDK_VERSION} clang -target arm64_32-apple-xros -E "$@" +diff --git a/xrOS/Resources/bin/x86_64-apple-xros-simulator-ar b/xrOS/Resources/bin/x86_64-apple-xros-simulator-ar +new file mode 100644 +index 0000000..b202330 +--- /dev/null ++++ b/xrOS/Resources/bin/x86_64-apple-xros-simulator-ar +@@ -0,0 +1,2 @@ ++#!/bin/bash ++xcrun --sdk xrsimulator${XROS_SDK_VERSION} ar "$@" +diff --git a/xrOS/Resources/bin/x86_64-apple-xros-simulator-clang b/xrOS/Resources/bin/x86_64-apple-xros-simulator-clang +new file mode 100644 +index 0000000..e094d17 +--- /dev/null ++++ b/xrOS/Resources/bin/x86_64-apple-xros-simulator-clang +@@ -0,0 +1,2 @@ ++#!/bin/bash ++xcrun --sdk xrsimulator${XROS_SDK_VERSION} clang -target x86_64-apple-xros-simulator "$@" +diff --git a/xrOS/Resources/bin/x86_64-apple-xros-simulator-clang++ b/xrOS/Resources/bin/x86_64-apple-xros-simulator-clang++ +new file mode 100644 +index 0000000..f161ac7 +--- /dev/null ++++ b/xrOS/Resources/bin/x86_64-apple-xros-simulator-clang++ +@@ -0,0 +1,2 @@ ++#!/bin/bash ++xcrun --sdk xrsimulator${XROS_SDK_VERSION} clang++ -target x86_64-apple-xros-simulator "$@" +diff --git a/xrOS/Resources/bin/x86_64-apple-xros-simulator-cpp b/xrOS/Resources/bin/x86_64-apple-xros-simulator-cpp +new file mode 100644 +index 0000000..38e4e3d +--- /dev/null ++++ b/xrOS/Resources/bin/x86_64-apple-xros-simulator-cpp +@@ -0,0 +1,2 @@ ++#!/bin/bash ++xcrun --sdk xrsimulator${XROS_SDK_VERSION} clang -target x86_64-apple-xros-simulator -E "$@" +diff --git a/xrOS/Resources/dylib-Info-template.plist b/xrOS/Resources/dylib-Info-template.plist +new file mode 100644 +index 0000000..f630cdb +--- /dev/null ++++ b/xrOS/Resources/dylib-Info-template.plist +@@ -0,0 +1,26 @@ ++ ++ ++ ++ ++ CFBundleDevelopmentRegion ++ en ++ CFBundleExecutable ++ ++ CFBundleIdentifier ++ ++ CFBundleInfoDictionaryVersion ++ 6.0 ++ CFBundlePackageType ++ APPL ++ CFBundleShortVersionString ++ 1.0 ++ CFBundleSupportedPlatforms ++ ++ xrOS ++ ++ MinimumOSVersion ++ 4.0 ++ CFBundleVersion ++ 1 ++ ++ +diff --git a/xrOS/Resources/pyconfig.h b/xrOS/Resources/pyconfig.h +new file mode 100644 +index 0000000..f842b98 +--- /dev/null ++++ b/xrOS/Resources/pyconfig.h +@@ -0,0 +1,11 @@ ++#ifdef __arm64__ ++# ifdef __LP64__ ++#include "pyconfig-arm64.h" ++# else ++#include "pyconfig-arm64_32.h" ++# endif ++#endif ++ ++#ifdef __x86_64__ ++#include "pyconfig-x86_64.h" ++#endif + +--- a/config.sub 2025-04-12 20:06:19 ++++ b/config.sub 2025-04-12 20:06:52 +@@ -1743,7 +1743,7 @@ + | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ + | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \ + | hiux* | abug | nacl* | netware* | windows* \ +- | os9* | macos* | osx* | ios* | tvos* | watchos* \ ++ | os9* | macos* | osx* | ios* | tvos* | watchos* | xros* \ + | mpw* | magic* | mmixware* | mon960* | lnews* \ + | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ + | aos* | aros* | cloudabi* | sortix* | twizzler* \ +@@ -1867,7 +1867,7 @@ + ;; + *-eabi*- | *-gnueabi*-) + ;; +- ios*-simulator- | tvos*-simulator- | watchos*-simulator- ) ++ ios*-simulator- | tvos*-simulator- | watchos*-simulator- | xros*-simulator- ) + ;; + none--*) + # None (no kernel, i.e. freestanding / bare metal), From 20d5f12ea0db1c82d8ba54e0c35e2f5732d53403 Mon Sep 17 00:00:00 2001 From: John Zhou Date: Sat, 12 Apr 2025 20:55:43 -0500 Subject: [PATCH 02/22] regen'd patch after some stuff --- patch/Python/Python.patch | 419 +++++++++++++++++++------------------- 1 file changed, 205 insertions(+), 214 deletions(-) diff --git a/patch/Python/Python.patch b/patch/Python/Python.patch index edfcd1d3..fcad96ff 100644 --- a/patch/Python/Python.patch +++ b/patch/Python/Python.patch @@ -1,8 +1,7 @@ -diff --git a/Lib/platform.py b/Lib/platform.py -index 1f6baed..7e8bc9b 100644 ---- a/Lib/platform.py -+++ b/Lib/platform.py -@@ -521,6 +521,78 @@ def ios_ver(system="", release="", model="", is_simulator=False): +diff -ur Python-3.14.0a6-orig/Lib/platform.py Python-3.14.0a6/Lib/platform.py +--- Python-3.14.0a6-orig/Lib/platform.py 2025-03-14 10:05:02 ++++ Python-3.14.0a6/Lib/platform.py 2025-04-12 20:43:35 +@@ -521,6 +521,78 @@ return IOSVersionInfo(system, release, model, is_simulator) @@ -81,7 +80,7 @@ index 1f6baed..7e8bc9b 100644 def _java_getprop(name, default): """This private helper is deprecated in 3.13 and will be removed in 3.15""" from java.lang import System -@@ -884,14 +956,30 @@ class _Processor: +@@ -884,14 +956,30 @@ csid, cpu_number = vms_lib.getsyi('SYI$_CPU', 0) return 'Alpha' if cpu_number >= 128 else 'VAX' @@ -115,7 +114,7 @@ index 1f6baed..7e8bc9b 100644 def from_subprocess(): """ Fall back to `uname -p` -@@ -1051,9 +1139,15 @@ def uname(): +@@ -1051,9 +1139,15 @@ system = 'Android' release = android_ver().release @@ -132,7 +131,7 @@ index 1f6baed..7e8bc9b 100644 vals = system, node, release, version, machine # Replace 'unknown' values with the more portable '' -@@ -1343,6 +1437,12 @@ def platform(aliased=False, terse=False): +@@ -1343,6 +1437,12 @@ # macOS and iOS both report as a "Darwin" kernel if sys.platform == "ios": system, release, _, _ = ios_ver() @@ -145,11 +144,10 @@ index 1f6baed..7e8bc9b 100644 else: macos_release = mac_ver()[0] if macos_release: -diff --git a/Lib/sysconfig/__init__.py b/Lib/sysconfig/__init__.py -index 18e6b8d..28a491f 100644 ---- a/Lib/sysconfig/__init__.py -+++ b/Lib/sysconfig/__init__.py -@@ -719,6 +719,18 @@ def get_platform(): +diff -ur Python-3.14.0a6-orig/Lib/sysconfig/__init__.py Python-3.14.0a6/Lib/sysconfig/__init__.py +--- Python-3.14.0a6-orig/Lib/sysconfig/__init__.py 2025-03-14 10:05:02 ++++ Python-3.14.0a6/Lib/sysconfig/__init__.py 2025-04-12 20:43:35 +@@ -719,6 +719,18 @@ release = get_config_vars().get("IPHONEOS_DEPLOYMENT_TARGET", "13.0") osname = sys.platform machine = sys.implementation._multiarch @@ -168,11 +166,10 @@ index 18e6b8d..28a491f 100644 else: import _osx_support osname, release, machine = _osx_support.get_platform_osx( -diff --git a/Misc/platform_triplet.c b/Misc/platform_triplet.c -index ec0857a..432ff74 100644 ---- a/Misc/platform_triplet.c -+++ b/Misc/platform_triplet.c -@@ -257,6 +257,32 @@ PLATFORM_TRIPLET=arm64-iphonesimulator +diff -ur Python-3.14.0a6-orig/Misc/platform_triplet.c Python-3.14.0a6/Misc/platform_triplet.c +--- Python-3.14.0a6-orig/Misc/platform_triplet.c 2025-03-14 10:05:02 ++++ Python-3.14.0a6/Misc/platform_triplet.c 2025-04-12 20:43:35 +@@ -257,6 +257,32 @@ # else PLATFORM_TRIPLET=arm64-iphoneos # endif @@ -205,10 +202,9 @@ index ec0857a..432ff74 100644 // Older macOS SDKs do not define TARGET_OS_OSX # elif !defined(TARGET_OS_OSX) || TARGET_OS_OSX PLATFORM_TRIPLET=darwin -diff --git a/aclocal.m4 b/aclocal.m4 -index 920c2b3..1f932fa 100644 ---- a/aclocal.m4 -+++ b/aclocal.m4 +diff -ur Python-3.14.0a6-orig/aclocal.m4 Python-3.14.0a6/aclocal.m4 +--- Python-3.14.0a6-orig/aclocal.m4 2025-03-14 10:05:02 ++++ Python-3.14.0a6/aclocal.m4 2025-04-12 20:44:30 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.16.5 -*- Autoconf -*- +# generated automatically by aclocal 1.17 -*- Autoconf -*- @@ -218,7 +214,7 @@ index 920c2b3..1f932fa 100644 # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, -@@ -44,12 +44,12 @@ m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun +@@ -44,12 +44,12 @@ # Early versions of this macro (i.e., before serial 12) would not work # when interprocedural optimization (via link-time optimization) was # enabled. This would happen when, say, the GCC/clang "-flto" flag, or the @@ -236,7 +232,7 @@ index 920c2b3..1f932fa 100644 # # The solution to the above problem was to: # -@@ -68,19 +68,19 @@ m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun +@@ -68,19 +68,19 @@ # program binary that contains the value, which the macro can then find. # # How does the exit code depend on the special value residing in memory? @@ -249,10 +245,6 @@ index 920c2b3..1f932fa 100644 -# computation to run time, and to prepare by allocating and populating the -# data segment with the special value. For further details, refer to the -# source code of the test program. --# --# Note that the test program is never meant to be run. It only exists to host --# a double float value in a given platform's binary format. Thus, error --# handling is not included. +# Memory, unlike variables and registers, can be addressed indirectly at +# run time. The exit code of this test program is a result of indirectly +# reading and writing to the memory region where the special value is @@ -262,14 +254,17 @@ index 920c2b3..1f932fa 100644 +# but to defer the computation to run time, and to prepare by allocating +# and populating the data segment with the special value. For further +# details, refer to the source code of the test program. -+# + # +-# Note that the test program is never meant to be run. It only exists to host +-# a double float value in a given platform's binary format. Thus, error +-# handling is not included. +# Note that the test program is never meant to be run. It only exists to +# host a double float value in a given platform's binary format. Thus, +# error handling is not included. # # LICENSE # -@@ -91,7 +91,7 @@ m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun +@@ -91,7 +91,7 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. @@ -278,7 +273,7 @@ index 920c2b3..1f932fa 100644 AC_DEFUN([AX_C_FLOAT_WORDS_BIGENDIAN], [AC_CACHE_CHECK(whether float word ordering is bigendian, -@@ -112,10 +112,10 @@ int main (int argc, char *argv[]) +@@ -112,10 +112,10 @@ ]])], [ @@ -291,7 +286,7 @@ index 920c2b3..1f932fa 100644 if test "$ax_cv_c_float_words_bigendian" = unknown; then ax_cv_c_float_words_bigendian=no else -@@ -181,14 +181,24 @@ esac +@@ -181,14 +181,24 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. @@ -319,7 +314,7 @@ index 920c2b3..1f932fa 100644 AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], [AS_VAR_SET(CACHEVAR,[yes])], [AS_VAR_SET(CACHEVAR,[no])]) -@@ -224,7 +234,7 @@ AS_VAR_POPDEF([CACHEVAR])dnl +@@ -224,7 +234,7 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. @@ -328,7 +323,7 @@ index 920c2b3..1f932fa 100644 AU_ALIAS([AC_CHECK_DEFINED], [AC_CHECK_DEFINE]) AC_DEFUN([AC_CHECK_DEFINE],[ -@@ -264,8 +274,8 @@ AC_CACHE_CHECK([for $2], ac_var, +@@ -264,8 +274,8 @@ dnl AC_LANG_FUNC_LINK_TRY [AC_LINK_IFELSE([AC_LANG_PROGRAM([$1 #undef $2 @@ -339,7 +334,7 @@ index 920c2b3..1f932fa 100644 return f != $2; ])], [AS_VAR_SET(ac_var, yes)], [AS_VAR_SET(ac_var, no)])]) -@@ -399,7 +409,7 @@ AC_DEFUN([AX_CHECK_OPENSSL], [ +@@ -399,7 +409,7 @@ ]) # pkg.m4 - Macros to locate and use pkg-config. -*- Autoconf -*- @@ -348,7 +343,7 @@ index 920c2b3..1f932fa 100644 dnl Copyright © 2004 Scott James Remnant . dnl Copyright © 2012-2015 Dan Nicholson -@@ -415,9 +425,7 @@ dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +@@ -415,9 +425,7 @@ dnl General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License @@ -359,7 +354,7 @@ index 920c2b3..1f932fa 100644 dnl dnl As a special exception to the GNU General Public License, if you dnl distribute this file as part of a program that contains a -@@ -446,8 +454,8 @@ m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, +@@ -446,8 +454,8 @@ [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) ])dnl PKG_PREREQ @@ -370,7 +365,7 @@ index 920c2b3..1f932fa 100644 dnl Since: 0.16 dnl dnl Search for the pkg-config tool and set the PKG_CONFIG variable to -@@ -455,6 +463,12 @@ dnl first found in the path. Checks that the version of pkg-config found +@@ -455,6 +463,12 @@ dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is dnl used since that's the first version where most current features of dnl pkg-config existed. @@ -383,7 +378,7 @@ index 920c2b3..1f932fa 100644 AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) -@@ -475,6 +489,9 @@ if test -n "$PKG_CONFIG"; then +@@ -475,6 +489,9 @@ AC_MSG_RESULT([no]) PKG_CONFIG="" fi @@ -393,7 +388,7 @@ index 920c2b3..1f932fa 100644 fi[]dnl ])dnl PKG_PROG_PKG_CONFIG -@@ -744,7 +761,7 @@ AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"], +@@ -744,7 +761,7 @@ # AM_CONDITIONAL -*- Autoconf -*- @@ -402,7 +397,7 @@ index 920c2b3..1f932fa 100644 # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, -@@ -775,7 +792,7 @@ AC_CONFIG_COMMANDS_PRE( +@@ -775,7 +792,7 @@ Usually this means the macro was only invoked conditionally.]]) fi])]) @@ -411,11 +406,31 @@ index 920c2b3..1f932fa 100644 # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, -diff --git a/configure b/configure -index d0ae103..cc5d6a0 100755 ---- a/configure -+++ b/configure -@@ -974,6 +974,9 @@ LDFLAGS +diff -ur Python-3.14.0a6-orig/config.sub Python-3.14.0a6/config.sub +--- Python-3.14.0a6-orig/config.sub 2025-03-14 10:05:02 ++++ Python-3.14.0a6/config.sub 2025-04-12 20:43:35 +@@ -1743,7 +1743,7 @@ + | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ + | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \ + | hiux* | abug | nacl* | netware* | windows* \ +- | os9* | macos* | osx* | ios* | tvos* | watchos* \ ++ | os9* | macos* | osx* | ios* | tvos* | watchos* | xros* \ + | mpw* | magic* | mmixware* | mon960* | lnews* \ + | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ + | aos* | aros* | cloudabi* | sortix* | twizzler* \ +@@ -1867,7 +1867,7 @@ + ;; + *-eabi*- | *-gnueabi*-) + ;; +- ios*-simulator- | tvos*-simulator- | watchos*-simulator- ) ++ ios*-simulator- | tvos*-simulator- | watchos*-simulator- | xros*-simulator- ) + ;; + none--*) + # None (no kernel, i.e. freestanding / bare metal), +diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure +--- Python-3.14.0a6-orig/configure 2025-03-14 10:05:02 ++++ Python-3.14.0a6/configure 2025-04-12 20:44:31 +@@ -974,6 +974,9 @@ CFLAGS CC HAS_XCRUN @@ -425,17 +440,17 @@ index d0ae103..cc5d6a0 100755 IPHONEOS_DEPLOYMENT_TARGET EXPORT_MACOSX_DEPLOYMENT_TARGET CONFIGURE_MACOSX_DEPLOYMENT_TARGET -@@ -4060,6 +4063,9 @@ printf "%s\n" "yes" >&6; } - printf "%s\n" "no" >&6; } +@@ -4061,6 +4064,9 @@ PKG_CONFIG="" fi -+fi + fi +if test -z "$PKG_CONFIG"; then + as_fn_error $? "pkg-config not found" "$LINENO" 5 - fi ++fi ;; #( no) : -@@ -4100,6 +4106,15 @@ then + +@@ -4100,6 +4106,15 @@ *-apple-ios*) ac_sys_system=iOS ;; @@ -451,7 +466,7 @@ index d0ae103..cc5d6a0 100755 *-*-darwin*) ac_sys_system=Darwin ;; -@@ -4181,7 +4196,7 @@ fi +@@ -4181,7 +4196,7 @@ # On cross-compile builds, configure will look for a host-specific compiler by # prepending the user-provided host triple to the required binary name. # @@ -460,7 +475,7 @@ index d0ae103..cc5d6a0 100755 # which isn't a binary that exists, and isn't very convenient, as it contains the # iOS version. As the default cross-compiler name won't exist, configure falls # back to gcc, which *definitely* won't work. We're providing wrapper scripts for -@@ -4196,6 +4211,18 @@ if test -z "$AR"; then +@@ -4196,6 +4211,18 @@ aarch64-apple-ios*-simulator) AR=arm64-apple-ios-simulator-ar ;; aarch64-apple-ios*) AR=arm64-apple-ios-ar ;; x86_64-apple-ios*-simulator) AR=x86_64-apple-ios-simulator-ar ;; @@ -479,7 +494,7 @@ index d0ae103..cc5d6a0 100755 *) esac fi -@@ -4204,6 +4231,18 @@ if test -z "$CC"; then +@@ -4204,6 +4231,18 @@ aarch64-apple-ios*-simulator) CC=arm64-apple-ios-simulator-clang ;; aarch64-apple-ios*) CC=arm64-apple-ios-clang ;; x86_64-apple-ios*-simulator) CC=x86_64-apple-ios-simulator-clang ;; @@ -498,7 +513,7 @@ index d0ae103..cc5d6a0 100755 *) esac fi -@@ -4212,6 +4251,18 @@ if test -z "$CPP"; then +@@ -4212,6 +4251,18 @@ aarch64-apple-ios*-simulator) CPP=arm64-apple-ios-simulator-cpp ;; aarch64-apple-ios*) CPP=arm64-apple-ios-cpp ;; x86_64-apple-ios*-simulator) CPP=x86_64-apple-ios-simulator-cpp ;; @@ -517,7 +532,7 @@ index d0ae103..cc5d6a0 100755 *) esac fi -@@ -4220,6 +4271,18 @@ if test -z "$CXX"; then +@@ -4220,6 +4271,18 @@ aarch64-apple-ios*-simulator) CXX=arm64-apple-ios-simulator-clang++ ;; aarch64-apple-ios*) CXX=arm64-apple-ios-clang++ ;; x86_64-apple-ios*-simulator) CXX=x86_64-apple-ios-simulator-clang++ ;; @@ -536,7 +551,7 @@ index d0ae103..cc5d6a0 100755 *) esac fi -@@ -4342,8 +4405,11 @@ then : +@@ -4342,8 +4405,11 @@ case $enableval in yes) case $ac_sys_system in @@ -550,7 +565,7 @@ index d0ae103..cc5d6a0 100755 *) as_fn_error $? "Unknown platform for framework build" "$LINENO" 5 esac esac -@@ -4352,6 +4418,9 @@ then : +@@ -4352,6 +4418,9 @@ no) case $ac_sys_system in iOS) as_fn_error $? "iOS builds must use --enable-framework" "$LINENO" 5 ;; @@ -560,11 +575,10 @@ index d0ae103..cc5d6a0 100755 *) PYTHONFRAMEWORK= PYTHONFRAMEWORKDIR=no-framework -@@ -4458,6 +4527,50 @@ then : - +@@ -4459,6 +4528,50 @@ ac_config_files="$ac_config_files iOS/Resources/Info.plist" -+ ;; + ;; + tvOS) : + FRAMEWORKINSTALLFIRST="frameworkinstallunversionedstructure" + FRAMEWORKALTINSTALLFIRST="frameworkinstallunversionedstructure " @@ -608,10 +622,11 @@ index d0ae103..cc5d6a0 100755 + RESSRCDIR=watchOS/Resources + + ac_config_files="$ac_config_files xrOS/Resources/Info.plist" - ;; ++ ;; *) as_fn_error $? "Unknown platform for framework build" "$LINENO" 5 -@@ -4469,6 +4582,9 @@ else case e in #( + ;; +@@ -4469,6 +4582,9 @@ e) case $ac_sys_system in iOS) as_fn_error $? "iOS builds must use --enable-framework" "$LINENO" 5 ;; @@ -621,7 +636,7 @@ index d0ae103..cc5d6a0 100755 *) PYTHONFRAMEWORK= PYTHONFRAMEWORKDIR=no-framework -@@ -4523,8 +4639,8 @@ then : +@@ -4523,8 +4639,8 @@ case "$withval" in yes) case $ac_sys_system in @@ -632,7 +647,7 @@ index d0ae103..cc5d6a0 100755 APP_STORE_COMPLIANCE_PATCH="Mac/Resources/app-store-compliance.patch" ;; *) as_fn_error $? "no default app store compliance patch available for $ac_sys_system" "$LINENO" 5 ;; -@@ -4542,8 +4658,8 @@ printf "%s\n" "applying custom app store compliance patch" >&6; } +@@ -4542,8 +4658,8 @@ else case e in #( e) case $ac_sys_system in @@ -643,7 +658,7 @@ index d0ae103..cc5d6a0 100755 APP_STORE_COMPLIANCE_PATCH="Mac/Resources/app-store-compliance.patch" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: applying default app store compliance patch" >&5 printf "%s\n" "applying default app store compliance patch" >&6; } -@@ -4598,6 +4714,72 @@ printf "%s\n" "$IPHONEOS_DEPLOYMENT_TARGET" >&6; } +@@ -4598,6 +4714,72 @@ ;; esac ;; @@ -716,7 +731,7 @@ index d0ae103..cc5d6a0 100755 *-*-darwin*) case "$host_cpu" in arm*) -@@ -4688,9 +4870,15 @@ printf "%s\n" "#define _BSD_SOURCE 1" >>confdefs.h +@@ -4688,9 +4870,15 @@ define_xopen_source=no;; Darwin/[12][0-9].*) define_xopen_source=no;; @@ -733,20 +748,22 @@ index d0ae103..cc5d6a0 100755 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from # defining NI_NUMERICHOST. QNX/6.3.2) -@@ -4753,7 +4941,11 @@ fi +@@ -4753,9 +4941,13 @@ CONFIGURE_MACOSX_DEPLOYMENT_TARGET= EXPORT_MACOSX_DEPLOYMENT_TARGET='#' -# Record the value of IPHONEOS_DEPLOYMENT_TARGET enforced by the selected host triple. +# Record the value of IPHONEOS_DEPLOYMENT_TARGET / TVOS_DEPLOYMENT_TARGET / +# WATCHOS_DEPLOYMENT_TARGET / XROS_DEPLOYMENT_TARGET enforced by the selected host triple. + + + + + - - # checks for alternative programs -@@ -4794,6 +4986,21 @@ case $ac_sys_system in #( + + # compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just +@@ -4794,6 +4986,16 @@ as_fn_append CFLAGS " -mios-version-min=${IPHONEOS_DEPLOYMENT_TARGET}" as_fn_append LDFLAGS " -mios-version-min=${IPHONEOS_DEPLOYMENT_TARGET}" ;; #( @@ -759,16 +776,11 @@ index d0ae103..cc5d6a0 100755 + + as_fn_append CFLAGS " -mwatchos-version-min=${WATCHOS_DEPLOYMENT_TARGET}" + as_fn_append LDFLAGS " -mwatchos-version-min=${WATCHOS_DEPLOYMENT_TARGET}" -+ ;; #( -+ xrOS) : -+ -+ as_fn_append CFLAGS " -mxros-version-min=${XROS_DEPLOYMENT_TARGET}" -+ as_fn_append LDFLAGS " -mxros-version-min=${XROS_DEPLOYMENT_TARGET}" + ;; #( *) : ;; esac -@@ -7163,6 +7370,12 @@ case $ac_sys_system in #( +@@ -7163,6 +7365,12 @@ MULTIARCH="" ;; #( iOS) : MULTIARCH="" ;; #( @@ -781,7 +793,7 @@ index d0ae103..cc5d6a0 100755 FreeBSD*) : MULTIARCH="" ;; #( *) : -@@ -7183,7 +7396,7 @@ fi +@@ -7183,7 +7391,7 @@ printf "%s\n" "$MULTIARCH" >&6; } case $ac_sys_system in #( @@ -790,7 +802,7 @@ index d0ae103..cc5d6a0 100755 SOABI_PLATFORM=`echo "$PLATFORM_TRIPLET" | cut -d '-' -f2` ;; #( *) : SOABI_PLATFORM=$PLATFORM_TRIPLET -@@ -7234,6 +7447,18 @@ case $host/$ac_cv_cc_name in #( +@@ -7234,6 +7442,18 @@ PY_SUPPORT_TIER=3 ;; #( aarch64-apple-ios*/clang) : PY_SUPPORT_TIER=3 ;; #( @@ -809,7 +821,7 @@ index d0ae103..cc5d6a0 100755 aarch64-*-linux-android/clang) : PY_SUPPORT_TIER=3 ;; #( x86_64-*-linux-android/clang) : -@@ -7670,7 +7895,7 @@ then +@@ -7670,7 +7890,7 @@ case $ac_sys_system in Darwin) LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)';; @@ -818,7 +830,7 @@ index d0ae103..cc5d6a0 100755 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK)';; *) as_fn_error $? "Unknown platform for framework build" "$LINENO" 5;; -@@ -7736,7 +7961,7 @@ printf "%s\n" "#define Py_ENABLE_SHARED 1" >>confdefs.h +@@ -7736,7 +7956,7 @@ BLDLIBRARY='-L. -lpython$(LDVERSION)' RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}} ;; @@ -827,7 +839,7 @@ index d0ae103..cc5d6a0 100755 LDLIBRARY='libpython$(LDVERSION).dylib' ;; AIX*) -@@ -8444,15 +8669,18 @@ if test "$Py_OPT" = 'true' ; then +@@ -8444,15 +8664,18 @@ if test "x$ac_cv_gcc_compat" = xyes then : @@ -849,7 +861,7 @@ index d0ae103..cc5d6a0 100755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -8582,15 +8810,18 @@ if test "$Py_LTO" = 'true' ; then +@@ -8582,15 +8805,18 @@ case $ac_cv_cc_name in clang) LDFLAGS_NOLTO="-fno-lto" @@ -871,7 +883,7 @@ index d0ae103..cc5d6a0 100755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -8767,15 +8998,18 @@ printf "%s\n" "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;} +@@ -8767,15 +8993,18 @@ if test $Py_LTO_POLICY = default then # Check that ThinLTO is accepted. @@ -893,7 +905,7 @@ index d0ae103..cc5d6a0 100755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -8824,15 +9058,18 @@ fi +@@ -8824,15 +9053,18 @@ if test $Py_LTO_POLICY = default then # Check that ThinLTO is accepted @@ -915,7 +927,7 @@ index d0ae103..cc5d6a0 100755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -9109,15 +9346,18 @@ if test "$Py_BOLT" = 'true' ; then +@@ -9109,15 +9341,18 @@ # -fno-reorder-blocks-and-partition is required for bolt to work. # Possibly GCC only. @@ -937,7 +949,7 @@ index d0ae103..cc5d6a0 100755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -9765,15 +10005,18 @@ printf "%s\n" "$enable_safety" >&6; } +@@ -9765,15 +10000,18 @@ if test "$enable_safety" = "yes" then @@ -959,7 +971,7 @@ index d0ae103..cc5d6a0 100755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -9807,15 +10050,18 @@ printf "%s\n" "$as_me: WARNING: -fstack-protector-strong not supported" >&2;} ;; +@@ -9807,15 +10045,18 @@ esac fi @@ -981,7 +993,7 @@ index d0ae103..cc5d6a0 100755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -9849,15 +10095,18 @@ printf "%s\n" "$as_me: WARNING: -Wtrampolines not supported" >&2;} ;; +@@ -9849,15 +10090,18 @@ esac fi @@ -1003,7 +1015,7 @@ index d0ae103..cc5d6a0 100755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -9891,15 +10140,18 @@ printf "%s\n" "$as_me: WARNING: -Wimplicit-fallthrough not supported" >&2;} ;; +@@ -9891,15 +10135,18 @@ esac fi @@ -1025,7 +1037,7 @@ index d0ae103..cc5d6a0 100755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -9933,15 +10185,18 @@ printf "%s\n" "$as_me: WARNING: -Werror=format-security not supported" >&2;} ;; +@@ -9933,15 +10180,18 @@ esac fi @@ -1047,7 +1059,7 @@ index d0ae103..cc5d6a0 100755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -9975,15 +10230,18 @@ printf "%s\n" "$as_me: WARNING: -Wbidi-chars=any not supported" >&2;} ;; +@@ -9975,15 +10225,18 @@ esac fi @@ -1069,7 +1081,7 @@ index d0ae103..cc5d6a0 100755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -10041,15 +10299,18 @@ printf "%s\n" "$enable_slower_safety" >&6; } +@@ -10041,15 +10294,18 @@ if test "$enable_slower_safety" = "yes" then @@ -1091,7 +1103,7 @@ index d0ae103..cc5d6a0 100755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -10650,15 +10911,18 @@ printf "%s\n" "$CC" >&6; } +@@ -10650,15 +10906,18 @@ # Error on unguarded use of new symbols, which will fail at runtime for # users on older versions of macOS @@ -1113,7 +1125,7 @@ index d0ae103..cc5d6a0 100755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -13341,15 +13605,18 @@ then : +@@ -13341,15 +13600,18 @@ withval=$with_memory_sanitizer; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5 printf "%s\n" "$withval" >&6; } @@ -1135,7 +1147,7 @@ index d0ae103..cc5d6a0 100755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -13544,7 +13811,7 @@ then +@@ -13544,7 +13806,7 @@ BLDSHARED="$LDSHARED" fi ;; @@ -1144,7 +1156,7 @@ index d0ae103..cc5d6a0 100755 LDSHARED='$(CC) -dynamiclib -F . -framework $(PYTHONFRAMEWORK)' LDCXXSHARED='$(CXX) -dynamiclib -F . -framework $(PYTHONFRAMEWORK)' BLDSHARED="$LDSHARED" -@@ -13677,7 +13944,7 @@ then +@@ -13677,7 +13939,7 @@ Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";; Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";; # -u libsys_s pulls in all symbols in libsys @@ -1153,7 +1165,7 @@ index d0ae103..cc5d6a0 100755 LINKFORSHARED="$extra_undefs -framework CoreFoundation" # Issue #18075: the default maximum stack size (8MBytes) is too -@@ -13701,7 +13968,7 @@ printf "%s\n" "#define THREAD_STACK_SIZE 0x$stack_size" >>confdefs.h +@@ -13701,7 +13963,7 @@ LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' fi LINKFORSHARED="$LINKFORSHARED" @@ -1162,7 +1174,7 @@ index d0ae103..cc5d6a0 100755 LINKFORSHARED="-Wl,-stack_size,$stack_size $LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK)' fi ;; -@@ -15286,7 +15553,7 @@ then : +@@ -15286,7 +15548,7 @@ ctypes_malloc_closure=yes ;; #( @@ -1171,24 +1183,23 @@ index d0ae103..cc5d6a0 100755 ctypes_malloc_closure=yes ;; #( -@@ -19038,12 +19305,6 @@ if test "x$ac_cv_func_dup3" = xyes - then : +@@ -19039,12 +19301,6 @@ printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h --fi + fi -ac_fn_c_check_func "$LINENO" "execv" "ac_cv_func_execv" -if test "x$ac_cv_func_execv" = xyes -then : - printf "%s\n" "#define HAVE_EXECV 1" >>confdefs.h - - fi +-fi ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero" if test "x$ac_cv_func_explicit_bzero" = xyes -@@ -19104,18 +19365,6 @@ if test "x$ac_cv_func_fexecve" = xyes then : +@@ -19105,18 +19361,6 @@ printf "%s\n" "#define HAVE_FEXECVE 1" >>confdefs.h --fi + fi -ac_fn_c_check_func "$LINENO" "fork" "ac_cv_func_fork" -if test "x$ac_cv_func_fork" = xyes -then : @@ -1200,14 +1211,14 @@ index d0ae103..cc5d6a0 100755 -then : - printf "%s\n" "#define HAVE_FORK1 1" >>confdefs.h - - fi +-fi ac_fn_c_check_func "$LINENO" "fpathconf" "ac_cv_func_fpathconf" if test "x$ac_cv_func_fpathconf" = xyes -@@ -19542,24 +19791,6 @@ if test "x$ac_cv_func_posix_openpt" = xyes then : +@@ -19543,24 +19787,6 @@ printf "%s\n" "#define HAVE_POSIX_OPENPT 1" >>confdefs.h --fi + fi -ac_fn_c_check_func "$LINENO" "posix_spawn" "ac_cv_func_posix_spawn" -if test "x$ac_cv_func_posix_spawn" = xyes -then : @@ -1225,23 +1236,24 @@ index d0ae103..cc5d6a0 100755 -then : - printf "%s\n" "#define HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSEFROM_NP 1" >>confdefs.h - - fi +-fi ac_fn_c_check_func "$LINENO" "pread" "ac_cv_func_pread" if test "x$ac_cv_func_pread" = xyes -@@ -19866,12 +20097,6 @@ if test "x$ac_cv_func_sigaction" = xyes then : +@@ -19867,12 +20093,6 @@ printf "%s\n" "#define HAVE_SIGACTION 1" >>confdefs.h --fi + fi -ac_fn_c_check_func "$LINENO" "sigaltstack" "ac_cv_func_sigaltstack" -if test "x$ac_cv_func_sigaltstack" = xyes -then : - printf "%s\n" "#define HAVE_SIGALTSTACK 1" >>confdefs.h - - fi +-fi ac_fn_c_check_func "$LINENO" "sigfillset" "ac_cv_func_sigfillset" if test "x$ac_cv_func_sigfillset" = xyes -@@ -20140,11 +20365,11 @@ fi + then : +@@ -20140,11 +20360,11 @@ fi @@ -1255,7 +1267,7 @@ index d0ae103..cc5d6a0 100755 ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy" if test "x$ac_cv_func_getentropy" = xyes then : -@@ -20166,6 +20391,53 @@ fi +@@ -20166,6 +20386,53 @@ fi @@ -1309,17 +1321,18 @@ index d0ae103..cc5d6a0 100755 { 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} -@@ -23248,7 +23520,8 @@ fi +@@ -23248,8 +23515,9 @@ # check for openpty, login_tty, and forkpty -- +# tvOS/watchOS have functions for tty, but can't use them +if test "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "watchOS" -a "$ac_sys_system" != "xrOS"; then +- for ac_func in openpty do : -@@ -23362,7 +23635,7 @@ esac + ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty" +@@ -23362,7 +23630,7 @@ fi done @@ -1328,7 +1341,7 @@ index d0ae103..cc5d6a0 100755 printf %s "checking for library containing login_tty... " >&6; } if test ${ac_cv_search_login_tty+y} then : -@@ -23545,6 +23818,7 @@ esac +@@ -23545,6 +23813,7 @@ fi done @@ -1336,7 +1349,7 @@ index d0ae103..cc5d6a0 100755 # check for long file support functions ac_fn_c_check_func "$LINENO" "fseek64" "ac_cv_func_fseek64" -@@ -23810,10 +24084,10 @@ fi +@@ -23810,10 +24079,10 @@ done @@ -1349,7 +1362,7 @@ index d0ae103..cc5d6a0 100755 then for ac_func in clock_settime -@@ -25236,10 +25510,10 @@ if ac_fn_c_try_link "$LINENO" +@@ -25236,10 +25505,10 @@ then : @@ -1362,7 +1375,7 @@ index d0ae103..cc5d6a0 100755 if test "$ax_cv_c_float_words_bigendian" = unknown; then ax_cv_c_float_words_bigendian=no else -@@ -26152,8 +26426,8 @@ if test "$PY_ENABLE_SHARED" = "1" && ( test -n "$ANDROID_API_LEVEL" || test "$MA +@@ -26152,8 +26421,8 @@ LIBPYTHON="\$(BLDLIBRARY)" fi @@ -1373,7 +1386,7 @@ index d0ae103..cc5d6a0 100755 MODULE_DEPS_SHARED="$MODULE_DEPS_SHARED \$(PYTHONFRAMEWORKDIR)/\$(PYTHONFRAMEWORK)" fi -@@ -29023,7 +29297,7 @@ LIBS=$save_LIBS +@@ -29023,7 +29292,7 @@ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for device files" >&5 printf "%s\n" "$as_me: checking for device files" >&6;} @@ -1382,7 +1395,7 @@ index d0ae103..cc5d6a0 100755 ac_cv_file__dev_ptmx=no ac_cv_file__dev_ptc=no else -@@ -29504,7 +29778,7 @@ else case e in #( +@@ -29504,7 +29773,7 @@ with_ensurepip=no ;; #( WASI) : with_ensurepip=no ;; #( @@ -1391,7 +1404,7 @@ index d0ae103..cc5d6a0 100755 with_ensurepip=no ;; #( *) : with_ensurepip=upgrade -@@ -30484,7 +30758,7 @@ case $ac_sys_system in #( +@@ -30484,7 +30753,7 @@ ;; #( Darwin) : ;; #( @@ -1400,7 +1413,7 @@ index d0ae103..cc5d6a0 100755 -@@ -32082,15 +32356,18 @@ esac +@@ -32082,15 +32351,18 @@ # Android. # The *mmintrin.h headers are x86-family-specific, so can't be used on WASI. if test "$ac_sys_system" != "Linux-android" -a "$ac_sys_system" != "WASI" || test "$ANDROID_API_LEVEL" -ge 28; then @@ -1422,7 +1435,7 @@ index d0ae103..cc5d6a0 100755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -32157,15 +32434,18 @@ fi +@@ -32157,15 +32429,18 @@ # (https://developer.android.com/ndk/guides/abis#86-64), this is safe because we do a # runtime CPUID check. if test "$ac_sys_system" != "Linux-android" -a "$ac_sys_system" != "WASI" || test "$ANDROID_API_LEVEL" -ge 28; then @@ -1444,7 +1457,7 @@ index d0ae103..cc5d6a0 100755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -34487,6 +34767,8 @@ do +@@ -34487,6 +34762,8 @@ "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;; "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;; "iOS/Resources/Info.plist") CONFIG_FILES="$CONFIG_FILES iOS/Resources/Info.plist" ;; @@ -1453,11 +1466,10 @@ index d0ae103..cc5d6a0 100755 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;; "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;; "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;; -diff --git a/configure.ac b/configure.ac -index 8bb0f1c..812f548 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -330,6 +330,15 @@ then +diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac +--- Python-3.14.0a6-orig/configure.ac 2025-03-14 10:05:02 ++++ Python-3.14.0a6/configure.ac 2025-04-12 20:44:21 +@@ -330,6 +330,15 @@ *-apple-ios*) ac_sys_system=iOS ;; @@ -1473,7 +1485,7 @@ index 8bb0f1c..812f548 100644 *-*-darwin*) ac_sys_system=Darwin ;; -@@ -405,7 +414,7 @@ AC_SUBST([host_exec_prefix]) +@@ -405,7 +414,7 @@ # On cross-compile builds, configure will look for a host-specific compiler by # prepending the user-provided host triple to the required binary name. # @@ -1482,7 +1494,7 @@ index 8bb0f1c..812f548 100644 # which isn't a binary that exists, and isn't very convenient, as it contains the # iOS version. As the default cross-compiler name won't exist, configure falls # back to gcc, which *definitely* won't work. We're providing wrapper scripts for -@@ -420,6 +429,18 @@ if test -z "$AR"; then +@@ -420,6 +429,18 @@ aarch64-apple-ios*-simulator) AR=arm64-apple-ios-simulator-ar ;; aarch64-apple-ios*) AR=arm64-apple-ios-ar ;; x86_64-apple-ios*-simulator) AR=x86_64-apple-ios-simulator-ar ;; @@ -1501,7 +1513,7 @@ index 8bb0f1c..812f548 100644 *) esac fi -@@ -428,6 +449,18 @@ if test -z "$CC"; then +@@ -428,6 +449,18 @@ aarch64-apple-ios*-simulator) CC=arm64-apple-ios-simulator-clang ;; aarch64-apple-ios*) CC=arm64-apple-ios-clang ;; x86_64-apple-ios*-simulator) CC=x86_64-apple-ios-simulator-clang ;; @@ -1520,7 +1532,7 @@ index 8bb0f1c..812f548 100644 *) esac fi -@@ -436,6 +469,18 @@ if test -z "$CPP"; then +@@ -436,6 +469,18 @@ aarch64-apple-ios*-simulator) CPP=arm64-apple-ios-simulator-cpp ;; aarch64-apple-ios*) CPP=arm64-apple-ios-cpp ;; x86_64-apple-ios*-simulator) CPP=x86_64-apple-ios-simulator-cpp ;; @@ -1539,7 +1551,7 @@ index 8bb0f1c..812f548 100644 *) esac fi -@@ -444,6 +489,18 @@ if test -z "$CXX"; then +@@ -444,6 +489,18 @@ aarch64-apple-ios*-simulator) CXX=arm64-apple-ios-simulator-clang++ ;; aarch64-apple-ios*) CXX=arm64-apple-ios-clang++ ;; x86_64-apple-ios*-simulator) CXX=x86_64-apple-ios-simulator-clang++ ;; @@ -1558,7 +1570,7 @@ index 8bb0f1c..812f548 100644 *) esac fi -@@ -558,8 +615,11 @@ AC_ARG_ENABLE([framework], +@@ -558,8 +615,11 @@ case $enableval in yes) case $ac_sys_system in @@ -1572,7 +1584,7 @@ index 8bb0f1c..812f548 100644 *) AC_MSG_ERROR([Unknown platform for framework build]) esac esac -@@ -568,6 +628,9 @@ AC_ARG_ENABLE([framework], +@@ -568,6 +628,9 @@ no) case $ac_sys_system in iOS) AC_MSG_ERROR([iOS builds must use --enable-framework]) ;; @@ -1582,7 +1594,7 @@ index 8bb0f1c..812f548 100644 *) PYTHONFRAMEWORK= PYTHONFRAMEWORKDIR=no-framework -@@ -670,6 +733,48 @@ AC_ARG_ENABLE([framework], +@@ -670,6 +733,48 @@ AC_CONFIG_FILES([iOS/Resources/Info.plist]) ;; @@ -1631,7 +1643,7 @@ index 8bb0f1c..812f548 100644 *) AC_MSG_ERROR([Unknown platform for framework build]) ;; -@@ -678,6 +783,9 @@ AC_ARG_ENABLE([framework], +@@ -678,6 +783,9 @@ ],[ case $ac_sys_system in iOS) AC_MSG_ERROR([iOS builds must use --enable-framework]) ;; @@ -1641,7 +1653,7 @@ index 8bb0f1c..812f548 100644 *) PYTHONFRAMEWORK= PYTHONFRAMEWORKDIR=no-framework -@@ -730,8 +838,8 @@ AC_ARG_WITH( +@@ -730,8 +838,8 @@ case "$withval" in yes) case $ac_sys_system in @@ -1652,7 +1664,7 @@ index 8bb0f1c..812f548 100644 APP_STORE_COMPLIANCE_PATCH="Mac/Resources/app-store-compliance.patch" ;; *) AC_MSG_ERROR([no default app store compliance patch available for $ac_sys_system]) ;; -@@ -745,8 +853,8 @@ AC_ARG_WITH( +@@ -745,8 +853,8 @@ esac ],[ case $ac_sys_system in @@ -1663,7 +1675,7 @@ index 8bb0f1c..812f548 100644 APP_STORE_COMPLIANCE_PATCH="Mac/Resources/app-store-compliance.patch" AC_MSG_RESULT([applying default app store compliance patch]) ;; -@@ -794,6 +902,66 @@ if test "$cross_compiling" = yes; then +@@ -794,6 +902,66 @@ ;; esac ;; @@ -1730,7 +1742,7 @@ index 8bb0f1c..812f548 100644 *-*-darwin*) case "$host_cpu" in arm*) -@@ -883,9 +1051,15 @@ case $ac_sys_system/$ac_sys_release in +@@ -883,9 +1051,15 @@ define_xopen_source=no;; Darwin/@<:@[12]@:>@@<:@0-9@:>@.*) define_xopen_source=no;; @@ -1747,7 +1759,7 @@ index 8bb0f1c..812f548 100644 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from # defining NI_NUMERICHOST. QNX/6.3.2) -@@ -944,8 +1118,12 @@ AC_SUBST([EXPORT_MACOSX_DEPLOYMENT_TARGET]) +@@ -944,8 +1118,12 @@ CONFIGURE_MACOSX_DEPLOYMENT_TARGET= EXPORT_MACOSX_DEPLOYMENT_TARGET='#' @@ -1761,12 +1773,13 @@ index 8bb0f1c..812f548 100644 # checks for alternative programs -@@ -979,11 +1157,20 @@ AS_CASE([$host], +@@ -979,11 +1157,18 @@ ], ) -dnl Add the compiler flag for the iOS minimum supported OS version. -+dnl Add the compiler flag for the iOS/tvOS/watchOS/xrOS minimum supported OS version. ++dnl Add the compiler flag for the iOS/tvOS/watchOS/xrOS minimum supported OS version, ++dnl albeit I don't know the flag for the version in xrOS. AS_CASE([$ac_sys_system], [iOS], [ AS_VAR_APPEND([CFLAGS], [" -mios-version-min=${IPHONEOS_DEPLOYMENT_TARGET}"]) @@ -1777,13 +1790,10 @@ index 8bb0f1c..812f548 100644 + ],[watchOS], [ + AS_VAR_APPEND([CFLAGS], [" -mwatchos-version-min=${WATCHOS_DEPLOYMENT_TARGET}"]) + AS_VAR_APPEND([LDFLAGS], [" -mwatchos-version-min=${WATCHOS_DEPLOYMENT_TARGET}"]) -+ ],[xrOS], [ -+ AS_VAR_APPEND([CFLAGS], [" -mxros-version-min=${XROS_DEPLOYMENT_TARGET}"]) -+ AS_VAR_APPEND([LDFLAGS], [" -mxros-version-min=${XROS_DEPLOYMENT_TARGET}"]) ], ) -@@ -1172,6 +1359,9 @@ AC_MSG_CHECKING([for multiarch]) +@@ -1172,6 +1357,9 @@ AS_CASE([$ac_sys_system], [Darwin*], [MULTIARCH=""], [iOS], [MULTIARCH=""], @@ -1793,7 +1803,7 @@ index 8bb0f1c..812f548 100644 [FreeBSD*], [MULTIARCH=""], [MULTIARCH=$($CC --print-multiarch 2>/dev/null)] ) -@@ -1193,7 +1383,7 @@ dnl will have multiple sysconfig modules (one for each CPU architecture), but +@@ -1193,7 +1381,7 @@ dnl use a single "fat" binary at runtime. SOABI_PLATFORM is the component of dnl the PLATFORM_TRIPLET that will be used in binary module extensions. AS_CASE([$ac_sys_system], @@ -1802,7 +1812,7 @@ index 8bb0f1c..812f548 100644 [SOABI_PLATFORM=$PLATFORM_TRIPLET] ) -@@ -1227,6 +1417,12 @@ AS_CASE([$host/$ac_cv_cc_name], +@@ -1227,6 +1415,12 @@ [x86_64-*-freebsd*/clang], [PY_SUPPORT_TIER=3], dnl FreeBSD on AMD64 [aarch64-apple-ios*-simulator/clang], [PY_SUPPORT_TIER=3], dnl iOS Simulator on arm64 [aarch64-apple-ios*/clang], [PY_SUPPORT_TIER=3], dnl iOS on ARM64 @@ -1815,7 +1825,7 @@ index 8bb0f1c..812f548 100644 [aarch64-*-linux-android/clang], [PY_SUPPORT_TIER=3], dnl Android on ARM64 [x86_64-*-linux-android/clang], [PY_SUPPORT_TIER=3], dnl Android on AMD64 -@@ -1536,7 +1732,7 @@ then +@@ -1536,7 +1730,7 @@ case $ac_sys_system in Darwin) LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)';; @@ -1824,7 +1834,7 @@ index 8bb0f1c..812f548 100644 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK)';; *) AC_MSG_ERROR([Unknown platform for framework build]);; -@@ -1601,7 +1797,7 @@ if test $enable_shared = "yes"; then +@@ -1601,7 +1795,7 @@ BLDLIBRARY='-L. -lpython$(LDVERSION)' RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}} ;; @@ -1833,7 +1843,7 @@ index 8bb0f1c..812f548 100644 LDLIBRARY='libpython$(LDVERSION).dylib' ;; AIX*) -@@ -3456,7 +3652,7 @@ then +@@ -3456,7 +3650,7 @@ BLDSHARED="$LDSHARED" fi ;; @@ -1842,7 +1852,7 @@ index 8bb0f1c..812f548 100644 LDSHARED='$(CC) -dynamiclib -F . -framework $(PYTHONFRAMEWORK)' LDCXXSHARED='$(CXX) -dynamiclib -F . -framework $(PYTHONFRAMEWORK)' BLDSHARED="$LDSHARED" -@@ -3580,7 +3776,7 @@ then +@@ -3580,7 +3774,7 @@ Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";; Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";; # -u libsys_s pulls in all symbols in libsys @@ -1851,7 +1861,7 @@ index 8bb0f1c..812f548 100644 LINKFORSHARED="$extra_undefs -framework CoreFoundation" # Issue #18075: the default maximum stack size (8MBytes) is too -@@ -3604,7 +3800,7 @@ then +@@ -3604,7 +3798,7 @@ LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' fi LINKFORSHARED="$LINKFORSHARED" @@ -1860,7 +1870,7 @@ index 8bb0f1c..812f548 100644 LINKFORSHARED="-Wl,-stack_size,$stack_size $LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK)' fi ;; -@@ -4024,7 +4220,7 @@ AS_VAR_IF([have_libffi], [yes], [ +@@ -4024,7 +4218,7 @@ dnl when do we need USING_APPLE_OS_LIBFFI? ctypes_malloc_closure=yes ], @@ -1869,7 +1879,7 @@ index 8bb0f1c..812f548 100644 ctypes_malloc_closure=yes ], [sunos5], [AS_VAR_APPEND([LIBFFI_LIBS], [" -mimpure-text"])] -@@ -5133,9 +5329,9 @@ fi +@@ -5133,9 +5327,9 @@ # checks for library functions AC_CHECK_FUNCS([ \ accept4 alarm bind_textdomain_codeset chmod chown clock closefrom close_range confstr \ @@ -1881,7 +1891,7 @@ index 8bb0f1c..812f548 100644 gai_strerror getegid geteuid getgid getgrent getgrgid getgrgid_r \ getgrnam_r getgrouplist gethostname getitimer getloadavg getlogin \ getpeername getpgid getpid getppid getpriority _getpty \ -@@ -5143,8 +5339,7 @@ AC_CHECK_FUNCS([ \ +@@ -5143,8 +5337,7 @@ getspnam getuid getwd grantpt 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 \ @@ -1891,7 +1901,7 @@ index 8bb0f1c..812f548 100644 pread preadv preadv2 process_vm_readv \ pthread_cond_timedwait_relative_np pthread_condattr_setclock pthread_init \ pthread_kill pthread_getname_np pthread_setname_np pthread_getattr_np \ -@@ -5153,7 +5348,7 @@ AC_CHECK_FUNCS([ \ +@@ -5153,7 +5346,7 @@ sched_setparam sched_setscheduler sem_clockwait sem_getvalue sem_open \ sem_timedwait sem_unlink sendfile setegid seteuid setgid sethostname \ setitimer setlocale setpgid setpgrp setpriority setregid setresgid \ @@ -1900,7 +1910,7 @@ index 8bb0f1c..812f548 100644 sigfillset siginterrupt sigpending sigrelse sigtimedwait sigwait \ sigwaitinfo snprintf splice strftime strlcpy strsignal symlinkat sync \ sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile \ -@@ -5168,12 +5363,20 @@ if test "$MACHDEP" != linux; then +@@ -5168,14 +5361,22 @@ AC_CHECK_FUNCS([lchmod]) fi @@ -1913,35 +1923,23 @@ index 8bb0f1c..812f548 100644 - AC_CHECK_FUNCS([getentropy getgroups system]) +if test "$ac_sys_system" != "iOS" -a "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "watchOS" -a "$ac_sys_system" != "xrOS" ; then + AC_CHECK_FUNCS([ getentropy getgroups system ]) -+fi -+ + fi + +# tvOS/watchOS.xrOS have some additional methods that can be found, but not used. +if test "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "watchOS" -a "$ac_sys_system" != "xrOS"; then + AC_CHECK_FUNCS([ \ + execv fork fork1 posix_spawn posix_spawnp posix_spawn_file_actions_addclosefrom_np \ + sigaltstack \ + ]) - fi - ++fi ++ AC_CHECK_DECL([dirfd], -@@ -5427,20 +5630,22 @@ PY_CHECK_FUNC([setgroups], [ + [AC_DEFINE([HAVE_DIRFD], [1], + [Define if you have the 'dirfd' function or macro.])], +@@ -5427,21 +5628,23 @@ ]) # check for openpty, login_tty, and forkpty -- --AC_CHECK_FUNCS([openpty], [], -- [AC_CHECK_LIB([util], [openpty], -- [AC_DEFINE([HAVE_OPENPTY]) LIBS="$LIBS -lutil"], -- [AC_CHECK_LIB([bsd], [openpty], -- [AC_DEFINE([HAVE_OPENPTY]) LIBS="$LIBS -lbsd"])])]) --AC_SEARCH_LIBS([login_tty], [util], -- [AC_DEFINE([HAVE_LOGIN_TTY], [1], [Define to 1 if you have the `login_tty' function.])] --) --AC_CHECK_FUNCS([forkpty], [], -- [AC_CHECK_LIB([util], [forkpty], -- [AC_DEFINE([HAVE_FORKPTY]) LIBS="$LIBS -lutil"], -- [AC_CHECK_LIB([bsd], [forkpty], -- [AC_DEFINE([HAVE_FORKPTY]) LIBS="$LIBS -lbsd"])])]) +# tvOS/watchOS have functions for tty, but can't use them +if test "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "watchOS" -a "$ac_sys_system" != "xrOS"; then + AC_CHECK_FUNCS([openpty], [], @@ -1959,9 +1957,24 @@ index 8bb0f1c..812f548 100644 + [AC_DEFINE([HAVE_FORKPTY]) LIBS="$LIBS -lbsd"])])]) +fi +-AC_CHECK_FUNCS([openpty], [], +- [AC_CHECK_LIB([util], [openpty], +- [AC_DEFINE([HAVE_OPENPTY]) LIBS="$LIBS -lutil"], +- [AC_CHECK_LIB([bsd], [openpty], +- [AC_DEFINE([HAVE_OPENPTY]) LIBS="$LIBS -lbsd"])])]) +-AC_SEARCH_LIBS([login_tty], [util], +- [AC_DEFINE([HAVE_LOGIN_TTY], [1], [Define to 1 if you have the `login_tty' function.])] +-) +-AC_CHECK_FUNCS([forkpty], [], +- [AC_CHECK_LIB([util], [forkpty], +- [AC_DEFINE([HAVE_FORKPTY]) LIBS="$LIBS -lutil"], +- [AC_CHECK_LIB([bsd], [forkpty], +- [AC_DEFINE([HAVE_FORKPTY]) LIBS="$LIBS -lbsd"])])]) +- # check for long file support functions AC_CHECK_FUNCS([fseek64 fseeko fstatvfs ftell64 ftello statvfs]) -@@ -5479,10 +5684,10 @@ AC_CHECK_FUNCS([clock_getres], [], [ + +@@ -5479,10 +5682,10 @@ ]) ]) @@ -1974,7 +1987,7 @@ index 8bb0f1c..812f548 100644 then AC_CHECK_FUNCS([clock_settime], [], [ AC_CHECK_LIB([rt], [clock_settime], [ -@@ -6233,8 +6438,8 @@ if test "$PY_ENABLE_SHARED" = "1" && ( test -n "$ANDROID_API_LEVEL" || test "$MA +@@ -6233,8 +6436,8 @@ LIBPYTHON="\$(BLDLIBRARY)" fi @@ -1985,7 +1998,7 @@ index 8bb0f1c..812f548 100644 MODULE_DEPS_SHARED="$MODULE_DEPS_SHARED \$(PYTHONFRAMEWORKDIR)/\$(PYTHONFRAMEWORK)" fi -@@ -6893,7 +7098,7 @@ AC_MSG_NOTICE([checking for device files]) +@@ -6893,7 +7096,7 @@ dnl NOTE: Inform user how to proceed with files when cross compiling. dnl Some cross-compile builds are predictable; they won't ever dnl have /dev/ptmx or /dev/ptc, so we can set them explicitly. @@ -1994,7 +2007,7 @@ index 8bb0f1c..812f548 100644 ac_cv_file__dev_ptmx=no ac_cv_file__dev_ptc=no else -@@ -7174,7 +7379,7 @@ AC_ARG_WITH([ensurepip], +@@ -7174,7 +7377,7 @@ AS_CASE([$ac_sys_system], [Emscripten], [with_ensurepip=no], [WASI], [with_ensurepip=no], @@ -2003,7 +2016,7 @@ index 8bb0f1c..812f548 100644 [with_ensurepip=upgrade] ) ]) -@@ -7585,7 +7790,7 @@ AS_CASE([$ac_sys_system], +@@ -7585,7 +7788,7 @@ [VxWorks*], [PY_STDLIB_MOD_SET_NA([_scproxy], [termios], [grp])], dnl The _scproxy module is available on macOS [Darwin], [], @@ -2012,10 +2025,9 @@ index 8bb0f1c..812f548 100644 dnl subprocess and multiprocessing are not supported (no fork syscall). dnl curses and tkinter user interface are not available. dnl gdbm and nis aren't available -diff --git a/iOS/Resources/Info.plist.in b/iOS/Resources/Info.plist.in -index c3e261e..26ef7a9 100644 ---- a/iOS/Resources/Info.plist.in -+++ b/iOS/Resources/Info.plist.in +diff -ur Python-3.14.0a6-orig/iOS/Resources/Info.plist.in Python-3.14.0a6/iOS/Resources/Info.plist.in +--- Python-3.14.0a6-orig/iOS/Resources/Info.plist.in 2025-03-14 10:05:02 ++++ Python-3.14.0a6/iOS/Resources/Info.plist.in 2025-04-12 20:43:35 @@ -17,13 +17,13 @@ CFBundlePackageType FMWK @@ -2810,25 +2822,4 @@ index 0000000..f842b98 + +#ifdef __x86_64__ +#include "pyconfig-x86_64.h" -+#endif - ---- a/config.sub 2025-04-12 20:06:19 -+++ b/config.sub 2025-04-12 20:06:52 -@@ -1743,7 +1743,7 @@ - | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ - | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \ - | hiux* | abug | nacl* | netware* | windows* \ -- | os9* | macos* | osx* | ios* | tvos* | watchos* \ -+ | os9* | macos* | osx* | ios* | tvos* | watchos* | xros* \ - | mpw* | magic* | mmixware* | mon960* | lnews* \ - | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ - | aos* | aros* | cloudabi* | sortix* | twizzler* \ -@@ -1867,7 +1867,7 @@ - ;; - *-eabi*- | *-gnueabi*-) - ;; -- ios*-simulator- | tvos*-simulator- | watchos*-simulator- ) -+ ios*-simulator- | tvos*-simulator- | watchos*-simulator- | xros*-simulator- ) - ;; - none--*) - # None (no kernel, i.e. freestanding / bare metal), ++#endif \ No newline at end of file From 23671ec7d10b581525227b34e5aca085441928c9 Mon Sep 17 00:00:00 2001 From: John Zhou Date: Sat, 12 Apr 2025 21:06:16 -0500 Subject: [PATCH 03/22] can't believe i forgot to change stuff --- patch/Python/Python.patch | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/patch/Python/Python.patch b/patch/Python/Python.patch index fcad96ff..fb35355b 100644 --- a/patch/Python/Python.patch +++ b/patch/Python/Python.patch @@ -204,7 +204,7 @@ diff -ur Python-3.14.0a6-orig/Misc/platform_triplet.c Python-3.14.0a6/Misc/platf PLATFORM_TRIPLET=darwin diff -ur Python-3.14.0a6-orig/aclocal.m4 Python-3.14.0a6/aclocal.m4 --- Python-3.14.0a6-orig/aclocal.m4 2025-03-14 10:05:02 -+++ Python-3.14.0a6/aclocal.m4 2025-04-12 20:44:30 ++++ Python-3.14.0a6/aclocal.m4 2025-04-12 21:03:14 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.16.5 -*- Autoconf -*- +# generated automatically by aclocal 1.17 -*- Autoconf -*- @@ -429,7 +429,7 @@ diff -ur Python-3.14.0a6-orig/config.sub Python-3.14.0a6/config.sub # None (no kernel, i.e. freestanding / bare metal), diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure --- Python-3.14.0a6-orig/configure 2025-03-14 10:05:02 -+++ Python-3.14.0a6/configure 2025-04-12 20:44:31 ++++ Python-3.14.0a6/configure 2025-04-12 21:03:15 @@ -974,6 +974,9 @@ CFLAGS CC @@ -526,9 +526,9 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure + aarch64-apple-watchos*) CPP=arm64_32-apple-watchos-cpp ;; + x86_64-apple-watchos*-simulator) CPP=x86_64-apple-watchos-simulator-cpp ;; + -+ aarch64-apple-xros*-simulator) AR=arm64-apple-xros-simulator-cpp ;; -+ aarch64-apple-xros*) AR=arm64_32-apple-xros-cpp ;; -+ x86_64-apple-xros*-simulator) AR=x86_64-apple-xros-simulator-cpp ;; ++ aarch64-apple-xros*-simulator) CPP=arm64-apple-xros-simulator-cpp ;; ++ aarch64-apple-xros*) CPP=arm64_32-apple-xros-cpp ;; ++ x86_64-apple-xros*-simulator) CPP=x86_64-apple-xros-simulator-cpp ;; *) esac fi @@ -1468,7 +1468,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;; diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac --- Python-3.14.0a6-orig/configure.ac 2025-03-14 10:05:02 -+++ Python-3.14.0a6/configure.ac 2025-04-12 20:44:21 ++++ Python-3.14.0a6/configure.ac 2025-04-12 21:02:34 @@ -330,6 +330,15 @@ *-apple-ios*) ac_sys_system=iOS @@ -1545,9 +1545,9 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac + aarch64-apple-watchos*) CPP=arm64_32-apple-watchos-cpp ;; + x86_64-apple-watchos*-simulator) CPP=x86_64-apple-watchos-simulator-cpp ;; + -+ aarch64-apple-xros*-simulator) AR=arm64-apple-xros-simulator-cpp ;; -+ aarch64-apple-xros*) AR=arm64_32-apple-xros-cpp ;; -+ x86_64-apple-xros*-simulator) AR=x86_64-apple-xros-simulator-cpp ;; ++ aarch64-apple-xros*-simulator) CPP=arm64-apple-xros-simulator-cpp ;; ++ aarch64-apple-xros*) CPP=arm64_32-apple-xros-cpp ;; ++ x86_64-apple-xros*-simulator) CPP=x86_64-apple-xros-simulator-cpp ;; *) esac fi From 4fa8a4cd688b6a82d8ed102e01196a0abc3654ac Mon Sep 17 00:00:00 2001 From: John Zhou Date: Sat, 12 Apr 2025 21:10:01 -0500 Subject: [PATCH 04/22] remove some stuff --- patch/Python/Python.patch | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/patch/Python/Python.patch b/patch/Python/Python.patch index fb35355b..663840a1 100644 --- a/patch/Python/Python.patch +++ b/patch/Python/Python.patch @@ -378,16 +378,6 @@ diff -ur Python-3.14.0a6-orig/aclocal.m4 Python-3.14.0a6/aclocal.m4 AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) -@@ -475,6 +489,9 @@ - AC_MSG_RESULT([no]) - PKG_CONFIG="" - fi -+fi -+if test -z "$PKG_CONFIG"; then -+ m4_default([$2], [AC_MSG_ERROR([pkg-config not found])]) - fi[]dnl - ])dnl PKG_PROG_PKG_CONFIG - @@ -744,7 +761,7 @@ # AM_CONDITIONAL -*- Autoconf -*- @@ -440,16 +430,6 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure IPHONEOS_DEPLOYMENT_TARGET EXPORT_MACOSX_DEPLOYMENT_TARGET CONFIGURE_MACOSX_DEPLOYMENT_TARGET -@@ -4061,6 +4064,9 @@ - PKG_CONFIG="" - fi - fi -+if test -z "$PKG_CONFIG"; then -+ as_fn_error $? "pkg-config not found" "$LINENO" 5 -+fi - ;; #( - no) : - @@ -4100,6 +4106,15 @@ *-apple-ios*) ac_sys_system=iOS From d3b9e920637cd8a37cdca7c8e3e2845a91e378bd Mon Sep 17 00:00:00 2001 From: John Zhou Date: Sat, 12 Apr 2025 21:25:59 -0500 Subject: [PATCH 05/22] update patch. again. --- patch/Python/Python.patch | 51 +++++++++++++++++++++++++++------------ 1 file changed, 36 insertions(+), 15 deletions(-) diff --git a/patch/Python/Python.patch b/patch/Python/Python.patch index 663840a1..7aa08ecd 100644 --- a/patch/Python/Python.patch +++ b/patch/Python/Python.patch @@ -204,7 +204,7 @@ diff -ur Python-3.14.0a6-orig/Misc/platform_triplet.c Python-3.14.0a6/Misc/platf PLATFORM_TRIPLET=darwin diff -ur Python-3.14.0a6-orig/aclocal.m4 Python-3.14.0a6/aclocal.m4 --- Python-3.14.0a6-orig/aclocal.m4 2025-03-14 10:05:02 -+++ Python-3.14.0a6/aclocal.m4 2025-04-12 21:03:14 ++++ Python-3.14.0a6/aclocal.m4 2025-04-12 21:11:05 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.16.5 -*- Autoconf -*- +# generated automatically by aclocal 1.17 -*- Autoconf -*- @@ -378,6 +378,16 @@ diff -ur Python-3.14.0a6-orig/aclocal.m4 Python-3.14.0a6/aclocal.m4 AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) +@@ -475,6 +489,9 @@ + AC_MSG_RESULT([no]) + PKG_CONFIG="" + fi ++fi ++if test -z "$PKG_CONFIG"; then ++ m4_default([$2], [AC_MSG_ERROR([pkg-config not found])]) + fi[]dnl + ])dnl PKG_PROG_PKG_CONFIG + @@ -744,7 +761,7 @@ # AM_CONDITIONAL -*- Autoconf -*- @@ -396,6 +406,7 @@ diff -ur Python-3.14.0a6-orig/aclocal.m4 Python-3.14.0a6/aclocal.m4 # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, +Only in Python-3.14.0a6: autom4te.cache diff -ur Python-3.14.0a6-orig/config.sub Python-3.14.0a6/config.sub --- Python-3.14.0a6-orig/config.sub 2025-03-14 10:05:02 +++ Python-3.14.0a6/config.sub 2025-04-12 20:43:35 @@ -419,7 +430,7 @@ diff -ur Python-3.14.0a6-orig/config.sub Python-3.14.0a6/config.sub # None (no kernel, i.e. freestanding / bare metal), diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure --- Python-3.14.0a6-orig/configure 2025-03-14 10:05:02 -+++ Python-3.14.0a6/configure 2025-04-12 21:03:15 ++++ Python-3.14.0a6/configure 2025-04-12 21:11:06 @@ -974,6 +974,9 @@ CFLAGS CC @@ -430,6 +441,16 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure IPHONEOS_DEPLOYMENT_TARGET EXPORT_MACOSX_DEPLOYMENT_TARGET CONFIGURE_MACOSX_DEPLOYMENT_TARGET +@@ -4061,6 +4064,9 @@ + PKG_CONFIG="" + fi + fi ++if test -z "$PKG_CONFIG"; then ++ as_fn_error $? "pkg-config not found" "$LINENO" 5 ++fi + ;; #( + no) : + @@ -4100,6 +4106,15 @@ *-apple-ios*) ac_sys_system=iOS @@ -487,9 +508,9 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure + aarch64-apple-watchos*) CC=arm64_32-apple-watchos-clang ;; + x86_64-apple-watchos*-simulator) CC=x86_64-apple-watchos-simulator-clang ;; + -+ aarch64-apple-xros*-simulator) AR=arm64-apple-xros-simulator-clang ;; -+ aarch64-apple-xros*) AR=arm64_32-apple-xros-clang ;; -+ x86_64-apple-xros*-simulator) AR=x86_64-apple-xros-simulator-clang ;; ++ aarch64-apple-xros*-simulator) CC=arm64-apple-xros-simulator-clang ;; ++ aarch64-apple-xros*) CC=arm64_32-apple-xros-clang ;; ++ x86_64-apple-xros*-simulator) CC=x86_64-apple-xros-simulator-clang ;; *) esac fi @@ -525,9 +546,9 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure + aarch64-apple-watchos*) CXX=arm64_32-apple-watchos-clang++ ;; + x86_64-apple-watchos*-simulator) CXX=x86_64-apple-watchos-simulator-clang++ ;; + -+ aarch64-apple-xros*-simulator) AR=arm64-apple-xros-simulator-clang++ ;; -+ aarch64-apple-xros*) AR=arm64_32-apple-xros-clang++ ;; -+ x86_64-apple-xros*-simulator) AR=x86_64-apple-xros-simulator-clang++ ;; ++ aarch64-apple-xros*-simulator) CXX=arm64-apple-xros-simulator-clang++ ;; ++ aarch64-apple-xros*) CXX=arm64_32-apple-xros-clang++ ;; ++ x86_64-apple-xros*-simulator) CXX=x86_64-apple-xros-simulator-clang++ ;; *) esac fi @@ -1448,7 +1469,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;; diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac --- Python-3.14.0a6-orig/configure.ac 2025-03-14 10:05:02 -+++ Python-3.14.0a6/configure.ac 2025-04-12 21:02:34 ++++ Python-3.14.0a6/configure.ac 2025-04-12 21:10:44 @@ -330,6 +330,15 @@ *-apple-ios*) ac_sys_system=iOS @@ -1506,9 +1527,9 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac + aarch64-apple-watchos*) CC=arm64_32-apple-watchos-clang ;; + x86_64-apple-watchos*-simulator) CC=x86_64-apple-watchos-simulator-clang ;; + -+ aarch64-apple-xros*-simulator) AR=arm64-apple-xros-simulator-clang ;; -+ aarch64-apple-xros*) AR=arm64_32-apple-xros-clang ;; -+ x86_64-apple-xros*-simulator) AR=x86_64-apple-xros-simulator-clang ;; ++ aarch64-apple-xros*-simulator) CC=arm64-apple-xros-simulator-clang ;; ++ aarch64-apple-xros*) CC=arm64_32-apple-xros-clang ;; ++ x86_64-apple-xros*-simulator) CC=x86_64-apple-xros-simulator-clang ;; *) esac fi @@ -1544,9 +1565,9 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac + aarch64-apple-watchos*) CXX=arm64_32-apple-watchos-clang++ ;; + x86_64-apple-watchos*-simulator) CXX=x86_64-apple-watchos-simulator-clang++ ;; + -+ aarch64-apple-xros*-simulator) AR=arm64-apple-xros-simulator-clang++ ;; -+ aarch64-apple-xros*) AR=arm64_32-apple-xros-clang++ ;; -+ x86_64-apple-xros*-simulator) AR=x86_64-apple-xros-simulator-clang++ ;; ++ aarch64-apple-xros*-simulator) CXX=arm64-apple-xros-simulator-clang++ ;; ++ aarch64-apple-xros*) CXX=arm64_32-apple-xros-clang++ ;; ++ x86_64-apple-xros*-simulator) CXX=x86_64-apple-xros-simulator-clang++ ;; *) esac fi From 1e1abfb9a35ed63a727e3d509e8e0fc33fa01765 Mon Sep 17 00:00:00 2001 From: John Zhou Date: Sat, 12 Apr 2025 21:10:01 -0500 Subject: [PATCH 06/22] remove some stuff --- patch/Python/Python.patch | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/patch/Python/Python.patch b/patch/Python/Python.patch index 7aa08ecd..1a6d902f 100644 --- a/patch/Python/Python.patch +++ b/patch/Python/Python.patch @@ -378,16 +378,6 @@ diff -ur Python-3.14.0a6-orig/aclocal.m4 Python-3.14.0a6/aclocal.m4 AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) -@@ -475,6 +489,9 @@ - AC_MSG_RESULT([no]) - PKG_CONFIG="" - fi -+fi -+if test -z "$PKG_CONFIG"; then -+ m4_default([$2], [AC_MSG_ERROR([pkg-config not found])]) - fi[]dnl - ])dnl PKG_PROG_PKG_CONFIG - @@ -744,7 +761,7 @@ # AM_CONDITIONAL -*- Autoconf -*- @@ -441,16 +431,6 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure IPHONEOS_DEPLOYMENT_TARGET EXPORT_MACOSX_DEPLOYMENT_TARGET CONFIGURE_MACOSX_DEPLOYMENT_TARGET -@@ -4061,6 +4064,9 @@ - PKG_CONFIG="" - fi - fi -+if test -z "$PKG_CONFIG"; then -+ as_fn_error $? "pkg-config not found" "$LINENO" 5 -+fi - ;; #( - no) : - @@ -4100,6 +4106,15 @@ *-apple-ios*) ac_sys_system=iOS From 955815a142c6eaa9b2b3cff0fb8de0862d2bf691 Mon Sep 17 00:00:00 2001 From: John Zhou Date: Sat, 12 Apr 2025 21:40:42 -0500 Subject: [PATCH 07/22] Stop torturing me, autoconf and friends i've made ENOUGH typoes tonight already --- patch/Python/Python.patch | 162 +++++++++++++++++--------------------- 1 file changed, 71 insertions(+), 91 deletions(-) diff --git a/patch/Python/Python.patch b/patch/Python/Python.patch index 1a6d902f..56978a7d 100644 --- a/patch/Python/Python.patch +++ b/patch/Python/Python.patch @@ -378,6 +378,16 @@ diff -ur Python-3.14.0a6-orig/aclocal.m4 Python-3.14.0a6/aclocal.m4 AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) +@@ -475,6 +489,9 @@ + AC_MSG_RESULT([no]) + PKG_CONFIG="" + fi ++fi ++if test -z "$PKG_CONFIG"; then ++ m4_default([$2], [AC_MSG_ERROR([pkg-config not found])]) + fi[]dnl + ])dnl PKG_PROG_PKG_CONFIG + @@ -744,7 +761,7 @@ # AM_CONDITIONAL -*- Autoconf -*- @@ -396,7 +406,6 @@ diff -ur Python-3.14.0a6-orig/aclocal.m4 Python-3.14.0a6/aclocal.m4 # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, -Only in Python-3.14.0a6: autom4te.cache diff -ur Python-3.14.0a6-orig/config.sub Python-3.14.0a6/config.sub --- Python-3.14.0a6-orig/config.sub 2025-03-14 10:05:02 +++ Python-3.14.0a6/config.sub 2025-04-12 20:43:35 @@ -431,6 +440,16 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure IPHONEOS_DEPLOYMENT_TARGET EXPORT_MACOSX_DEPLOYMENT_TARGET CONFIGURE_MACOSX_DEPLOYMENT_TARGET +@@ -4061,6 +4064,9 @@ + PKG_CONFIG="" + fi + fi ++if test -z "$PKG_CONFIG"; then ++ as_fn_error $? "pkg-config not found" "$LINENO" 5 ++fi + ;; #( + no) : + @@ -4100,6 +4106,15 @@ *-apple-ios*) ac_sys_system=iOS @@ -1449,7 +1468,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;; diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac --- Python-3.14.0a6-orig/configure.ac 2025-03-14 10:05:02 -+++ Python-3.14.0a6/configure.ac 2025-04-12 21:10:44 ++++ Python-3.14.0a6/configure.ac 2025-04-12 21:36:22 @@ -330,6 +330,15 @@ *-apple-ios*) ac_sys_system=iOS @@ -1475,7 +1494,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac # which isn't a binary that exists, and isn't very convenient, as it contains the # iOS version. As the default cross-compiler name won't exist, configure falls # back to gcc, which *definitely* won't work. We're providing wrapper scripts for -@@ -420,6 +429,18 @@ +@@ -420,6 +429,17 @@ aarch64-apple-ios*-simulator) AR=arm64-apple-ios-simulator-ar ;; aarch64-apple-ios*) AR=arm64-apple-ios-ar ;; x86_64-apple-ios*-simulator) AR=x86_64-apple-ios-simulator-ar ;; @@ -1489,12 +1508,11 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac + x86_64-apple-watchos*-simulator) AR=x86_64-apple-watchos-simulator-ar ;; + + aarch64-apple-xros*-simulator) AR=arm64-apple-xros-simulator-ar ;; -+ aarch64-apple-xros*) AR=arm64_32-apple-xros-ar ;; -+ x86_64-apple-xros*-simulator) AR=x86_64-apple-xros-simulator-ar ;; ++ aarch64-apple-xros*) AR=arm64-apple-xros-ar ;; *) esac fi -@@ -428,6 +449,18 @@ +@@ -428,6 +448,17 @@ aarch64-apple-ios*-simulator) CC=arm64-apple-ios-simulator-clang ;; aarch64-apple-ios*) CC=arm64-apple-ios-clang ;; x86_64-apple-ios*-simulator) CC=x86_64-apple-ios-simulator-clang ;; @@ -1508,12 +1526,11 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac + x86_64-apple-watchos*-simulator) CC=x86_64-apple-watchos-simulator-clang ;; + + aarch64-apple-xros*-simulator) CC=arm64-apple-xros-simulator-clang ;; -+ aarch64-apple-xros*) CC=arm64_32-apple-xros-clang ;; -+ x86_64-apple-xros*-simulator) CC=x86_64-apple-xros-simulator-clang ;; ++ aarch64-apple-xros*) CC=arm64-apple-xros-clang ;; *) esac fi -@@ -436,6 +469,18 @@ +@@ -436,6 +467,17 @@ aarch64-apple-ios*-simulator) CPP=arm64-apple-ios-simulator-cpp ;; aarch64-apple-ios*) CPP=arm64-apple-ios-cpp ;; x86_64-apple-ios*-simulator) CPP=x86_64-apple-ios-simulator-cpp ;; @@ -1527,12 +1544,11 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac + x86_64-apple-watchos*-simulator) CPP=x86_64-apple-watchos-simulator-cpp ;; + + aarch64-apple-xros*-simulator) CPP=arm64-apple-xros-simulator-cpp ;; -+ aarch64-apple-xros*) CPP=arm64_32-apple-xros-cpp ;; -+ x86_64-apple-xros*-simulator) CPP=x86_64-apple-xros-simulator-cpp ;; ++ aarch64-apple-xros*) CPP=arm64-apple-xros-cpp ;; *) esac fi -@@ -444,6 +489,18 @@ +@@ -444,6 +486,17 @@ aarch64-apple-ios*-simulator) CXX=arm64-apple-ios-simulator-clang++ ;; aarch64-apple-ios*) CXX=arm64-apple-ios-clang++ ;; x86_64-apple-ios*-simulator) CXX=x86_64-apple-ios-simulator-clang++ ;; @@ -1542,16 +1558,15 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac + x86_64-apple-tvos*-simulator) CXX=x86_64-apple-tvos-simulator-clang++ ;; + + aarch64-apple-watchos*-simulator) CXX=arm64-apple-watchos-simulator-clang++ ;; -+ aarch64-apple-watchos*) CXX=arm64_32-apple-watchos-clang++ ;; ++ aarch64-apple-watchos*) CXX=arm64-apple-watchos-clang++ ;; + x86_64-apple-watchos*-simulator) CXX=x86_64-apple-watchos-simulator-clang++ ;; + + aarch64-apple-xros*-simulator) CXX=arm64-apple-xros-simulator-clang++ ;; -+ aarch64-apple-xros*) CXX=arm64_32-apple-xros-clang++ ;; -+ x86_64-apple-xros*-simulator) CXX=x86_64-apple-xros-simulator-clang++ ;; ++ aarch64-apple-xros*) CXX=arm64-apple-xros-clang++ ;; *) esac fi -@@ -558,8 +615,11 @@ +@@ -558,8 +611,11 @@ case $enableval in yes) case $ac_sys_system in @@ -1565,7 +1580,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac *) AC_MSG_ERROR([Unknown platform for framework build]) esac esac -@@ -568,6 +628,9 @@ +@@ -568,6 +624,9 @@ no) case $ac_sys_system in iOS) AC_MSG_ERROR([iOS builds must use --enable-framework]) ;; @@ -1575,7 +1590,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac *) PYTHONFRAMEWORK= PYTHONFRAMEWORKDIR=no-framework -@@ -670,6 +733,48 @@ +@@ -670,6 +729,48 @@ AC_CONFIG_FILES([iOS/Resources/Info.plist]) ;; @@ -1624,7 +1639,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac *) AC_MSG_ERROR([Unknown platform for framework build]) ;; -@@ -678,6 +783,9 @@ +@@ -678,6 +779,9 @@ ],[ case $ac_sys_system in iOS) AC_MSG_ERROR([iOS builds must use --enable-framework]) ;; @@ -1634,7 +1649,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac *) PYTHONFRAMEWORK= PYTHONFRAMEWORKDIR=no-framework -@@ -730,8 +838,8 @@ +@@ -730,8 +834,8 @@ case "$withval" in yes) case $ac_sys_system in @@ -1645,7 +1660,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac APP_STORE_COMPLIANCE_PATCH="Mac/Resources/app-store-compliance.patch" ;; *) AC_MSG_ERROR([no default app store compliance patch available for $ac_sys_system]) ;; -@@ -745,8 +853,8 @@ +@@ -745,8 +849,8 @@ esac ],[ case $ac_sys_system in @@ -1656,7 +1671,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac APP_STORE_COMPLIANCE_PATCH="Mac/Resources/app-store-compliance.patch" AC_MSG_RESULT([applying default app store compliance patch]) ;; -@@ -794,6 +902,66 @@ +@@ -794,6 +898,66 @@ ;; esac ;; @@ -1723,7 +1738,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac *-*-darwin*) case "$host_cpu" in arm*) -@@ -883,9 +1051,15 @@ +@@ -883,9 +1047,15 @@ define_xopen_source=no;; Darwin/@<:@[12]@:>@@<:@0-9@:>@.*) define_xopen_source=no;; @@ -1740,7 +1755,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from # defining NI_NUMERICHOST. QNX/6.3.2) -@@ -944,8 +1118,12 @@ +@@ -944,8 +1114,12 @@ CONFIGURE_MACOSX_DEPLOYMENT_TARGET= EXPORT_MACOSX_DEPLOYMENT_TARGET='#' @@ -1754,7 +1769,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac # checks for alternative programs -@@ -979,11 +1157,18 @@ +@@ -979,11 +1153,18 @@ ], ) @@ -1774,7 +1789,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac ], ) -@@ -1172,6 +1357,9 @@ +@@ -1172,6 +1353,9 @@ AS_CASE([$ac_sys_system], [Darwin*], [MULTIARCH=""], [iOS], [MULTIARCH=""], @@ -1784,7 +1799,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac [FreeBSD*], [MULTIARCH=""], [MULTIARCH=$($CC --print-multiarch 2>/dev/null)] ) -@@ -1193,7 +1381,7 @@ +@@ -1193,7 +1377,7 @@ dnl use a single "fat" binary at runtime. SOABI_PLATFORM is the component of dnl the PLATFORM_TRIPLET that will be used in binary module extensions. AS_CASE([$ac_sys_system], @@ -1793,7 +1808,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac [SOABI_PLATFORM=$PLATFORM_TRIPLET] ) -@@ -1227,6 +1415,12 @@ +@@ -1227,6 +1411,12 @@ [x86_64-*-freebsd*/clang], [PY_SUPPORT_TIER=3], dnl FreeBSD on AMD64 [aarch64-apple-ios*-simulator/clang], [PY_SUPPORT_TIER=3], dnl iOS Simulator on arm64 [aarch64-apple-ios*/clang], [PY_SUPPORT_TIER=3], dnl iOS on ARM64 @@ -1802,11 +1817,11 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac + [aarch64-apple-watchos*-simulator/clang], [PY_SUPPORT_TIER=3], dnl watchOS Simulator on arm64 + [arm64_32-apple-watchos*/clang], [PY_SUPPORT_TIER=3], dnl watchOS on ARM64 + [aarch64-apple-xros*-simulator/clang], [PY_SUPPORT_TIER=3], dnl xrOS Simulator on arm64 -+ [arm64_32-apple-xros*/clang], [PY_SUPPORT_TIER=3], dnl xrOS on ARM64 ++ [arm64-apple-xros*/clang], [PY_SUPPORT_TIER=3], dnl xrOS on ARM64 [aarch64-*-linux-android/clang], [PY_SUPPORT_TIER=3], dnl Android on ARM64 [x86_64-*-linux-android/clang], [PY_SUPPORT_TIER=3], dnl Android on AMD64 -@@ -1536,7 +1730,7 @@ +@@ -1536,7 +1726,7 @@ case $ac_sys_system in Darwin) LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)';; @@ -1815,7 +1830,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac LDLIBRARY='$(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK)';; *) AC_MSG_ERROR([Unknown platform for framework build]);; -@@ -1601,7 +1795,7 @@ +@@ -1601,7 +1791,7 @@ BLDLIBRARY='-L. -lpython$(LDVERSION)' RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}} ;; @@ -1824,7 +1839,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac LDLIBRARY='libpython$(LDVERSION).dylib' ;; AIX*) -@@ -3456,7 +3650,7 @@ +@@ -3456,7 +3646,7 @@ BLDSHARED="$LDSHARED" fi ;; @@ -1833,7 +1848,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac LDSHARED='$(CC) -dynamiclib -F . -framework $(PYTHONFRAMEWORK)' LDCXXSHARED='$(CXX) -dynamiclib -F . -framework $(PYTHONFRAMEWORK)' BLDSHARED="$LDSHARED" -@@ -3580,7 +3774,7 @@ +@@ -3580,7 +3770,7 @@ Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";; Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";; # -u libsys_s pulls in all symbols in libsys @@ -1842,7 +1857,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac LINKFORSHARED="$extra_undefs -framework CoreFoundation" # Issue #18075: the default maximum stack size (8MBytes) is too -@@ -3604,7 +3798,7 @@ +@@ -3604,7 +3794,7 @@ LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' fi LINKFORSHARED="$LINKFORSHARED" @@ -1851,7 +1866,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac LINKFORSHARED="-Wl,-stack_size,$stack_size $LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK)' fi ;; -@@ -4024,7 +4218,7 @@ +@@ -4024,7 +4214,7 @@ dnl when do we need USING_APPLE_OS_LIBFFI? ctypes_malloc_closure=yes ], @@ -1860,7 +1875,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac ctypes_malloc_closure=yes ], [sunos5], [AS_VAR_APPEND([LIBFFI_LIBS], [" -mimpure-text"])] -@@ -5133,9 +5327,9 @@ +@@ -5133,9 +5323,9 @@ # checks for library functions AC_CHECK_FUNCS([ \ accept4 alarm bind_textdomain_codeset chmod chown clock closefrom close_range confstr \ @@ -1872,7 +1887,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac gai_strerror getegid geteuid getgid getgrent getgrgid getgrgid_r \ getgrnam_r getgrouplist gethostname getitimer getloadavg getlogin \ getpeername getpgid getpid getppid getpriority _getpty \ -@@ -5143,8 +5337,7 @@ +@@ -5143,8 +5333,7 @@ getspnam getuid getwd grantpt 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 \ @@ -1882,7 +1897,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac pread preadv preadv2 process_vm_readv \ pthread_cond_timedwait_relative_np pthread_condattr_setclock pthread_init \ pthread_kill pthread_getname_np pthread_setname_np pthread_getattr_np \ -@@ -5153,7 +5346,7 @@ +@@ -5153,7 +5342,7 @@ sched_setparam sched_setscheduler sem_clockwait sem_getvalue sem_open \ sem_timedwait sem_unlink sendfile setegid seteuid setgid sethostname \ setitimer setlocale setpgid setpgrp setpriority setregid setresgid \ @@ -1891,7 +1906,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac sigfillset siginterrupt sigpending sigrelse sigtimedwait sigwait \ sigwaitinfo snprintf splice strftime strlcpy strsignal symlinkat sync \ sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile \ -@@ -5168,14 +5361,22 @@ +@@ -5168,14 +5357,22 @@ AC_CHECK_FUNCS([lchmod]) fi @@ -1917,7 +1932,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac AC_CHECK_DECL([dirfd], [AC_DEFINE([HAVE_DIRFD], [1], [Define if you have the 'dirfd' function or macro.])], -@@ -5427,21 +5628,23 @@ +@@ -5427,21 +5624,23 @@ ]) # check for openpty, login_tty, and forkpty @@ -1955,7 +1970,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac # check for long file support functions AC_CHECK_FUNCS([fseek64 fseeko fstatvfs ftell64 ftello statvfs]) -@@ -5479,10 +5682,10 @@ +@@ -5479,10 +5678,10 @@ ]) ]) @@ -1968,7 +1983,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac then AC_CHECK_FUNCS([clock_settime], [], [ AC_CHECK_LIB([rt], [clock_settime], [ -@@ -6233,8 +6436,8 @@ +@@ -6233,8 +6432,8 @@ LIBPYTHON="\$(BLDLIBRARY)" fi @@ -1979,7 +1994,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac MODULE_DEPS_SHARED="$MODULE_DEPS_SHARED \$(PYTHONFRAMEWORKDIR)/\$(PYTHONFRAMEWORK)" fi -@@ -6893,7 +7096,7 @@ +@@ -6893,7 +7092,7 @@ dnl NOTE: Inform user how to proceed with files when cross compiling. dnl Some cross-compile builds are predictable; they won't ever dnl have /dev/ptmx or /dev/ptc, so we can set them explicitly. @@ -1988,7 +2003,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac ac_cv_file__dev_ptmx=no ac_cv_file__dev_ptc=no else -@@ -7174,7 +7377,7 @@ +@@ -7174,7 +7373,7 @@ AS_CASE([$ac_sys_system], [Emscripten], [with_ensurepip=no], [WASI], [with_ensurepip=no], @@ -1997,7 +2012,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac [with_ensurepip=upgrade] ) ]) -@@ -7585,7 +7788,7 @@ +@@ -7585,7 +7784,7 @@ [VxWorks*], [PY_STDLIB_MOD_SET_NA([_scproxy], [termios], [grp])], dnl The _scproxy module is available on macOS [Darwin], [], @@ -2691,73 +2706,38 @@ index 0000000..2e7be87 @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk xrsimulator clang -target arm64-apple-xros-simulator -E "$@" -diff --git a/xrOS/Resources/bin/arm64_32-apple-xros-ar b/xrOS/Resources/bin/arm64_32-apple-xros-ar +diff --git a/xrOS/Resources/bin/arm64-apple-xros-ar b/xrOS/Resources/bin/arm64-apple-xros-ar new file mode 100644 index 0000000..9fd78a2 --- /dev/null -+++ b/xrOS/Resources/bin/arm64_32-apple-xros-ar ++++ b/xrOS/Resources/bin/arm64-apple-xros-ar @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk xros${XROS_SDK_VERSION} ar "$@" -diff --git a/xrOS/Resources/bin/arm64_32-apple-xros-clang b/xrOS/Resources/bin/arm64_32-apple-xros-clang +diff --git a/xrOS/Resources/bin/arm64-apple-xros-clang b/xrOS/Resources/bin/arm64-apple-xros-clang new file mode 100644 index 0000000..5ac7a31 --- /dev/null -+++ b/xrOS/Resources/bin/arm64_32-apple-xros-clang ++++ b/xrOS/Resources/bin/arm64-apple-xros-clang @@ -0,0 +1,2 @@ +#!/bin/bash -+xcrun --sdk xros${XROS_SDK_VERSION} clang -target arm64_32-apple-xros "$@" -diff --git a/xrOS/Resources/bin/arm64_32-apple-xros-clang++ b/xrOS/Resources/bin/arm64_32-apple-xros-clang++ ++xcrun --sdk xros${XROS_SDK_VERSION} clang -target arm64-apple-xros "$@" +diff --git a/xrOS/Resources/bin/arm64-apple-xros-clang++ b/xrOS/Resources/bin/arm64-apple-xros-clang++ new file mode 100644 index 0000000..35f1820 --- /dev/null -+++ b/xrOS/Resources/bin/arm64_32-apple-xros-clang++ ++++ b/xrOS/Resources/bin/arm64-apple-xros-clang++ @@ -0,0 +1,2 @@ +#!/bin/bash -+xcrun --sdk xros${XROS_SDK_VERSION} clang++ -target arm64_32-apple-xros "$@" -diff --git a/xrOS/Resources/bin/arm64_32-apple-xros-cpp b/xrOS/Resources/bin/arm64_32-apple-xros-cpp ++xcrun --sdk xros${XROS_SDK_VERSION} clang++ -target arm64-apple-xros "$@" +diff --git a/xrOS/Resources/bin/arm64-apple-xros-cpp b/xrOS/Resources/bin/arm64-apple-xros-cpp new file mode 100644 index 0000000..e34ba5d --- /dev/null -+++ b/xrOS/Resources/bin/arm64_32-apple-xros-cpp -@@ -0,0 +1,2 @@ -+#!/bin/bash -+xcrun --sdk xros${XROS_SDK_VERSION} clang -target arm64_32-apple-xros -E "$@" -diff --git a/xrOS/Resources/bin/x86_64-apple-xros-simulator-ar b/xrOS/Resources/bin/x86_64-apple-xros-simulator-ar -new file mode 100644 -index 0000000..b202330 ---- /dev/null -+++ b/xrOS/Resources/bin/x86_64-apple-xros-simulator-ar ++++ b/xrOS/Resources/bin/arm64-apple-xros-cpp @@ -0,0 +1,2 @@ +#!/bin/bash -+xcrun --sdk xrsimulator${XROS_SDK_VERSION} ar "$@" -diff --git a/xrOS/Resources/bin/x86_64-apple-xros-simulator-clang b/xrOS/Resources/bin/x86_64-apple-xros-simulator-clang -new file mode 100644 -index 0000000..e094d17 ---- /dev/null -+++ b/xrOS/Resources/bin/x86_64-apple-xros-simulator-clang -@@ -0,0 +1,2 @@ -+#!/bin/bash -+xcrun --sdk xrsimulator${XROS_SDK_VERSION} clang -target x86_64-apple-xros-simulator "$@" -diff --git a/xrOS/Resources/bin/x86_64-apple-xros-simulator-clang++ b/xrOS/Resources/bin/x86_64-apple-xros-simulator-clang++ -new file mode 100644 -index 0000000..f161ac7 ---- /dev/null -+++ b/xrOS/Resources/bin/x86_64-apple-xros-simulator-clang++ -@@ -0,0 +1,2 @@ -+#!/bin/bash -+xcrun --sdk xrsimulator${XROS_SDK_VERSION} clang++ -target x86_64-apple-xros-simulator "$@" -diff --git a/xrOS/Resources/bin/x86_64-apple-xros-simulator-cpp b/xrOS/Resources/bin/x86_64-apple-xros-simulator-cpp -new file mode 100644 -index 0000000..38e4e3d ---- /dev/null -+++ b/xrOS/Resources/bin/x86_64-apple-xros-simulator-cpp -@@ -0,0 +1,2 @@ -+#!/bin/bash -+xcrun --sdk xrsimulator${XROS_SDK_VERSION} clang -target x86_64-apple-xros-simulator -E "$@" -diff --git a/xrOS/Resources/dylib-Info-template.plist b/xrOS/Resources/dylib-Info-template.plist -new file mode 100644 -index 0000000..f630cdb ++xcrun --sdk xros${XROS_SDK_VERSION} clang -target arm64-apple-xros -E "$@" --- /dev/null +++ b/xrOS/Resources/dylib-Info-template.plist @@ -0,0 +1,26 @@ From a9f93cded620fbd2a77f559fe51cd752a6658cb9 Mon Sep 17 00:00:00 2001 From: John Zhou Date: Sat, 12 Apr 2025 21:10:01 -0500 Subject: [PATCH 08/22] remove some stuff --- patch/Python/Python.patch | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/patch/Python/Python.patch b/patch/Python/Python.patch index 56978a7d..5a43845a 100644 --- a/patch/Python/Python.patch +++ b/patch/Python/Python.patch @@ -378,16 +378,6 @@ diff -ur Python-3.14.0a6-orig/aclocal.m4 Python-3.14.0a6/aclocal.m4 AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) -@@ -475,6 +489,9 @@ - AC_MSG_RESULT([no]) - PKG_CONFIG="" - fi -+fi -+if test -z "$PKG_CONFIG"; then -+ m4_default([$2], [AC_MSG_ERROR([pkg-config not found])]) - fi[]dnl - ])dnl PKG_PROG_PKG_CONFIG - @@ -744,7 +761,7 @@ # AM_CONDITIONAL -*- Autoconf -*- @@ -440,16 +430,6 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure IPHONEOS_DEPLOYMENT_TARGET EXPORT_MACOSX_DEPLOYMENT_TARGET CONFIGURE_MACOSX_DEPLOYMENT_TARGET -@@ -4061,6 +4064,9 @@ - PKG_CONFIG="" - fi - fi -+if test -z "$PKG_CONFIG"; then -+ as_fn_error $? "pkg-config not found" "$LINENO" 5 -+fi - ;; #( - no) : - @@ -4100,6 +4106,15 @@ *-apple-ios*) ac_sys_system=iOS From 21c859077640722c119a38d298cb3062c9513dbe Mon Sep 17 00:00:00 2001 From: John Zhou Date: Sat, 12 Apr 2025 21:44:34 -0500 Subject: [PATCH 09/22] bruh autoreconf really stop i forgot to run you AGAIN --- patch/Python/Python.patch | 158 ++++++++++++++++++++++---------------- 1 file changed, 91 insertions(+), 67 deletions(-) diff --git a/patch/Python/Python.patch b/patch/Python/Python.patch index 5a43845a..99500113 100644 --- a/patch/Python/Python.patch +++ b/patch/Python/Python.patch @@ -1,3 +1,4 @@ +Only in Python-3.14.0a6: .DS_Store diff -ur Python-3.14.0a6-orig/Lib/platform.py Python-3.14.0a6/Lib/platform.py --- Python-3.14.0a6-orig/Lib/platform.py 2025-03-14 10:05:02 +++ Python-3.14.0a6/Lib/platform.py 2025-04-12 20:43:35 @@ -204,7 +205,7 @@ diff -ur Python-3.14.0a6-orig/Misc/platform_triplet.c Python-3.14.0a6/Misc/platf PLATFORM_TRIPLET=darwin diff -ur Python-3.14.0a6-orig/aclocal.m4 Python-3.14.0a6/aclocal.m4 --- Python-3.14.0a6-orig/aclocal.m4 2025-03-14 10:05:02 -+++ Python-3.14.0a6/aclocal.m4 2025-04-12 21:11:05 ++++ Python-3.14.0a6/aclocal.m4 2025-04-12 21:42:11 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.16.5 -*- Autoconf -*- +# generated automatically by aclocal 1.17 -*- Autoconf -*- @@ -378,6 +379,16 @@ diff -ur Python-3.14.0a6-orig/aclocal.m4 Python-3.14.0a6/aclocal.m4 AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) +@@ -475,6 +489,9 @@ + AC_MSG_RESULT([no]) + PKG_CONFIG="" + fi ++fi ++if test -z "$PKG_CONFIG"; then ++ m4_default([$2], [AC_MSG_ERROR([pkg-config not found])]) + fi[]dnl + ])dnl PKG_PROG_PKG_CONFIG + @@ -744,7 +761,7 @@ # AM_CONDITIONAL -*- Autoconf -*- @@ -396,6 +407,7 @@ diff -ur Python-3.14.0a6-orig/aclocal.m4 Python-3.14.0a6/aclocal.m4 # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, +Only in Python-3.14.0a6: autom4te.cache diff -ur Python-3.14.0a6-orig/config.sub Python-3.14.0a6/config.sub --- Python-3.14.0a6-orig/config.sub 2025-03-14 10:05:02 +++ Python-3.14.0a6/config.sub 2025-04-12 20:43:35 @@ -419,7 +431,7 @@ diff -ur Python-3.14.0a6-orig/config.sub Python-3.14.0a6/config.sub # None (no kernel, i.e. freestanding / bare metal), diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure --- Python-3.14.0a6-orig/configure 2025-03-14 10:05:02 -+++ Python-3.14.0a6/configure 2025-04-12 21:11:06 ++++ Python-3.14.0a6/configure 2025-04-12 21:42:12 @@ -974,6 +974,9 @@ CFLAGS CC @@ -430,6 +442,16 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure IPHONEOS_DEPLOYMENT_TARGET EXPORT_MACOSX_DEPLOYMENT_TARGET CONFIGURE_MACOSX_DEPLOYMENT_TARGET +@@ -4061,6 +4064,9 @@ + PKG_CONFIG="" + fi + fi ++if test -z "$PKG_CONFIG"; then ++ as_fn_error $? "pkg-config not found" "$LINENO" 5 ++fi + ;; #( + no) : + @@ -4100,6 +4106,15 @@ *-apple-ios*) ac_sys_system=iOS @@ -455,7 +477,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure # which isn't a binary that exists, and isn't very convenient, as it contains the # iOS version. As the default cross-compiler name won't exist, configure falls # back to gcc, which *definitely* won't work. We're providing wrapper scripts for -@@ -4196,6 +4211,18 @@ +@@ -4196,6 +4211,17 @@ aarch64-apple-ios*-simulator) AR=arm64-apple-ios-simulator-ar ;; aarch64-apple-ios*) AR=arm64-apple-ios-ar ;; x86_64-apple-ios*-simulator) AR=x86_64-apple-ios-simulator-ar ;; @@ -469,12 +491,11 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure + x86_64-apple-watchos*-simulator) AR=x86_64-apple-watchos-simulator-ar ;; + + aarch64-apple-xros*-simulator) AR=arm64-apple-xros-simulator-ar ;; -+ aarch64-apple-xros*) AR=arm64_32-apple-xros-ar ;; -+ x86_64-apple-xros*-simulator) AR=x86_64-apple-xros-simulator-ar ;; ++ aarch64-apple-xros*) AR=arm64-apple-xros-ar ;; *) esac fi -@@ -4204,6 +4231,18 @@ +@@ -4204,6 +4230,17 @@ aarch64-apple-ios*-simulator) CC=arm64-apple-ios-simulator-clang ;; aarch64-apple-ios*) CC=arm64-apple-ios-clang ;; x86_64-apple-ios*-simulator) CC=x86_64-apple-ios-simulator-clang ;; @@ -488,12 +509,11 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure + x86_64-apple-watchos*-simulator) CC=x86_64-apple-watchos-simulator-clang ;; + + aarch64-apple-xros*-simulator) CC=arm64-apple-xros-simulator-clang ;; -+ aarch64-apple-xros*) CC=arm64_32-apple-xros-clang ;; -+ x86_64-apple-xros*-simulator) CC=x86_64-apple-xros-simulator-clang ;; ++ aarch64-apple-xros*) CC=arm64-apple-xros-clang ;; *) esac fi -@@ -4212,6 +4251,18 @@ +@@ -4212,6 +4249,17 @@ aarch64-apple-ios*-simulator) CPP=arm64-apple-ios-simulator-cpp ;; aarch64-apple-ios*) CPP=arm64-apple-ios-cpp ;; x86_64-apple-ios*-simulator) CPP=x86_64-apple-ios-simulator-cpp ;; @@ -507,12 +527,11 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure + x86_64-apple-watchos*-simulator) CPP=x86_64-apple-watchos-simulator-cpp ;; + + aarch64-apple-xros*-simulator) CPP=arm64-apple-xros-simulator-cpp ;; -+ aarch64-apple-xros*) CPP=arm64_32-apple-xros-cpp ;; -+ x86_64-apple-xros*-simulator) CPP=x86_64-apple-xros-simulator-cpp ;; ++ aarch64-apple-xros*) CPP=arm64-apple-xros-cpp ;; *) esac fi -@@ -4220,6 +4271,18 @@ +@@ -4220,6 +4268,17 @@ aarch64-apple-ios*-simulator) CXX=arm64-apple-ios-simulator-clang++ ;; aarch64-apple-ios*) CXX=arm64-apple-ios-clang++ ;; x86_64-apple-ios*-simulator) CXX=x86_64-apple-ios-simulator-clang++ ;; @@ -522,16 +541,15 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure + x86_64-apple-tvos*-simulator) CXX=x86_64-apple-tvos-simulator-clang++ ;; + + aarch64-apple-watchos*-simulator) CXX=arm64-apple-watchos-simulator-clang++ ;; -+ aarch64-apple-watchos*) CXX=arm64_32-apple-watchos-clang++ ;; ++ aarch64-apple-watchos*) CXX=arm64-apple-watchos-clang++ ;; + x86_64-apple-watchos*-simulator) CXX=x86_64-apple-watchos-simulator-clang++ ;; + + aarch64-apple-xros*-simulator) CXX=arm64-apple-xros-simulator-clang++ ;; -+ aarch64-apple-xros*) CXX=arm64_32-apple-xros-clang++ ;; -+ x86_64-apple-xros*-simulator) CXX=x86_64-apple-xros-simulator-clang++ ;; ++ aarch64-apple-xros*) CXX=arm64-apple-xros-clang++ ;; *) esac fi -@@ -4342,8 +4405,11 @@ +@@ -4342,8 +4401,11 @@ case $enableval in yes) case $ac_sys_system in @@ -545,7 +563,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure *) as_fn_error $? "Unknown platform for framework build" "$LINENO" 5 esac esac -@@ -4352,6 +4418,9 @@ +@@ -4352,6 +4414,9 @@ no) case $ac_sys_system in iOS) as_fn_error $? "iOS builds must use --enable-framework" "$LINENO" 5 ;; @@ -555,7 +573,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure *) PYTHONFRAMEWORK= PYTHONFRAMEWORKDIR=no-framework -@@ -4459,6 +4528,50 @@ +@@ -4459,6 +4524,50 @@ ac_config_files="$ac_config_files iOS/Resources/Info.plist" ;; @@ -606,7 +624,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure *) as_fn_error $? "Unknown platform for framework build" "$LINENO" 5 ;; -@@ -4469,6 +4582,9 @@ +@@ -4469,6 +4578,9 @@ e) case $ac_sys_system in iOS) as_fn_error $? "iOS builds must use --enable-framework" "$LINENO" 5 ;; @@ -616,7 +634,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure *) PYTHONFRAMEWORK= PYTHONFRAMEWORKDIR=no-framework -@@ -4523,8 +4639,8 @@ +@@ -4523,8 +4635,8 @@ case "$withval" in yes) case $ac_sys_system in @@ -627,7 +645,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure APP_STORE_COMPLIANCE_PATCH="Mac/Resources/app-store-compliance.patch" ;; *) as_fn_error $? "no default app store compliance patch available for $ac_sys_system" "$LINENO" 5 ;; -@@ -4542,8 +4658,8 @@ +@@ -4542,8 +4654,8 @@ else case e in #( e) case $ac_sys_system in @@ -638,7 +656,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure APP_STORE_COMPLIANCE_PATCH="Mac/Resources/app-store-compliance.patch" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: applying default app store compliance patch" >&5 printf "%s\n" "applying default app store compliance patch" >&6; } -@@ -4598,6 +4714,72 @@ +@@ -4598,6 +4710,72 @@ ;; esac ;; @@ -711,7 +729,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure *-*-darwin*) case "$host_cpu" in arm*) -@@ -4688,9 +4870,15 @@ +@@ -4688,9 +4866,15 @@ define_xopen_source=no;; Darwin/[12][0-9].*) define_xopen_source=no;; @@ -728,7 +746,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from # defining NI_NUMERICHOST. QNX/6.3.2) -@@ -4753,9 +4941,13 @@ +@@ -4753,9 +4937,13 @@ CONFIGURE_MACOSX_DEPLOYMENT_TARGET= EXPORT_MACOSX_DEPLOYMENT_TARGET='#' @@ -743,7 +761,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure # checks for alternative programs # compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just -@@ -4794,6 +4986,16 @@ +@@ -4794,6 +4982,16 @@ as_fn_append CFLAGS " -mios-version-min=${IPHONEOS_DEPLOYMENT_TARGET}" as_fn_append LDFLAGS " -mios-version-min=${IPHONEOS_DEPLOYMENT_TARGET}" ;; #( @@ -760,7 +778,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure *) : ;; esac -@@ -7163,6 +7365,12 @@ +@@ -7163,6 +7361,12 @@ MULTIARCH="" ;; #( iOS) : MULTIARCH="" ;; #( @@ -773,7 +791,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure FreeBSD*) : MULTIARCH="" ;; #( *) : -@@ -7183,7 +7391,7 @@ +@@ -7183,7 +7387,7 @@ printf "%s\n" "$MULTIARCH" >&6; } case $ac_sys_system in #( @@ -782,7 +800,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure SOABI_PLATFORM=`echo "$PLATFORM_TRIPLET" | cut -d '-' -f2` ;; #( *) : SOABI_PLATFORM=$PLATFORM_TRIPLET -@@ -7234,6 +7442,18 @@ +@@ -7234,6 +7438,18 @@ PY_SUPPORT_TIER=3 ;; #( aarch64-apple-ios*/clang) : PY_SUPPORT_TIER=3 ;; #( @@ -796,12 +814,12 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure + PY_SUPPORT_TIER=3 ;; #( + aarch64-apple-xros*-simulator/clang) : + PY_SUPPORT_TIER=3 ;; #( -+ arm64_32-apple-xros*/clang) : ++ arm64-apple-xros*/clang) : + PY_SUPPORT_TIER=3 ;; #( aarch64-*-linux-android/clang) : PY_SUPPORT_TIER=3 ;; #( x86_64-*-linux-android/clang) : -@@ -7670,7 +7890,7 @@ +@@ -7670,7 +7886,7 @@ case $ac_sys_system in Darwin) LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)';; @@ -810,7 +828,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure LDLIBRARY='$(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK)';; *) as_fn_error $? "Unknown platform for framework build" "$LINENO" 5;; -@@ -7736,7 +7956,7 @@ +@@ -7736,7 +7952,7 @@ BLDLIBRARY='-L. -lpython$(LDVERSION)' RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}} ;; @@ -819,7 +837,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure LDLIBRARY='libpython$(LDVERSION).dylib' ;; AIX*) -@@ -8444,15 +8664,18 @@ +@@ -8444,15 +8660,18 @@ if test "x$ac_cv_gcc_compat" = xyes then : @@ -841,7 +859,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -8582,15 +8805,18 @@ +@@ -8582,15 +8801,18 @@ case $ac_cv_cc_name in clang) LDFLAGS_NOLTO="-fno-lto" @@ -863,7 +881,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -8767,15 +8993,18 @@ +@@ -8767,15 +8989,18 @@ if test $Py_LTO_POLICY = default then # Check that ThinLTO is accepted. @@ -885,7 +903,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -8824,15 +9053,18 @@ +@@ -8824,15 +9049,18 @@ if test $Py_LTO_POLICY = default then # Check that ThinLTO is accepted @@ -907,7 +925,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -9109,15 +9341,18 @@ +@@ -9109,15 +9337,18 @@ # -fno-reorder-blocks-and-partition is required for bolt to work. # Possibly GCC only. @@ -929,7 +947,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -9765,15 +10000,18 @@ +@@ -9765,15 +9996,18 @@ if test "$enable_safety" = "yes" then @@ -951,7 +969,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -9807,15 +10045,18 @@ +@@ -9807,15 +10041,18 @@ esac fi @@ -973,7 +991,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -9849,15 +10090,18 @@ +@@ -9849,15 +10086,18 @@ esac fi @@ -995,7 +1013,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -9891,15 +10135,18 @@ +@@ -9891,15 +10131,18 @@ esac fi @@ -1017,7 +1035,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -9933,15 +10180,18 @@ +@@ -9933,15 +10176,18 @@ esac fi @@ -1039,7 +1057,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -9975,15 +10225,18 @@ +@@ -9975,15 +10221,18 @@ esac fi @@ -1061,7 +1079,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -10041,15 +10294,18 @@ +@@ -10041,15 +10290,18 @@ if test "$enable_slower_safety" = "yes" then @@ -1083,7 +1101,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -10650,15 +10906,18 @@ +@@ -10650,15 +10902,18 @@ # Error on unguarded use of new symbols, which will fail at runtime for # users on older versions of macOS @@ -1105,7 +1123,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -13341,15 +13600,18 @@ +@@ -13341,15 +13596,18 @@ withval=$with_memory_sanitizer; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5 printf "%s\n" "$withval" >&6; } @@ -1127,7 +1145,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -13544,7 +13806,7 @@ +@@ -13544,7 +13802,7 @@ BLDSHARED="$LDSHARED" fi ;; @@ -1136,7 +1154,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure LDSHARED='$(CC) -dynamiclib -F . -framework $(PYTHONFRAMEWORK)' LDCXXSHARED='$(CXX) -dynamiclib -F . -framework $(PYTHONFRAMEWORK)' BLDSHARED="$LDSHARED" -@@ -13677,7 +13939,7 @@ +@@ -13677,7 +13935,7 @@ Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";; Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";; # -u libsys_s pulls in all symbols in libsys @@ -1145,7 +1163,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure LINKFORSHARED="$extra_undefs -framework CoreFoundation" # Issue #18075: the default maximum stack size (8MBytes) is too -@@ -13701,7 +13963,7 @@ +@@ -13701,7 +13959,7 @@ LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' fi LINKFORSHARED="$LINKFORSHARED" @@ -1154,7 +1172,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure LINKFORSHARED="-Wl,-stack_size,$stack_size $LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK)' fi ;; -@@ -15286,7 +15548,7 @@ +@@ -15286,7 +15544,7 @@ ctypes_malloc_closure=yes ;; #( @@ -1163,7 +1181,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure ctypes_malloc_closure=yes ;; #( -@@ -19039,12 +19301,6 @@ +@@ -19039,12 +19297,6 @@ printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h fi @@ -1176,7 +1194,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero" if test "x$ac_cv_func_explicit_bzero" = xyes then : -@@ -19105,18 +19361,6 @@ +@@ -19105,18 +19357,6 @@ printf "%s\n" "#define HAVE_FEXECVE 1" >>confdefs.h fi @@ -1195,7 +1213,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure ac_fn_c_check_func "$LINENO" "fpathconf" "ac_cv_func_fpathconf" if test "x$ac_cv_func_fpathconf" = xyes then : -@@ -19543,24 +19787,6 @@ +@@ -19543,24 +19783,6 @@ printf "%s\n" "#define HAVE_POSIX_OPENPT 1" >>confdefs.h fi @@ -1220,7 +1238,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure ac_fn_c_check_func "$LINENO" "pread" "ac_cv_func_pread" if test "x$ac_cv_func_pread" = xyes then : -@@ -19867,12 +20093,6 @@ +@@ -19867,12 +20089,6 @@ printf "%s\n" "#define HAVE_SIGACTION 1" >>confdefs.h fi @@ -1233,7 +1251,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure ac_fn_c_check_func "$LINENO" "sigfillset" "ac_cv_func_sigfillset" if test "x$ac_cv_func_sigfillset" = xyes then : -@@ -20140,11 +20360,11 @@ +@@ -20140,11 +20356,11 @@ fi @@ -1247,7 +1265,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy" if test "x$ac_cv_func_getentropy" = xyes then : -@@ -20166,6 +20386,53 @@ +@@ -20166,6 +20382,53 @@ fi @@ -1301,7 +1319,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure { 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} -@@ -23248,8 +23515,9 @@ +@@ -23248,8 +23511,9 @@ # check for openpty, login_tty, and forkpty @@ -1312,7 +1330,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure for ac_func in openpty do : ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty" -@@ -23362,7 +23630,7 @@ +@@ -23362,7 +23626,7 @@ fi done @@ -1321,7 +1339,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure printf %s "checking for library containing login_tty... " >&6; } if test ${ac_cv_search_login_tty+y} then : -@@ -23545,6 +23813,7 @@ +@@ -23545,6 +23809,7 @@ fi done @@ -1329,7 +1347,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure # check for long file support functions ac_fn_c_check_func "$LINENO" "fseek64" "ac_cv_func_fseek64" -@@ -23810,10 +24079,10 @@ +@@ -23810,10 +24075,10 @@ done @@ -1342,7 +1360,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure then for ac_func in clock_settime -@@ -25236,10 +25505,10 @@ +@@ -25236,10 +25501,10 @@ then : @@ -1355,7 +1373,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure if test "$ax_cv_c_float_words_bigendian" = unknown; then ax_cv_c_float_words_bigendian=no else -@@ -26152,8 +26421,8 @@ +@@ -26152,8 +26417,8 @@ LIBPYTHON="\$(BLDLIBRARY)" fi @@ -1366,7 +1384,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure MODULE_DEPS_SHARED="$MODULE_DEPS_SHARED \$(PYTHONFRAMEWORKDIR)/\$(PYTHONFRAMEWORK)" fi -@@ -29023,7 +29292,7 @@ +@@ -29023,7 +29288,7 @@ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for device files" >&5 printf "%s\n" "$as_me: checking for device files" >&6;} @@ -1375,7 +1393,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure ac_cv_file__dev_ptmx=no ac_cv_file__dev_ptc=no else -@@ -29504,7 +29773,7 @@ +@@ -29504,7 +29769,7 @@ with_ensurepip=no ;; #( WASI) : with_ensurepip=no ;; #( @@ -1384,7 +1402,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure with_ensurepip=no ;; #( *) : with_ensurepip=upgrade -@@ -30484,7 +30753,7 @@ +@@ -30484,7 +30749,7 @@ ;; #( Darwin) : ;; #( @@ -1393,7 +1411,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure -@@ -32082,15 +32351,18 @@ +@@ -32082,15 +32347,18 @@ # Android. # The *mmintrin.h headers are x86-family-specific, so can't be used on WASI. if test "$ac_sys_system" != "Linux-android" -a "$ac_sys_system" != "WASI" || test "$ANDROID_API_LEVEL" -ge 28; then @@ -1415,7 +1433,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -32157,15 +32429,18 @@ +@@ -32157,15 +32425,18 @@ # (https://developer.android.com/ndk/guides/abis#86-64), this is safe because we do a # runtime CPUID check. if test "$ac_sys_system" != "Linux-android" -a "$ac_sys_system" != "WASI" || test "$ANDROID_API_LEVEL" -ge 28; then @@ -1437,7 +1455,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -34487,6 +34762,8 @@ +@@ -34487,6 +34758,8 @@ "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;; "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;; "iOS/Resources/Info.plist") CONFIG_FILES="$CONFIG_FILES iOS/Resources/Info.plist" ;; @@ -2001,6 +2019,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac dnl subprocess and multiprocessing are not supported (no fork syscall). dnl curses and tkinter user interface are not available. dnl gdbm and nis aren't available +Only in Python-3.14.0a6: configure~ diff -ur Python-3.14.0a6-orig/iOS/Resources/Info.plist.in Python-3.14.0a6/iOS/Resources/Info.plist.in --- Python-3.14.0a6-orig/iOS/Resources/Info.plist.in 2025-03-14 10:05:02 +++ Python-3.14.0a6/iOS/Resources/Info.plist.in 2025-04-12 20:43:35 @@ -2020,6 +2039,11 @@ diff -ur Python-3.14.0a6-orig/iOS/Resources/Info.plist.in Python-3.14.0a6/iOS/Re CFBundleSupportedPlatforms iPhoneOS +Only in Python-3.14.0a6: pyconfig.h.in~ +Only in Python-3.14.0a6: tvOS +Only in Python-3.14.0a6: watchOS +Only in Python-3.14.0a6: xrOS + diff --git a/tvOS/README.rst b/tvOS/README.rst new file mode 100644 index 0000000..1f79325 From f908d6f01515c1897be7a70697fc810c6af7e62d Mon Sep 17 00:00:00 2001 From: John Zhou Date: Sat, 12 Apr 2025 21:10:01 -0500 Subject: [PATCH 10/22] remove some stuff --- patch/Python/Python.patch | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/patch/Python/Python.patch b/patch/Python/Python.patch index 99500113..eddda4cf 100644 --- a/patch/Python/Python.patch +++ b/patch/Python/Python.patch @@ -379,16 +379,6 @@ diff -ur Python-3.14.0a6-orig/aclocal.m4 Python-3.14.0a6/aclocal.m4 AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) -@@ -475,6 +489,9 @@ - AC_MSG_RESULT([no]) - PKG_CONFIG="" - fi -+fi -+if test -z "$PKG_CONFIG"; then -+ m4_default([$2], [AC_MSG_ERROR([pkg-config not found])]) - fi[]dnl - ])dnl PKG_PROG_PKG_CONFIG - @@ -744,7 +761,7 @@ # AM_CONDITIONAL -*- Autoconf -*- @@ -442,16 +432,6 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure IPHONEOS_DEPLOYMENT_TARGET EXPORT_MACOSX_DEPLOYMENT_TARGET CONFIGURE_MACOSX_DEPLOYMENT_TARGET -@@ -4061,6 +4064,9 @@ - PKG_CONFIG="" - fi - fi -+if test -z "$PKG_CONFIG"; then -+ as_fn_error $? "pkg-config not found" "$LINENO" 5 -+fi - ;; #( - no) : - @@ -4100,6 +4106,15 @@ *-apple-ios*) ac_sys_system=iOS From 05a1ba23ff972cc7bc584fc4f83ac4223c751ddf Mon Sep 17 00:00:00 2001 From: John Zhou Date: Sat, 12 Apr 2025 21:49:04 -0500 Subject: [PATCH 11/22] I HATE YOU AUTOCONF AND FRIENDS and did i add an extra newline??? --- patch/Python/Python.patch | 132 ++++++++++++++++++++++---------------- 1 file changed, 77 insertions(+), 55 deletions(-) diff --git a/patch/Python/Python.patch b/patch/Python/Python.patch index eddda4cf..f83134eb 100644 --- a/patch/Python/Python.patch +++ b/patch/Python/Python.patch @@ -205,7 +205,7 @@ diff -ur Python-3.14.0a6-orig/Misc/platform_triplet.c Python-3.14.0a6/Misc/platf PLATFORM_TRIPLET=darwin diff -ur Python-3.14.0a6-orig/aclocal.m4 Python-3.14.0a6/aclocal.m4 --- Python-3.14.0a6-orig/aclocal.m4 2025-03-14 10:05:02 -+++ Python-3.14.0a6/aclocal.m4 2025-04-12 21:42:11 ++++ Python-3.14.0a6/aclocal.m4 2025-04-12 21:47:08 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.16.5 -*- Autoconf -*- +# generated automatically by aclocal 1.17 -*- Autoconf -*- @@ -379,6 +379,16 @@ diff -ur Python-3.14.0a6-orig/aclocal.m4 Python-3.14.0a6/aclocal.m4 AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) +@@ -475,6 +489,9 @@ + AC_MSG_RESULT([no]) + PKG_CONFIG="" + fi ++fi ++if test -z "$PKG_CONFIG"; then ++ m4_default([$2], [AC_MSG_ERROR([pkg-config not found])]) + fi[]dnl + ])dnl PKG_PROG_PKG_CONFIG + @@ -744,7 +761,7 @@ # AM_CONDITIONAL -*- Autoconf -*- @@ -421,7 +431,7 @@ diff -ur Python-3.14.0a6-orig/config.sub Python-3.14.0a6/config.sub # None (no kernel, i.e. freestanding / bare metal), diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure --- Python-3.14.0a6-orig/configure 2025-03-14 10:05:02 -+++ Python-3.14.0a6/configure 2025-04-12 21:42:12 ++++ Python-3.14.0a6/configure 2025-04-12 21:47:09 @@ -974,6 +974,9 @@ CFLAGS CC @@ -432,6 +442,16 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure IPHONEOS_DEPLOYMENT_TARGET EXPORT_MACOSX_DEPLOYMENT_TARGET CONFIGURE_MACOSX_DEPLOYMENT_TARGET +@@ -4061,6 +4064,9 @@ + PKG_CONFIG="" + fi + fi ++if test -z "$PKG_CONFIG"; then ++ as_fn_error $? "pkg-config not found" "$LINENO" 5 ++fi + ;; #( + no) : + @@ -4100,6 +4106,15 @@ *-apple-ios*) ac_sys_system=iOS @@ -553,7 +573,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure *) PYTHONFRAMEWORK= PYTHONFRAMEWORKDIR=no-framework -@@ -4459,6 +4524,50 @@ +@@ -4459,6 +4524,51 @@ ac_config_files="$ac_config_files iOS/Resources/Info.plist" ;; @@ -597,14 +617,15 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure + + prefix=$PYTHONFRAMEWORKPREFIX + PYTHONFRAMEWORKINSTALLNAMEPREFIX="@rpath/$PYTHONFRAMEWORKDIR" -+ RESSRCDIR=watchOS/Resources ++ RESSRCDIR=xrOS/Resources + + ac_config_files="$ac_config_files xrOS/Resources/Info.plist" ++ + ;; *) as_fn_error $? "Unknown platform for framework build" "$LINENO" 5 ;; -@@ -4469,6 +4578,9 @@ +@@ -4469,6 +4579,9 @@ e) case $ac_sys_system in iOS) as_fn_error $? "iOS builds must use --enable-framework" "$LINENO" 5 ;; @@ -614,7 +635,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure *) PYTHONFRAMEWORK= PYTHONFRAMEWORKDIR=no-framework -@@ -4523,8 +4635,8 @@ +@@ -4523,8 +4636,8 @@ case "$withval" in yes) case $ac_sys_system in @@ -625,7 +646,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure APP_STORE_COMPLIANCE_PATCH="Mac/Resources/app-store-compliance.patch" ;; *) as_fn_error $? "no default app store compliance patch available for $ac_sys_system" "$LINENO" 5 ;; -@@ -4542,8 +4654,8 @@ +@@ -4542,8 +4655,8 @@ else case e in #( e) case $ac_sys_system in @@ -636,7 +657,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure APP_STORE_COMPLIANCE_PATCH="Mac/Resources/app-store-compliance.patch" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: applying default app store compliance patch" >&5 printf "%s\n" "applying default app store compliance patch" >&6; } -@@ -4598,6 +4710,72 @@ +@@ -4598,6 +4711,72 @@ ;; esac ;; @@ -709,7 +730,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure *-*-darwin*) case "$host_cpu" in arm*) -@@ -4688,9 +4866,15 @@ +@@ -4688,9 +4867,15 @@ define_xopen_source=no;; Darwin/[12][0-9].*) define_xopen_source=no;; @@ -726,7 +747,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from # defining NI_NUMERICHOST. QNX/6.3.2) -@@ -4753,9 +4937,13 @@ +@@ -4753,9 +4938,13 @@ CONFIGURE_MACOSX_DEPLOYMENT_TARGET= EXPORT_MACOSX_DEPLOYMENT_TARGET='#' @@ -741,7 +762,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure # checks for alternative programs # compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just -@@ -4794,6 +4982,16 @@ +@@ -4794,6 +4983,16 @@ as_fn_append CFLAGS " -mios-version-min=${IPHONEOS_DEPLOYMENT_TARGET}" as_fn_append LDFLAGS " -mios-version-min=${IPHONEOS_DEPLOYMENT_TARGET}" ;; #( @@ -758,7 +779,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure *) : ;; esac -@@ -7163,6 +7361,12 @@ +@@ -7163,6 +7362,12 @@ MULTIARCH="" ;; #( iOS) : MULTIARCH="" ;; #( @@ -771,7 +792,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure FreeBSD*) : MULTIARCH="" ;; #( *) : -@@ -7183,7 +7387,7 @@ +@@ -7183,7 +7388,7 @@ printf "%s\n" "$MULTIARCH" >&6; } case $ac_sys_system in #( @@ -780,7 +801,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure SOABI_PLATFORM=`echo "$PLATFORM_TRIPLET" | cut -d '-' -f2` ;; #( *) : SOABI_PLATFORM=$PLATFORM_TRIPLET -@@ -7234,6 +7438,18 @@ +@@ -7234,6 +7439,18 @@ PY_SUPPORT_TIER=3 ;; #( aarch64-apple-ios*/clang) : PY_SUPPORT_TIER=3 ;; #( @@ -799,7 +820,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure aarch64-*-linux-android/clang) : PY_SUPPORT_TIER=3 ;; #( x86_64-*-linux-android/clang) : -@@ -7670,7 +7886,7 @@ +@@ -7670,7 +7887,7 @@ case $ac_sys_system in Darwin) LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)';; @@ -808,7 +829,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure LDLIBRARY='$(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK)';; *) as_fn_error $? "Unknown platform for framework build" "$LINENO" 5;; -@@ -7736,7 +7952,7 @@ +@@ -7736,7 +7953,7 @@ BLDLIBRARY='-L. -lpython$(LDVERSION)' RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}} ;; @@ -817,7 +838,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure LDLIBRARY='libpython$(LDVERSION).dylib' ;; AIX*) -@@ -8444,15 +8660,18 @@ +@@ -8444,15 +8661,18 @@ if test "x$ac_cv_gcc_compat" = xyes then : @@ -839,7 +860,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -8582,15 +8801,18 @@ +@@ -8582,15 +8802,18 @@ case $ac_cv_cc_name in clang) LDFLAGS_NOLTO="-fno-lto" @@ -861,7 +882,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -8767,15 +8989,18 @@ +@@ -8767,15 +8990,18 @@ if test $Py_LTO_POLICY = default then # Check that ThinLTO is accepted. @@ -883,7 +904,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -8824,15 +9049,18 @@ +@@ -8824,15 +9050,18 @@ if test $Py_LTO_POLICY = default then # Check that ThinLTO is accepted @@ -905,7 +926,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -9109,15 +9337,18 @@ +@@ -9109,15 +9338,18 @@ # -fno-reorder-blocks-and-partition is required for bolt to work. # Possibly GCC only. @@ -927,7 +948,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -9765,15 +9996,18 @@ +@@ -9765,15 +9997,18 @@ if test "$enable_safety" = "yes" then @@ -949,7 +970,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -9807,15 +10041,18 @@ +@@ -9807,15 +10042,18 @@ esac fi @@ -971,7 +992,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -9849,15 +10086,18 @@ +@@ -9849,15 +10087,18 @@ esac fi @@ -993,7 +1014,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -9891,15 +10131,18 @@ +@@ -9891,15 +10132,18 @@ esac fi @@ -1015,7 +1036,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -9933,15 +10176,18 @@ +@@ -9933,15 +10177,18 @@ esac fi @@ -1037,7 +1058,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -9975,15 +10221,18 @@ +@@ -9975,15 +10222,18 @@ esac fi @@ -1059,7 +1080,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -10041,15 +10290,18 @@ +@@ -10041,15 +10291,18 @@ if test "$enable_slower_safety" = "yes" then @@ -1081,7 +1102,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -10650,15 +10902,18 @@ +@@ -10650,15 +10903,18 @@ # Error on unguarded use of new symbols, which will fail at runtime for # users on older versions of macOS @@ -1103,7 +1124,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -13341,15 +13596,18 @@ +@@ -13341,15 +13597,18 @@ withval=$with_memory_sanitizer; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5 printf "%s\n" "$withval" >&6; } @@ -1125,7 +1146,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -13544,7 +13802,7 @@ +@@ -13544,7 +13803,7 @@ BLDSHARED="$LDSHARED" fi ;; @@ -1134,7 +1155,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure LDSHARED='$(CC) -dynamiclib -F . -framework $(PYTHONFRAMEWORK)' LDCXXSHARED='$(CXX) -dynamiclib -F . -framework $(PYTHONFRAMEWORK)' BLDSHARED="$LDSHARED" -@@ -13677,7 +13935,7 @@ +@@ -13677,7 +13936,7 @@ Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";; Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";; # -u libsys_s pulls in all symbols in libsys @@ -1143,7 +1164,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure LINKFORSHARED="$extra_undefs -framework CoreFoundation" # Issue #18075: the default maximum stack size (8MBytes) is too -@@ -13701,7 +13959,7 @@ +@@ -13701,7 +13960,7 @@ LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' fi LINKFORSHARED="$LINKFORSHARED" @@ -1152,7 +1173,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure LINKFORSHARED="-Wl,-stack_size,$stack_size $LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK)' fi ;; -@@ -15286,7 +15544,7 @@ +@@ -15286,7 +15545,7 @@ ctypes_malloc_closure=yes ;; #( @@ -1161,7 +1182,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure ctypes_malloc_closure=yes ;; #( -@@ -19039,12 +19297,6 @@ +@@ -19039,12 +19298,6 @@ printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h fi @@ -1174,7 +1195,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero" if test "x$ac_cv_func_explicit_bzero" = xyes then : -@@ -19105,18 +19357,6 @@ +@@ -19105,18 +19358,6 @@ printf "%s\n" "#define HAVE_FEXECVE 1" >>confdefs.h fi @@ -1193,7 +1214,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure ac_fn_c_check_func "$LINENO" "fpathconf" "ac_cv_func_fpathconf" if test "x$ac_cv_func_fpathconf" = xyes then : -@@ -19543,24 +19783,6 @@ +@@ -19543,24 +19784,6 @@ printf "%s\n" "#define HAVE_POSIX_OPENPT 1" >>confdefs.h fi @@ -1218,7 +1239,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure ac_fn_c_check_func "$LINENO" "pread" "ac_cv_func_pread" if test "x$ac_cv_func_pread" = xyes then : -@@ -19867,12 +20089,6 @@ +@@ -19867,12 +20090,6 @@ printf "%s\n" "#define HAVE_SIGACTION 1" >>confdefs.h fi @@ -1231,7 +1252,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure ac_fn_c_check_func "$LINENO" "sigfillset" "ac_cv_func_sigfillset" if test "x$ac_cv_func_sigfillset" = xyes then : -@@ -20140,11 +20356,11 @@ +@@ -20140,11 +20357,11 @@ fi @@ -1245,7 +1266,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy" if test "x$ac_cv_func_getentropy" = xyes then : -@@ -20166,6 +20382,53 @@ +@@ -20166,6 +20383,53 @@ fi @@ -1299,7 +1320,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure { 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} -@@ -23248,8 +23511,9 @@ +@@ -23248,8 +23512,9 @@ # check for openpty, login_tty, and forkpty @@ -1310,7 +1331,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure for ac_func in openpty do : ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty" -@@ -23362,7 +23626,7 @@ +@@ -23362,7 +23627,7 @@ fi done @@ -1319,7 +1340,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure printf %s "checking for library containing login_tty... " >&6; } if test ${ac_cv_search_login_tty+y} then : -@@ -23545,6 +23809,7 @@ +@@ -23545,6 +23810,7 @@ fi done @@ -1327,7 +1348,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure # check for long file support functions ac_fn_c_check_func "$LINENO" "fseek64" "ac_cv_func_fseek64" -@@ -23810,10 +24075,10 @@ +@@ -23810,10 +24076,10 @@ done @@ -1340,7 +1361,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure then for ac_func in clock_settime -@@ -25236,10 +25501,10 @@ +@@ -25236,10 +25502,10 @@ then : @@ -1353,7 +1374,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure if test "$ax_cv_c_float_words_bigendian" = unknown; then ax_cv_c_float_words_bigendian=no else -@@ -26152,8 +26417,8 @@ +@@ -26152,8 +26418,8 @@ LIBPYTHON="\$(BLDLIBRARY)" fi @@ -1364,7 +1385,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure MODULE_DEPS_SHARED="$MODULE_DEPS_SHARED \$(PYTHONFRAMEWORKDIR)/\$(PYTHONFRAMEWORK)" fi -@@ -29023,7 +29288,7 @@ +@@ -29023,7 +29289,7 @@ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for device files" >&5 printf "%s\n" "$as_me: checking for device files" >&6;} @@ -1373,7 +1394,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure ac_cv_file__dev_ptmx=no ac_cv_file__dev_ptc=no else -@@ -29504,7 +29769,7 @@ +@@ -29504,7 +29770,7 @@ with_ensurepip=no ;; #( WASI) : with_ensurepip=no ;; #( @@ -1382,7 +1403,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure with_ensurepip=no ;; #( *) : with_ensurepip=upgrade -@@ -30484,7 +30749,7 @@ +@@ -30484,7 +30750,7 @@ ;; #( Darwin) : ;; #( @@ -1391,7 +1412,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure -@@ -32082,15 +32347,18 @@ +@@ -32082,15 +32348,18 @@ # Android. # The *mmintrin.h headers are x86-family-specific, so can't be used on WASI. if test "$ac_sys_system" != "Linux-android" -a "$ac_sys_system" != "WASI" || test "$ANDROID_API_LEVEL" -ge 28; then @@ -1413,7 +1434,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -32157,15 +32425,18 @@ +@@ -32157,15 +32426,18 @@ # (https://developer.android.com/ndk/guides/abis#86-64), this is safe because we do a # runtime CPUID check. if test "$ac_sys_system" != "Linux-android" -a "$ac_sys_system" != "WASI" || test "$ANDROID_API_LEVEL" -ge 28; then @@ -1435,18 +1456,19 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -34487,6 +34758,8 @@ +@@ -34487,6 +34759,9 @@ "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;; "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;; "iOS/Resources/Info.plist") CONFIG_FILES="$CONFIG_FILES iOS/Resources/Info.plist" ;; + "tvOS/Resources/Info.plist") CONFIG_FILES="$CONFIG_FILES tvOS/Resources/Info.plist" ;; + "watchOS/Resources/Info.plist") CONFIG_FILES="$CONFIG_FILES watchOS/Resources/Info.plist" ;; ++ "xrOS/Resources/Info.plist") CONFIG_FILES="$CONFIG_FILES xrOS/Resources/Info.plist" ;; "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;; "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;; "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;; diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac --- Python-3.14.0a6-orig/configure.ac 2025-03-14 10:05:02 -+++ Python-3.14.0a6/configure.ac 2025-04-12 21:36:22 ++++ Python-3.14.0a6/configure.ac 2025-04-12 21:46:50 @@ -330,6 +330,15 @@ *-apple-ios*) ac_sys_system=iOS @@ -1610,9 +1632,9 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac + + prefix=$PYTHONFRAMEWORKPREFIX + PYTHONFRAMEWORKINSTALLNAMEPREFIX="@rpath/$PYTHONFRAMEWORKDIR" -+ RESSRCDIR=watchOS/Resources ++ RESSRCDIR=xrOS/Resources + -+ ac_config_files="$ac_config_files xrOS/Resources/Info.plist" ++ AC_CONFIG_FILES([xrOS/Resources/Info.plist]) + ;; *) AC_MSG_ERROR([Unknown platform for framework build]) From 4f72f4b17fa8d798d23ace53406ccba4a28f623d Mon Sep 17 00:00:00 2001 From: John Zhou Date: Sat, 12 Apr 2025 21:10:01 -0500 Subject: [PATCH 12/22] remove some stuff --- patch/Python/Python.patch | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/patch/Python/Python.patch b/patch/Python/Python.patch index f83134eb..30cd00b2 100644 --- a/patch/Python/Python.patch +++ b/patch/Python/Python.patch @@ -379,16 +379,6 @@ diff -ur Python-3.14.0a6-orig/aclocal.m4 Python-3.14.0a6/aclocal.m4 AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) -@@ -475,6 +489,9 @@ - AC_MSG_RESULT([no]) - PKG_CONFIG="" - fi -+fi -+if test -z "$PKG_CONFIG"; then -+ m4_default([$2], [AC_MSG_ERROR([pkg-config not found])]) - fi[]dnl - ])dnl PKG_PROG_PKG_CONFIG - @@ -744,7 +761,7 @@ # AM_CONDITIONAL -*- Autoconf -*- @@ -442,16 +432,6 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure IPHONEOS_DEPLOYMENT_TARGET EXPORT_MACOSX_DEPLOYMENT_TARGET CONFIGURE_MACOSX_DEPLOYMENT_TARGET -@@ -4061,6 +4064,9 @@ - PKG_CONFIG="" - fi - fi -+if test -z "$PKG_CONFIG"; then -+ as_fn_error $? "pkg-config not found" "$LINENO" 5 -+fi - ;; #( - no) : - @@ -4100,6 +4106,15 @@ *-apple-ios*) ac_sys_system=iOS From 081f9d84831488c6ff291f20d9989915f0e32d8d Mon Sep 17 00:00:00 2001 From: John Zhou Date: Sat, 12 Apr 2025 23:10:02 -0500 Subject: [PATCH 13/22] upd patch --- patch/Python/Python.patch | 650 ++++++++++++++++++++------------------ 1 file changed, 339 insertions(+), 311 deletions(-) diff --git a/patch/Python/Python.patch b/patch/Python/Python.patch index 30cd00b2..8281db6d 100644 --- a/patch/Python/Python.patch +++ b/patch/Python/Python.patch @@ -1,8 +1,23 @@ -Only in Python-3.14.0a6: .DS_Store -diff -ur Python-3.14.0a6-orig/Lib/platform.py Python-3.14.0a6/Lib/platform.py ---- Python-3.14.0a6-orig/Lib/platform.py 2025-03-14 10:05:02 -+++ Python-3.14.0a6/Lib/platform.py 2025-04-12 20:43:35 -@@ -521,6 +521,78 @@ +diff --git a/.gitignore b/.gitignore +index 8872e9d5508..864eb355f3f 100644 +--- a/.gitignore ++++ b/.gitignore +@@ -80,6 +80,10 @@ iOS/testbed/Python.xcframework/ios-*/Python.framework + iOS/testbed/iOSTestbed.xcodeproj/project.xcworkspace + iOS/testbed/iOSTestbed.xcodeproj/xcuserdata + iOS/testbed/iOSTestbed.xcodeproj/xcshareddata ++tvOS/Frameworks ++tvOS/Resources/Info.plist ++watchOS/Frameworks ++watchOS/Resources/Info.plist + Mac/Makefile + Mac/PythonLauncher/Info.plist + Mac/PythonLauncher/Makefile +diff --git a/Lib/platform.py b/Lib/platform.py +index 1f6baed66d3..7e8bc9be04b 100644 +--- a/Lib/platform.py ++++ b/Lib/platform.py +@@ -521,6 +521,78 @@ def ios_ver(system="", release="", model="", is_simulator=False): return IOSVersionInfo(system, release, model, is_simulator) @@ -81,7 +96,7 @@ diff -ur Python-3.14.0a6-orig/Lib/platform.py Python-3.14.0a6/Lib/platform.py def _java_getprop(name, default): """This private helper is deprecated in 3.13 and will be removed in 3.15""" from java.lang import System -@@ -884,14 +956,30 @@ +@@ -884,14 +956,30 @@ def get_OpenVMS(): csid, cpu_number = vms_lib.getsyi('SYI$_CPU', 0) return 'Alpha' if cpu_number >= 128 else 'VAX' @@ -115,7 +130,7 @@ diff -ur Python-3.14.0a6-orig/Lib/platform.py Python-3.14.0a6/Lib/platform.py def from_subprocess(): """ Fall back to `uname -p` -@@ -1051,9 +1139,15 @@ +@@ -1051,9 +1139,15 @@ def uname(): system = 'Android' release = android_ver().release @@ -132,7 +147,7 @@ diff -ur Python-3.14.0a6-orig/Lib/platform.py Python-3.14.0a6/Lib/platform.py vals = system, node, release, version, machine # Replace 'unknown' values with the more portable '' -@@ -1343,6 +1437,12 @@ +@@ -1343,6 +1437,12 @@ def platform(aliased=False, terse=False): # macOS and iOS both report as a "Darwin" kernel if sys.platform == "ios": system, release, _, _ = ios_ver() @@ -145,10 +160,11 @@ diff -ur Python-3.14.0a6-orig/Lib/platform.py Python-3.14.0a6/Lib/platform.py else: macos_release = mac_ver()[0] if macos_release: -diff -ur Python-3.14.0a6-orig/Lib/sysconfig/__init__.py Python-3.14.0a6/Lib/sysconfig/__init__.py ---- Python-3.14.0a6-orig/Lib/sysconfig/__init__.py 2025-03-14 10:05:02 -+++ Python-3.14.0a6/Lib/sysconfig/__init__.py 2025-04-12 20:43:35 -@@ -719,6 +719,18 @@ +diff --git a/Lib/sysconfig/__init__.py b/Lib/sysconfig/__init__.py +index 18e6b8d25e5..28a491fe207 100644 +--- a/Lib/sysconfig/__init__.py ++++ b/Lib/sysconfig/__init__.py +@@ -719,6 +719,18 @@ def get_platform(): release = get_config_vars().get("IPHONEOS_DEPLOYMENT_TARGET", "13.0") osname = sys.platform machine = sys.implementation._multiarch @@ -167,55 +183,20 @@ diff -ur Python-3.14.0a6-orig/Lib/sysconfig/__init__.py Python-3.14.0a6/Lib/sysc else: import _osx_support osname, release, machine = _osx_support.get_platform_osx( -diff -ur Python-3.14.0a6-orig/Misc/platform_triplet.c Python-3.14.0a6/Misc/platform_triplet.c ---- Python-3.14.0a6-orig/Misc/platform_triplet.c 2025-03-14 10:05:02 -+++ Python-3.14.0a6/Misc/platform_triplet.c 2025-04-12 20:43:35 -@@ -257,6 +257,32 @@ - # else - PLATFORM_TRIPLET=arm64-iphoneos - # endif -+# elif defined(TARGET_OS_TV) && TARGET_OS_TV -+# if defined(TARGET_OS_SIMULATOR) && TARGET_OS_SIMULATOR -+# if __x86_64__ -+PLATFORM_TRIPLET=x86_64-appletvsimulator -+# else -+PLATFORM_TRIPLET=arm64-appletvsimulator -+# endif -+# else -+PLATFORM_TRIPLET=arm64-appletvos -+# endif -+# elif defined(TARGET_OS_WATCH) && TARGET_OS_WATCH -+# if defined(TARGET_OS_SIMULATOR) && TARGET_OS_SIMULATOR -+# if __x86_64__ -+PLATFORM_TRIPLET=x86_64-watchsimulator -+# else -+PLATFORM_TRIPLET=arm64-watchsimulator -+# endif -+# else -+PLATFORM_TRIPLET=arm64_32-watchos -+# endif -+# elif defined(TARGET_OS_VISION) && TARGET_OS_VISION -+# if defined(TARGET_OS_SIMULATOR) && TARGET_OS_SIMULATOR -+PLATFORM_TRIPLET=arm64-xrsimulator -+# else -+PLATFORM_TRIPLET=arm64_32-xros -+# endif - // Older macOS SDKs do not define TARGET_OS_OSX - # elif !defined(TARGET_OS_OSX) || TARGET_OS_OSX - PLATFORM_TRIPLET=darwin -diff -ur Python-3.14.0a6-orig/aclocal.m4 Python-3.14.0a6/aclocal.m4 ---- Python-3.14.0a6-orig/aclocal.m4 2025-03-14 10:05:02 -+++ Python-3.14.0a6/aclocal.m4 2025-04-12 21:47:08 +diff --git a/aclocal.m4 b/aclocal.m4 +index 920c2b38560..1d9e259fc07 100644 +--- a/aclocal.m4 ++++ b/aclocal.m4 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.16.5 -*- Autoconf -*- -+# generated automatically by aclocal 1.17 -*- Autoconf -*- ++# generated automatically by aclocal 1.16.2 -*- Autoconf -*- -# Copyright (C) 1996-2021 Free Software Foundation, Inc. -+# Copyright (C) 1996-2024 Free Software Foundation, Inc. ++# Copyright (C) 1996-2020 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, -@@ -44,12 +44,12 @@ +@@ -44,12 +44,12 @@ m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun # Early versions of this macro (i.e., before serial 12) would not work # when interprocedural optimization (via link-time optimization) was # enabled. This would happen when, say, the GCC/clang "-flto" flag, or the @@ -233,7 +214,7 @@ diff -ur Python-3.14.0a6-orig/aclocal.m4 Python-3.14.0a6/aclocal.m4 # # The solution to the above problem was to: # -@@ -68,19 +68,19 @@ +@@ -68,19 +68,19 @@ m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun # program binary that contains the value, which the macro can then find. # # How does the exit code depend on the special value residing in memory? @@ -246,6 +227,10 @@ diff -ur Python-3.14.0a6-orig/aclocal.m4 Python-3.14.0a6/aclocal.m4 -# computation to run time, and to prepare by allocating and populating the -# data segment with the special value. For further details, refer to the -# source code of the test program. +-# +-# Note that the test program is never meant to be run. It only exists to host +-# a double float value in a given platform's binary format. Thus, error +-# handling is not included. +# Memory, unlike variables and registers, can be addressed indirectly at +# run time. The exit code of this test program is a result of indirectly +# reading and writing to the memory region where the special value is @@ -255,17 +240,14 @@ diff -ur Python-3.14.0a6-orig/aclocal.m4 Python-3.14.0a6/aclocal.m4 +# but to defer the computation to run time, and to prepare by allocating +# and populating the data segment with the special value. For further +# details, refer to the source code of the test program. - # --# Note that the test program is never meant to be run. It only exists to host --# a double float value in a given platform's binary format. Thus, error --# handling is not included. ++# +# Note that the test program is never meant to be run. It only exists to +# host a double float value in a given platform's binary format. Thus, +# error handling is not included. # # LICENSE # -@@ -91,7 +91,7 @@ +@@ -91,7 +91,7 @@ m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun # and this notice are preserved. This file is offered as-is, without any # warranty. @@ -274,7 +256,7 @@ diff -ur Python-3.14.0a6-orig/aclocal.m4 Python-3.14.0a6/aclocal.m4 AC_DEFUN([AX_C_FLOAT_WORDS_BIGENDIAN], [AC_CACHE_CHECK(whether float word ordering is bigendian, -@@ -112,10 +112,10 @@ +@@ -112,10 +112,10 @@ int main (int argc, char *argv[]) ]])], [ @@ -287,7 +269,7 @@ diff -ur Python-3.14.0a6-orig/aclocal.m4 Python-3.14.0a6/aclocal.m4 if test "$ax_cv_c_float_words_bigendian" = unknown; then ax_cv_c_float_words_bigendian=no else -@@ -181,14 +181,24 @@ +@@ -181,14 +181,24 @@ esac # and this notice are preserved. This file is offered as-is, without any # warranty. @@ -315,7 +297,7 @@ diff -ur Python-3.14.0a6-orig/aclocal.m4 Python-3.14.0a6/aclocal.m4 AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], [AS_VAR_SET(CACHEVAR,[yes])], [AS_VAR_SET(CACHEVAR,[no])]) -@@ -224,7 +234,7 @@ +@@ -224,7 +234,7 @@ AS_VAR_POPDEF([CACHEVAR])dnl # and this notice are preserved. This file is offered as-is, without any # warranty. @@ -324,7 +306,7 @@ diff -ur Python-3.14.0a6-orig/aclocal.m4 Python-3.14.0a6/aclocal.m4 AU_ALIAS([AC_CHECK_DEFINED], [AC_CHECK_DEFINE]) AC_DEFUN([AC_CHECK_DEFINE],[ -@@ -264,8 +274,8 @@ +@@ -264,8 +274,8 @@ AC_CACHE_CHECK([for $2], ac_var, dnl AC_LANG_FUNC_LINK_TRY [AC_LINK_IFELSE([AC_LANG_PROGRAM([$1 #undef $2 @@ -335,7 +317,7 @@ diff -ur Python-3.14.0a6-orig/aclocal.m4 Python-3.14.0a6/aclocal.m4 return f != $2; ])], [AS_VAR_SET(ac_var, yes)], [AS_VAR_SET(ac_var, no)])]) -@@ -399,7 +409,7 @@ +@@ -399,7 +409,7 @@ AC_DEFUN([AX_CHECK_OPENSSL], [ ]) # pkg.m4 - Macros to locate and use pkg-config. -*- Autoconf -*- @@ -344,7 +326,7 @@ diff -ur Python-3.14.0a6-orig/aclocal.m4 Python-3.14.0a6/aclocal.m4 dnl Copyright © 2004 Scott James Remnant . dnl Copyright © 2012-2015 Dan Nicholson -@@ -415,9 +425,7 @@ +@@ -415,9 +425,7 @@ dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU dnl General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License @@ -355,7 +337,7 @@ diff -ur Python-3.14.0a6-orig/aclocal.m4 Python-3.14.0a6/aclocal.m4 dnl dnl As a special exception to the GNU General Public License, if you dnl distribute this file as part of a program that contains a -@@ -446,8 +454,8 @@ +@@ -446,8 +454,8 @@ m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) ])dnl PKG_PREREQ @@ -366,7 +348,7 @@ diff -ur Python-3.14.0a6-orig/aclocal.m4 Python-3.14.0a6/aclocal.m4 dnl Since: 0.16 dnl dnl Search for the pkg-config tool and set the PKG_CONFIG variable to -@@ -455,6 +463,12 @@ +@@ -455,6 +463,12 @@ dnl first found in the path. Checks that the version of pkg-config found dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is dnl used since that's the first version where most current features of dnl pkg-config existed. @@ -379,29 +361,39 @@ diff -ur Python-3.14.0a6-orig/aclocal.m4 Python-3.14.0a6/aclocal.m4 AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) -@@ -744,7 +761,7 @@ +@@ -475,6 +489,9 @@ if test -n "$PKG_CONFIG"; then + AC_MSG_RESULT([no]) + PKG_CONFIG="" + fi ++fi ++if test -z "$PKG_CONFIG"; then ++ m4_default([$2], [AC_MSG_ERROR([pkg-config not found])]) + fi[]dnl + ])dnl PKG_PROG_PKG_CONFIG + +@@ -744,7 +761,7 @@ AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"], # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2021 Free Software Foundation, Inc. -+# Copyright (C) 1997-2024 Free Software Foundation, Inc. ++# Copyright (C) 1997-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, -@@ -775,7 +792,7 @@ +@@ -775,7 +792,7 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 2006-2021 Free Software Foundation, Inc. -+# Copyright (C) 2006-2024 Free Software Foundation, Inc. ++# Copyright (C) 2006-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, -Only in Python-3.14.0a6: autom4te.cache -diff -ur Python-3.14.0a6-orig/config.sub Python-3.14.0a6/config.sub ---- Python-3.14.0a6-orig/config.sub 2025-03-14 10:05:02 -+++ Python-3.14.0a6/config.sub 2025-04-12 20:43:35 -@@ -1743,7 +1743,7 @@ +diff --git a/config.sub b/config.sub +index 1bb6a05dc11..e74b3e933ac 100755 +--- a/config.sub ++++ b/config.sub +@@ -1743,7 +1743,7 @@ case $os in | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \ | hiux* | abug | nacl* | netware* | windows* \ @@ -410,7 +402,7 @@ diff -ur Python-3.14.0a6-orig/config.sub Python-3.14.0a6/config.sub | mpw* | magic* | mmixware* | mon960* | lnews* \ | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ | aos* | aros* | cloudabi* | sortix* | twizzler* \ -@@ -1867,7 +1867,7 @@ +@@ -1867,7 +1867,7 @@ case $kernel-$os-$obj in ;; *-eabi*- | *-gnueabi*-) ;; @@ -419,10 +411,11 @@ diff -ur Python-3.14.0a6-orig/config.sub Python-3.14.0a6/config.sub ;; none--*) # None (no kernel, i.e. freestanding / bare metal), -diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure ---- Python-3.14.0a6-orig/configure 2025-03-14 10:05:02 -+++ Python-3.14.0a6/configure 2025-04-12 21:47:09 -@@ -974,6 +974,9 @@ +diff --git a/configure b/configure +index d0ae103014a..d0cdcc1e775 100755 +--- a/configure ++++ b/configure +@@ -974,6 +974,9 @@ LDFLAGS CFLAGS CC HAS_XCRUN @@ -432,7 +425,17 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure IPHONEOS_DEPLOYMENT_TARGET EXPORT_MACOSX_DEPLOYMENT_TARGET CONFIGURE_MACOSX_DEPLOYMENT_TARGET -@@ -4100,6 +4106,15 @@ +@@ -4060,6 +4063,9 @@ printf "%s\n" "yes" >&6; } + printf "%s\n" "no" >&6; } + PKG_CONFIG="" + fi ++fi ++if test -z "$PKG_CONFIG"; then ++ as_fn_error $? "pkg-config not found" "$LINENO" 5 + fi + ;; #( + no) : +@@ -4100,6 +4106,15 @@ then *-apple-ios*) ac_sys_system=iOS ;; @@ -448,7 +451,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure *-*-darwin*) ac_sys_system=Darwin ;; -@@ -4181,7 +4196,7 @@ +@@ -4181,7 +4196,7 @@ fi # On cross-compile builds, configure will look for a host-specific compiler by # prepending the user-provided host triple to the required binary name. # @@ -457,7 +460,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure # which isn't a binary that exists, and isn't very convenient, as it contains the # iOS version. As the default cross-compiler name won't exist, configure falls # back to gcc, which *definitely* won't work. We're providing wrapper scripts for -@@ -4196,6 +4211,17 @@ +@@ -4196,6 +4211,17 @@ if test -z "$AR"; then aarch64-apple-ios*-simulator) AR=arm64-apple-ios-simulator-ar ;; aarch64-apple-ios*) AR=arm64-apple-ios-ar ;; x86_64-apple-ios*-simulator) AR=x86_64-apple-ios-simulator-ar ;; @@ -475,7 +478,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure *) esac fi -@@ -4204,6 +4230,17 @@ +@@ -4204,6 +4230,17 @@ if test -z "$CC"; then aarch64-apple-ios*-simulator) CC=arm64-apple-ios-simulator-clang ;; aarch64-apple-ios*) CC=arm64-apple-ios-clang ;; x86_64-apple-ios*-simulator) CC=x86_64-apple-ios-simulator-clang ;; @@ -493,7 +496,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure *) esac fi -@@ -4212,6 +4249,17 @@ +@@ -4212,6 +4249,17 @@ if test -z "$CPP"; then aarch64-apple-ios*-simulator) CPP=arm64-apple-ios-simulator-cpp ;; aarch64-apple-ios*) CPP=arm64-apple-ios-cpp ;; x86_64-apple-ios*-simulator) CPP=x86_64-apple-ios-simulator-cpp ;; @@ -511,7 +514,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure *) esac fi -@@ -4220,6 +4268,17 @@ +@@ -4220,6 +4268,17 @@ if test -z "$CXX"; then aarch64-apple-ios*-simulator) CXX=arm64-apple-ios-simulator-clang++ ;; aarch64-apple-ios*) CXX=arm64-apple-ios-clang++ ;; x86_64-apple-ios*-simulator) CXX=x86_64-apple-ios-simulator-clang++ ;; @@ -529,7 +532,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure *) esac fi -@@ -4342,8 +4401,11 @@ +@@ -4342,8 +4401,11 @@ then : case $enableval in yes) case $ac_sys_system in @@ -543,7 +546,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure *) as_fn_error $? "Unknown platform for framework build" "$LINENO" 5 esac esac -@@ -4352,6 +4414,9 @@ +@@ -4352,6 +4414,9 @@ then : no) case $ac_sys_system in iOS) as_fn_error $? "iOS builds must use --enable-framework" "$LINENO" 5 ;; @@ -553,10 +556,11 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure *) PYTHONFRAMEWORK= PYTHONFRAMEWORKDIR=no-framework -@@ -4459,6 +4524,51 @@ +@@ -4458,6 +4523,51 @@ then : + ac_config_files="$ac_config_files iOS/Resources/Info.plist" - ;; ++ ;; + tvOS) : + FRAMEWORKINSTALLFIRST="frameworkinstallunversionedstructure" + FRAMEWORKALTINSTALLFIRST="frameworkinstallunversionedstructure " @@ -601,11 +605,10 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure + + ac_config_files="$ac_config_files xrOS/Resources/Info.plist" + -+ ;; + ;; *) as_fn_error $? "Unknown platform for framework build" "$LINENO" 5 - ;; -@@ -4469,6 +4579,9 @@ +@@ -4469,6 +4579,9 @@ else case e in #( e) case $ac_sys_system in iOS) as_fn_error $? "iOS builds must use --enable-framework" "$LINENO" 5 ;; @@ -615,7 +618,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure *) PYTHONFRAMEWORK= PYTHONFRAMEWORKDIR=no-framework -@@ -4523,8 +4636,8 @@ +@@ -4523,8 +4636,8 @@ then : case "$withval" in yes) case $ac_sys_system in @@ -626,7 +629,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure APP_STORE_COMPLIANCE_PATCH="Mac/Resources/app-store-compliance.patch" ;; *) as_fn_error $? "no default app store compliance patch available for $ac_sys_system" "$LINENO" 5 ;; -@@ -4542,8 +4655,8 @@ +@@ -4542,8 +4655,8 @@ printf "%s\n" "applying custom app store compliance patch" >&6; } else case e in #( e) case $ac_sys_system in @@ -637,7 +640,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure APP_STORE_COMPLIANCE_PATCH="Mac/Resources/app-store-compliance.patch" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: applying default app store compliance patch" >&5 printf "%s\n" "applying default app store compliance patch" >&6; } -@@ -4598,6 +4711,72 @@ +@@ -4598,6 +4711,72 @@ printf "%s\n" "$IPHONEOS_DEPLOYMENT_TARGET" >&6; } ;; esac ;; @@ -710,7 +713,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure *-*-darwin*) case "$host_cpu" in arm*) -@@ -4688,9 +4867,15 @@ +@@ -4688,9 +4867,15 @@ printf "%s\n" "#define _BSD_SOURCE 1" >>confdefs.h define_xopen_source=no;; Darwin/[12][0-9].*) define_xopen_source=no;; @@ -727,22 +730,20 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from # defining NI_NUMERICHOST. QNX/6.3.2) -@@ -4753,9 +4938,13 @@ +@@ -4753,7 +4938,11 @@ fi CONFIGURE_MACOSX_DEPLOYMENT_TARGET= EXPORT_MACOSX_DEPLOYMENT_TARGET='#' -# Record the value of IPHONEOS_DEPLOYMENT_TARGET enforced by the selected host triple. +# Record the value of IPHONEOS_DEPLOYMENT_TARGET / TVOS_DEPLOYMENT_TARGET / +# WATCHOS_DEPLOYMENT_TARGET / XROS_DEPLOYMENT_TARGET enforced by the selected host triple. - - + + + - # checks for alternative programs - # compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just -@@ -4794,6 +4983,16 @@ + + # checks for alternative programs +@@ -4794,6 +4983,16 @@ case $ac_sys_system in #( as_fn_append CFLAGS " -mios-version-min=${IPHONEOS_DEPLOYMENT_TARGET}" as_fn_append LDFLAGS " -mios-version-min=${IPHONEOS_DEPLOYMENT_TARGET}" ;; #( @@ -759,7 +760,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure *) : ;; esac -@@ -7163,6 +7362,12 @@ +@@ -7163,6 +7362,12 @@ case $ac_sys_system in #( MULTIARCH="" ;; #( iOS) : MULTIARCH="" ;; #( @@ -772,7 +773,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure FreeBSD*) : MULTIARCH="" ;; #( *) : -@@ -7183,7 +7388,7 @@ +@@ -7183,7 +7388,7 @@ fi printf "%s\n" "$MULTIARCH" >&6; } case $ac_sys_system in #( @@ -781,7 +782,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure SOABI_PLATFORM=`echo "$PLATFORM_TRIPLET" | cut -d '-' -f2` ;; #( *) : SOABI_PLATFORM=$PLATFORM_TRIPLET -@@ -7234,6 +7439,18 @@ +@@ -7234,6 +7439,18 @@ case $host/$ac_cv_cc_name in #( PY_SUPPORT_TIER=3 ;; #( aarch64-apple-ios*/clang) : PY_SUPPORT_TIER=3 ;; #( @@ -800,7 +801,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure aarch64-*-linux-android/clang) : PY_SUPPORT_TIER=3 ;; #( x86_64-*-linux-android/clang) : -@@ -7670,7 +7887,7 @@ +@@ -7670,7 +7887,7 @@ then case $ac_sys_system in Darwin) LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)';; @@ -809,7 +810,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure LDLIBRARY='$(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK)';; *) as_fn_error $? "Unknown platform for framework build" "$LINENO" 5;; -@@ -7736,7 +7953,7 @@ +@@ -7736,7 +7953,7 @@ printf "%s\n" "#define Py_ENABLE_SHARED 1" >>confdefs.h BLDLIBRARY='-L. -lpython$(LDVERSION)' RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}} ;; @@ -818,7 +819,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure LDLIBRARY='libpython$(LDVERSION).dylib' ;; AIX*) -@@ -8444,15 +8661,18 @@ +@@ -8444,15 +8661,18 @@ if test "$Py_OPT" = 'true' ; then if test "x$ac_cv_gcc_compat" = xyes then : @@ -840,7 +841,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -8582,15 +8802,18 @@ +@@ -8582,15 +8802,18 @@ if test "$Py_LTO" = 'true' ; then case $ac_cv_cc_name in clang) LDFLAGS_NOLTO="-fno-lto" @@ -862,7 +863,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -8767,15 +8990,18 @@ +@@ -8767,15 +8990,18 @@ printf "%s\n" "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;} if test $Py_LTO_POLICY = default then # Check that ThinLTO is accepted. @@ -884,7 +885,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -8824,15 +9050,18 @@ +@@ -8824,15 +9050,18 @@ fi if test $Py_LTO_POLICY = default then # Check that ThinLTO is accepted @@ -906,7 +907,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -9109,15 +9338,18 @@ +@@ -9109,15 +9338,18 @@ if test "$Py_BOLT" = 'true' ; then # -fno-reorder-blocks-and-partition is required for bolt to work. # Possibly GCC only. @@ -928,7 +929,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -9765,15 +9997,18 @@ +@@ -9765,15 +9997,18 @@ printf "%s\n" "$enable_safety" >&6; } if test "$enable_safety" = "yes" then @@ -950,7 +951,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -9807,15 +10042,18 @@ +@@ -9807,15 +10042,18 @@ printf "%s\n" "$as_me: WARNING: -fstack-protector-strong not supported" >&2;} ;; esac fi @@ -972,7 +973,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -9849,15 +10087,18 @@ +@@ -9849,15 +10087,18 @@ printf "%s\n" "$as_me: WARNING: -Wtrampolines not supported" >&2;} ;; esac fi @@ -994,7 +995,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -9891,15 +10132,18 @@ +@@ -9891,15 +10132,18 @@ printf "%s\n" "$as_me: WARNING: -Wimplicit-fallthrough not supported" >&2;} ;; esac fi @@ -1016,7 +1017,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -9933,15 +10177,18 @@ +@@ -9933,15 +10177,18 @@ printf "%s\n" "$as_me: WARNING: -Werror=format-security not supported" >&2;} ;; esac fi @@ -1038,7 +1039,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -9975,15 +10222,18 @@ +@@ -9975,15 +10222,18 @@ printf "%s\n" "$as_me: WARNING: -Wbidi-chars=any not supported" >&2;} ;; esac fi @@ -1060,7 +1061,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -10041,15 +10291,18 @@ +@@ -10041,15 +10291,18 @@ printf "%s\n" "$enable_slower_safety" >&6; } if test "$enable_slower_safety" = "yes" then @@ -1082,7 +1083,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -10650,15 +10903,18 @@ +@@ -10650,15 +10903,18 @@ printf "%s\n" "$CC" >&6; } # Error on unguarded use of new symbols, which will fail at runtime for # users on older versions of macOS @@ -1104,7 +1105,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -13341,15 +13597,18 @@ +@@ -13341,15 +13597,18 @@ then : withval=$with_memory_sanitizer; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5 printf "%s\n" "$withval" >&6; } @@ -1126,7 +1127,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -13544,7 +13803,7 @@ +@@ -13544,7 +13803,7 @@ then BLDSHARED="$LDSHARED" fi ;; @@ -1135,7 +1136,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure LDSHARED='$(CC) -dynamiclib -F . -framework $(PYTHONFRAMEWORK)' LDCXXSHARED='$(CXX) -dynamiclib -F . -framework $(PYTHONFRAMEWORK)' BLDSHARED="$LDSHARED" -@@ -13677,7 +13936,7 @@ +@@ -13677,7 +13936,7 @@ then Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";; Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";; # -u libsys_s pulls in all symbols in libsys @@ -1144,7 +1145,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure LINKFORSHARED="$extra_undefs -framework CoreFoundation" # Issue #18075: the default maximum stack size (8MBytes) is too -@@ -13701,7 +13960,7 @@ +@@ -13701,7 +13960,7 @@ printf "%s\n" "#define THREAD_STACK_SIZE 0x$stack_size" >>confdefs.h LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' fi LINKFORSHARED="$LINKFORSHARED" @@ -1153,7 +1154,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure LINKFORSHARED="-Wl,-stack_size,$stack_size $LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK)' fi ;; -@@ -15286,7 +15545,7 @@ +@@ -15286,7 +15545,7 @@ then : ctypes_malloc_closure=yes ;; #( @@ -1162,23 +1163,24 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure ctypes_malloc_closure=yes ;; #( -@@ -19039,12 +19298,6 @@ +@@ -19038,12 +19297,6 @@ if test "x$ac_cv_func_dup3" = xyes + then : printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h - fi +-fi -ac_fn_c_check_func "$LINENO" "execv" "ac_cv_func_execv" -if test "x$ac_cv_func_execv" = xyes -then : - printf "%s\n" "#define HAVE_EXECV 1" >>confdefs.h - --fi + fi ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero" if test "x$ac_cv_func_explicit_bzero" = xyes +@@ -19104,18 +19357,6 @@ if test "x$ac_cv_func_fexecve" = xyes then : -@@ -19105,18 +19358,6 @@ printf "%s\n" "#define HAVE_FEXECVE 1" >>confdefs.h - fi +-fi -ac_fn_c_check_func "$LINENO" "fork" "ac_cv_func_fork" -if test "x$ac_cv_func_fork" = xyes -then : @@ -1190,14 +1192,14 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure -then : - printf "%s\n" "#define HAVE_FORK1 1" >>confdefs.h - --fi + fi ac_fn_c_check_func "$LINENO" "fpathconf" "ac_cv_func_fpathconf" if test "x$ac_cv_func_fpathconf" = xyes +@@ -19542,24 +19783,6 @@ if test "x$ac_cv_func_posix_openpt" = xyes then : -@@ -19543,24 +19784,6 @@ printf "%s\n" "#define HAVE_POSIX_OPENPT 1" >>confdefs.h - fi +-fi -ac_fn_c_check_func "$LINENO" "posix_spawn" "ac_cv_func_posix_spawn" -if test "x$ac_cv_func_posix_spawn" = xyes -then : @@ -1215,24 +1217,23 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure -then : - printf "%s\n" "#define HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSEFROM_NP 1" >>confdefs.h - --fi + fi ac_fn_c_check_func "$LINENO" "pread" "ac_cv_func_pread" if test "x$ac_cv_func_pread" = xyes +@@ -19866,12 +20089,6 @@ if test "x$ac_cv_func_sigaction" = xyes then : -@@ -19867,12 +20090,6 @@ printf "%s\n" "#define HAVE_SIGACTION 1" >>confdefs.h - fi +-fi -ac_fn_c_check_func "$LINENO" "sigaltstack" "ac_cv_func_sigaltstack" -if test "x$ac_cv_func_sigaltstack" = xyes -then : - printf "%s\n" "#define HAVE_SIGALTSTACK 1" >>confdefs.h - --fi + fi ac_fn_c_check_func "$LINENO" "sigfillset" "ac_cv_func_sigfillset" if test "x$ac_cv_func_sigfillset" = xyes - then : -@@ -20140,11 +20357,11 @@ +@@ -20140,11 +20357,11 @@ fi fi @@ -1246,7 +1247,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy" if test "x$ac_cv_func_getentropy" = xyes then : -@@ -20166,6 +20383,53 @@ +@@ -20166,6 +20383,53 @@ fi fi @@ -1300,18 +1301,17 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure { 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} -@@ -23248,8 +23512,9 @@ +@@ -23248,7 +23512,8 @@ fi # check for openpty, login_tty, and forkpty +- +# tvOS/watchOS have functions for tty, but can't use them +if test "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "watchOS" -a "$ac_sys_system" != "xrOS"; then -- for ac_func in openpty do : - ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty" -@@ -23362,7 +23627,7 @@ +@@ -23362,7 +23627,7 @@ esac fi done @@ -1320,7 +1320,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure printf %s "checking for library containing login_tty... " >&6; } if test ${ac_cv_search_login_tty+y} then : -@@ -23545,6 +23810,7 @@ +@@ -23545,6 +23810,7 @@ esac fi done @@ -1328,7 +1328,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure # check for long file support functions ac_fn_c_check_func "$LINENO" "fseek64" "ac_cv_func_fseek64" -@@ -23810,10 +24076,10 @@ +@@ -23810,10 +24076,10 @@ fi done @@ -1341,7 +1341,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure then for ac_func in clock_settime -@@ -25236,10 +25502,10 @@ +@@ -25236,10 +25502,10 @@ if ac_fn_c_try_link "$LINENO" then : @@ -1354,7 +1354,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure if test "$ax_cv_c_float_words_bigendian" = unknown; then ax_cv_c_float_words_bigendian=no else -@@ -26152,8 +26418,8 @@ +@@ -26152,8 +26418,8 @@ if test "$PY_ENABLE_SHARED" = "1" && ( test -n "$ANDROID_API_LEVEL" || test "$MA LIBPYTHON="\$(BLDLIBRARY)" fi @@ -1365,7 +1365,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure MODULE_DEPS_SHARED="$MODULE_DEPS_SHARED \$(PYTHONFRAMEWORKDIR)/\$(PYTHONFRAMEWORK)" fi -@@ -29023,7 +29289,7 @@ +@@ -29023,7 +29289,7 @@ LIBS=$save_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for device files" >&5 printf "%s\n" "$as_me: checking for device files" >&6;} @@ -1374,7 +1374,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure ac_cv_file__dev_ptmx=no ac_cv_file__dev_ptc=no else -@@ -29504,7 +29770,7 @@ +@@ -29504,7 +29770,7 @@ else case e in #( with_ensurepip=no ;; #( WASI) : with_ensurepip=no ;; #( @@ -1383,7 +1383,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure with_ensurepip=no ;; #( *) : with_ensurepip=upgrade -@@ -30484,7 +30750,7 @@ +@@ -30484,7 +30750,7 @@ case $ac_sys_system in #( ;; #( Darwin) : ;; #( @@ -1392,7 +1392,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure -@@ -32082,15 +32348,18 @@ +@@ -32082,15 +32348,18 @@ esac # Android. # The *mmintrin.h headers are x86-family-specific, so can't be used on WASI. if test "$ac_sys_system" != "Linux-android" -a "$ac_sys_system" != "WASI" || test "$ANDROID_API_LEVEL" -ge 28; then @@ -1414,7 +1414,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -32157,15 +32426,18 @@ +@@ -32157,15 +32426,18 @@ fi # (https://developer.android.com/ndk/guides/abis#86-64), this is safe because we do a # runtime CPUID check. if test "$ac_sys_system" != "Linux-android" -a "$ac_sys_system" != "WASI" || test "$ANDROID_API_LEVEL" -ge 28; then @@ -1436,7 +1436,7 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -34487,6 +34759,9 @@ +@@ -34487,6 +34759,9 @@ do "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;; "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;; "iOS/Resources/Info.plist") CONFIG_FILES="$CONFIG_FILES iOS/Resources/Info.plist" ;; @@ -1446,10 +1446,11 @@ diff -ur Python-3.14.0a6-orig/configure Python-3.14.0a6/configure "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;; "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;; "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;; -diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac ---- Python-3.14.0a6-orig/configure.ac 2025-03-14 10:05:02 -+++ Python-3.14.0a6/configure.ac 2025-04-12 21:46:50 -@@ -330,6 +330,15 @@ +diff --git a/configure.ac b/configure.ac +index 8bb0f1c6ef4..3f1a5b51636 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -330,6 +330,15 @@ then *-apple-ios*) ac_sys_system=iOS ;; @@ -1465,7 +1466,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac *-*-darwin*) ac_sys_system=Darwin ;; -@@ -405,7 +414,7 @@ +@@ -405,7 +414,7 @@ AC_SUBST([host_exec_prefix]) # On cross-compile builds, configure will look for a host-specific compiler by # prepending the user-provided host triple to the required binary name. # @@ -1474,7 +1475,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac # which isn't a binary that exists, and isn't very convenient, as it contains the # iOS version. As the default cross-compiler name won't exist, configure falls # back to gcc, which *definitely* won't work. We're providing wrapper scripts for -@@ -420,6 +429,17 @@ +@@ -420,6 +429,17 @@ if test -z "$AR"; then aarch64-apple-ios*-simulator) AR=arm64-apple-ios-simulator-ar ;; aarch64-apple-ios*) AR=arm64-apple-ios-ar ;; x86_64-apple-ios*-simulator) AR=x86_64-apple-ios-simulator-ar ;; @@ -1492,7 +1493,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac *) esac fi -@@ -428,6 +448,17 @@ +@@ -428,6 +448,17 @@ if test -z "$CC"; then aarch64-apple-ios*-simulator) CC=arm64-apple-ios-simulator-clang ;; aarch64-apple-ios*) CC=arm64-apple-ios-clang ;; x86_64-apple-ios*-simulator) CC=x86_64-apple-ios-simulator-clang ;; @@ -1510,7 +1511,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac *) esac fi -@@ -436,6 +467,17 @@ +@@ -436,6 +467,17 @@ if test -z "$CPP"; then aarch64-apple-ios*-simulator) CPP=arm64-apple-ios-simulator-cpp ;; aarch64-apple-ios*) CPP=arm64-apple-ios-cpp ;; x86_64-apple-ios*-simulator) CPP=x86_64-apple-ios-simulator-cpp ;; @@ -1528,7 +1529,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac *) esac fi -@@ -444,6 +486,17 @@ +@@ -444,6 +486,17 @@ if test -z "$CXX"; then aarch64-apple-ios*-simulator) CXX=arm64-apple-ios-simulator-clang++ ;; aarch64-apple-ios*) CXX=arm64-apple-ios-clang++ ;; x86_64-apple-ios*-simulator) CXX=x86_64-apple-ios-simulator-clang++ ;; @@ -1546,7 +1547,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac *) esac fi -@@ -558,8 +611,11 @@ +@@ -558,8 +611,11 @@ AC_ARG_ENABLE([framework], case $enableval in yes) case $ac_sys_system in @@ -1560,7 +1561,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac *) AC_MSG_ERROR([Unknown platform for framework build]) esac esac -@@ -568,6 +624,9 @@ +@@ -568,6 +624,9 @@ AC_ARG_ENABLE([framework], no) case $ac_sys_system in iOS) AC_MSG_ERROR([iOS builds must use --enable-framework]) ;; @@ -1570,7 +1571,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac *) PYTHONFRAMEWORK= PYTHONFRAMEWORKDIR=no-framework -@@ -670,6 +729,48 @@ +@@ -670,6 +729,48 @@ AC_ARG_ENABLE([framework], AC_CONFIG_FILES([iOS/Resources/Info.plist]) ;; @@ -1619,7 +1620,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac *) AC_MSG_ERROR([Unknown platform for framework build]) ;; -@@ -678,6 +779,9 @@ +@@ -678,6 +779,9 @@ AC_ARG_ENABLE([framework], ],[ case $ac_sys_system in iOS) AC_MSG_ERROR([iOS builds must use --enable-framework]) ;; @@ -1629,7 +1630,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac *) PYTHONFRAMEWORK= PYTHONFRAMEWORKDIR=no-framework -@@ -730,8 +834,8 @@ +@@ -730,8 +834,8 @@ AC_ARG_WITH( case "$withval" in yes) case $ac_sys_system in @@ -1640,7 +1641,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac APP_STORE_COMPLIANCE_PATCH="Mac/Resources/app-store-compliance.patch" ;; *) AC_MSG_ERROR([no default app store compliance patch available for $ac_sys_system]) ;; -@@ -745,8 +849,8 @@ +@@ -745,8 +849,8 @@ AC_ARG_WITH( esac ],[ case $ac_sys_system in @@ -1651,7 +1652,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac APP_STORE_COMPLIANCE_PATCH="Mac/Resources/app-store-compliance.patch" AC_MSG_RESULT([applying default app store compliance patch]) ;; -@@ -794,6 +898,66 @@ +@@ -794,6 +898,66 @@ if test "$cross_compiling" = yes; then ;; esac ;; @@ -1718,7 +1719,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac *-*-darwin*) case "$host_cpu" in arm*) -@@ -883,9 +1047,15 @@ +@@ -883,9 +1047,15 @@ case $ac_sys_system/$ac_sys_release in define_xopen_source=no;; Darwin/@<:@[12]@:>@@<:@0-9@:>@.*) define_xopen_source=no;; @@ -1735,7 +1736,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from # defining NI_NUMERICHOST. QNX/6.3.2) -@@ -944,8 +1114,12 @@ +@@ -944,8 +1114,12 @@ AC_SUBST([EXPORT_MACOSX_DEPLOYMENT_TARGET]) CONFIGURE_MACOSX_DEPLOYMENT_TARGET= EXPORT_MACOSX_DEPLOYMENT_TARGET='#' @@ -1749,7 +1750,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac # checks for alternative programs -@@ -979,11 +1153,18 @@ +@@ -979,11 +1153,18 @@ AS_CASE([$host], ], ) @@ -1769,7 +1770,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac ], ) -@@ -1172,6 +1353,9 @@ +@@ -1172,6 +1353,9 @@ AC_MSG_CHECKING([for multiarch]) AS_CASE([$ac_sys_system], [Darwin*], [MULTIARCH=""], [iOS], [MULTIARCH=""], @@ -1779,7 +1780,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac [FreeBSD*], [MULTIARCH=""], [MULTIARCH=$($CC --print-multiarch 2>/dev/null)] ) -@@ -1193,7 +1377,7 @@ +@@ -1193,7 +1377,7 @@ dnl will have multiple sysconfig modules (one for each CPU architecture), but dnl use a single "fat" binary at runtime. SOABI_PLATFORM is the component of dnl the PLATFORM_TRIPLET that will be used in binary module extensions. AS_CASE([$ac_sys_system], @@ -1788,7 +1789,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac [SOABI_PLATFORM=$PLATFORM_TRIPLET] ) -@@ -1227,6 +1411,12 @@ +@@ -1227,6 +1411,12 @@ AS_CASE([$host/$ac_cv_cc_name], [x86_64-*-freebsd*/clang], [PY_SUPPORT_TIER=3], dnl FreeBSD on AMD64 [aarch64-apple-ios*-simulator/clang], [PY_SUPPORT_TIER=3], dnl iOS Simulator on arm64 [aarch64-apple-ios*/clang], [PY_SUPPORT_TIER=3], dnl iOS on ARM64 @@ -1801,7 +1802,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac [aarch64-*-linux-android/clang], [PY_SUPPORT_TIER=3], dnl Android on ARM64 [x86_64-*-linux-android/clang], [PY_SUPPORT_TIER=3], dnl Android on AMD64 -@@ -1536,7 +1726,7 @@ +@@ -1536,7 +1726,7 @@ then case $ac_sys_system in Darwin) LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)';; @@ -1810,7 +1811,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac LDLIBRARY='$(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK)';; *) AC_MSG_ERROR([Unknown platform for framework build]);; -@@ -1601,7 +1791,7 @@ +@@ -1601,7 +1791,7 @@ if test $enable_shared = "yes"; then BLDLIBRARY='-L. -lpython$(LDVERSION)' RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}} ;; @@ -1819,7 +1820,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac LDLIBRARY='libpython$(LDVERSION).dylib' ;; AIX*) -@@ -3456,7 +3646,7 @@ +@@ -3456,7 +3646,7 @@ then BLDSHARED="$LDSHARED" fi ;; @@ -1828,7 +1829,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac LDSHARED='$(CC) -dynamiclib -F . -framework $(PYTHONFRAMEWORK)' LDCXXSHARED='$(CXX) -dynamiclib -F . -framework $(PYTHONFRAMEWORK)' BLDSHARED="$LDSHARED" -@@ -3580,7 +3770,7 @@ +@@ -3580,7 +3770,7 @@ then Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";; Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";; # -u libsys_s pulls in all symbols in libsys @@ -1837,7 +1838,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac LINKFORSHARED="$extra_undefs -framework CoreFoundation" # Issue #18075: the default maximum stack size (8MBytes) is too -@@ -3604,7 +3794,7 @@ +@@ -3604,7 +3794,7 @@ then LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' fi LINKFORSHARED="$LINKFORSHARED" @@ -1846,7 +1847,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac LINKFORSHARED="-Wl,-stack_size,$stack_size $LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK)' fi ;; -@@ -4024,7 +4214,7 @@ +@@ -4024,7 +4214,7 @@ AS_VAR_IF([have_libffi], [yes], [ dnl when do we need USING_APPLE_OS_LIBFFI? ctypes_malloc_closure=yes ], @@ -1855,7 +1856,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac ctypes_malloc_closure=yes ], [sunos5], [AS_VAR_APPEND([LIBFFI_LIBS], [" -mimpure-text"])] -@@ -5133,9 +5323,9 @@ +@@ -5133,9 +5323,9 @@ fi # checks for library functions AC_CHECK_FUNCS([ \ accept4 alarm bind_textdomain_codeset chmod chown clock closefrom close_range confstr \ @@ -1867,7 +1868,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac gai_strerror getegid geteuid getgid getgrent getgrgid getgrgid_r \ getgrnam_r getgrouplist gethostname getitimer getloadavg getlogin \ getpeername getpgid getpid getppid getpriority _getpty \ -@@ -5143,8 +5333,7 @@ +@@ -5143,8 +5333,7 @@ AC_CHECK_FUNCS([ \ getspnam getuid getwd grantpt 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 \ @@ -1877,7 +1878,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac pread preadv preadv2 process_vm_readv \ pthread_cond_timedwait_relative_np pthread_condattr_setclock pthread_init \ pthread_kill pthread_getname_np pthread_setname_np pthread_getattr_np \ -@@ -5153,7 +5342,7 @@ +@@ -5153,7 +5342,7 @@ AC_CHECK_FUNCS([ \ sched_setparam sched_setscheduler sem_clockwait sem_getvalue sem_open \ sem_timedwait sem_unlink sendfile setegid seteuid setgid sethostname \ setitimer setlocale setpgid setpgrp setpriority setregid setresgid \ @@ -1886,7 +1887,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac sigfillset siginterrupt sigpending sigrelse sigtimedwait sigwait \ sigwaitinfo snprintf splice strftime strlcpy strsignal symlinkat sync \ sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile \ -@@ -5168,14 +5357,22 @@ +@@ -5168,12 +5357,20 @@ if test "$MACHDEP" != linux; then AC_CHECK_FUNCS([lchmod]) fi @@ -1899,23 +1900,35 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac - AC_CHECK_FUNCS([getentropy getgroups system]) +if test "$ac_sys_system" != "iOS" -a "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "watchOS" -a "$ac_sys_system" != "xrOS" ; then + AC_CHECK_FUNCS([ getentropy getgroups system ]) - fi - ++fi ++ +# tvOS/watchOS.xrOS have some additional methods that can be found, but not used. +if test "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "watchOS" -a "$ac_sys_system" != "xrOS"; then + AC_CHECK_FUNCS([ \ + execv fork fork1 posix_spawn posix_spawnp posix_spawn_file_actions_addclosefrom_np \ + sigaltstack \ + ]) -+fi -+ + fi + AC_CHECK_DECL([dirfd], - [AC_DEFINE([HAVE_DIRFD], [1], - [Define if you have the 'dirfd' function or macro.])], -@@ -5427,21 +5624,23 @@ +@@ -5427,20 +5624,22 @@ PY_CHECK_FUNC([setgroups], [ ]) # check for openpty, login_tty, and forkpty +- +-AC_CHECK_FUNCS([openpty], [], +- [AC_CHECK_LIB([util], [openpty], +- [AC_DEFINE([HAVE_OPENPTY]) LIBS="$LIBS -lutil"], +- [AC_CHECK_LIB([bsd], [openpty], +- [AC_DEFINE([HAVE_OPENPTY]) LIBS="$LIBS -lbsd"])])]) +-AC_SEARCH_LIBS([login_tty], [util], +- [AC_DEFINE([HAVE_LOGIN_TTY], [1], [Define to 1 if you have the `login_tty' function.])] +-) +-AC_CHECK_FUNCS([forkpty], [], +- [AC_CHECK_LIB([util], [forkpty], +- [AC_DEFINE([HAVE_FORKPTY]) LIBS="$LIBS -lutil"], +- [AC_CHECK_LIB([bsd], [forkpty], +- [AC_DEFINE([HAVE_FORKPTY]) LIBS="$LIBS -lbsd"])])]) +# tvOS/watchOS have functions for tty, but can't use them +if test "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "watchOS" -a "$ac_sys_system" != "xrOS"; then + AC_CHECK_FUNCS([openpty], [], @@ -1933,24 +1946,9 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac + [AC_DEFINE([HAVE_FORKPTY]) LIBS="$LIBS -lbsd"])])]) +fi --AC_CHECK_FUNCS([openpty], [], -- [AC_CHECK_LIB([util], [openpty], -- [AC_DEFINE([HAVE_OPENPTY]) LIBS="$LIBS -lutil"], -- [AC_CHECK_LIB([bsd], [openpty], -- [AC_DEFINE([HAVE_OPENPTY]) LIBS="$LIBS -lbsd"])])]) --AC_SEARCH_LIBS([login_tty], [util], -- [AC_DEFINE([HAVE_LOGIN_TTY], [1], [Define to 1 if you have the `login_tty' function.])] --) --AC_CHECK_FUNCS([forkpty], [], -- [AC_CHECK_LIB([util], [forkpty], -- [AC_DEFINE([HAVE_FORKPTY]) LIBS="$LIBS -lutil"], -- [AC_CHECK_LIB([bsd], [forkpty], -- [AC_DEFINE([HAVE_FORKPTY]) LIBS="$LIBS -lbsd"])])]) -- # check for long file support functions AC_CHECK_FUNCS([fseek64 fseeko fstatvfs ftell64 ftello statvfs]) - -@@ -5479,10 +5678,10 @@ +@@ -5479,10 +5678,10 @@ AC_CHECK_FUNCS([clock_getres], [], [ ]) ]) @@ -1963,7 +1961,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac then AC_CHECK_FUNCS([clock_settime], [], [ AC_CHECK_LIB([rt], [clock_settime], [ -@@ -6233,8 +6432,8 @@ +@@ -6233,8 +6432,8 @@ if test "$PY_ENABLE_SHARED" = "1" && ( test -n "$ANDROID_API_LEVEL" || test "$MA LIBPYTHON="\$(BLDLIBRARY)" fi @@ -1974,7 +1972,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac MODULE_DEPS_SHARED="$MODULE_DEPS_SHARED \$(PYTHONFRAMEWORKDIR)/\$(PYTHONFRAMEWORK)" fi -@@ -6893,7 +7092,7 @@ +@@ -6893,7 +7092,7 @@ AC_MSG_NOTICE([checking for device files]) dnl NOTE: Inform user how to proceed with files when cross compiling. dnl Some cross-compile builds are predictable; they won't ever dnl have /dev/ptmx or /dev/ptc, so we can set them explicitly. @@ -1983,7 +1981,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac ac_cv_file__dev_ptmx=no ac_cv_file__dev_ptc=no else -@@ -7174,7 +7373,7 @@ +@@ -7174,7 +7373,7 @@ AC_ARG_WITH([ensurepip], AS_CASE([$ac_sys_system], [Emscripten], [with_ensurepip=no], [WASI], [with_ensurepip=no], @@ -1992,7 +1990,7 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac [with_ensurepip=upgrade] ) ]) -@@ -7585,7 +7784,7 @@ +@@ -7585,7 +7784,7 @@ AS_CASE([$ac_sys_system], [VxWorks*], [PY_STDLIB_MOD_SET_NA([_scproxy], [termios], [grp])], dnl The _scproxy module is available on macOS [Darwin], [], @@ -2001,10 +1999,10 @@ diff -ur Python-3.14.0a6-orig/configure.ac Python-3.14.0a6/configure.ac dnl subprocess and multiprocessing are not supported (no fork syscall). dnl curses and tkinter user interface are not available. dnl gdbm and nis aren't available -Only in Python-3.14.0a6: configure~ -diff -ur Python-3.14.0a6-orig/iOS/Resources/Info.plist.in Python-3.14.0a6/iOS/Resources/Info.plist.in ---- Python-3.14.0a6-orig/iOS/Resources/Info.plist.in 2025-03-14 10:05:02 -+++ Python-3.14.0a6/iOS/Resources/Info.plist.in 2025-04-12 20:43:35 +diff --git a/iOS/Resources/Info.plist.in b/iOS/Resources/Info.plist.in +index c3e261ecd9e..26ef7a95de4 100644 +--- a/iOS/Resources/Info.plist.in ++++ b/iOS/Resources/Info.plist.in @@ -17,13 +17,13 @@ CFBundlePackageType FMWK @@ -2021,14 +2019,9 @@ diff -ur Python-3.14.0a6-orig/iOS/Resources/Info.plist.in Python-3.14.0a6/iOS/Re CFBundleSupportedPlatforms iPhoneOS -Only in Python-3.14.0a6: pyconfig.h.in~ -Only in Python-3.14.0a6: tvOS -Only in Python-3.14.0a6: watchOS -Only in Python-3.14.0a6: xrOS - diff --git a/tvOS/README.rst b/tvOS/README.rst new file mode 100644 -index 0000000..1f79325 +index 00000000000..1f793252caf --- /dev/null +++ b/tvOS/README.rst @@ -0,0 +1,108 @@ @@ -2142,7 +2135,7 @@ index 0000000..1f79325 +====================================== diff --git a/tvOS/Resources/Info.plist.in b/tvOS/Resources/Info.plist.in new file mode 100644 -index 0000000..ab30508 +index 00000000000..ab3050804b8 --- /dev/null +++ b/tvOS/Resources/Info.plist.in @@ -0,0 +1,34 @@ @@ -2181,96 +2174,96 @@ index 0000000..ab30508 + + diff --git a/tvOS/Resources/bin/arm64-apple-tvos-ar b/tvOS/Resources/bin/arm64-apple-tvos-ar -new file mode 100644 -index 0000000..e302748 +new file mode 100755 +index 00000000000..e302748a13c --- /dev/null +++ b/tvOS/Resources/bin/arm64-apple-tvos-ar @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk appletvos${TVOS_SDK_VERSION} ar "$@" diff --git a/tvOS/Resources/bin/arm64-apple-tvos-clang b/tvOS/Resources/bin/arm64-apple-tvos-clang -new file mode 100644 -index 0000000..bef66ed +new file mode 100755 +index 00000000000..bef66ed852e --- /dev/null +++ b/tvOS/Resources/bin/arm64-apple-tvos-clang @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk appletvos${TVOS_SDK_VERSION} clang -target arm64-apple-tvos "$@" diff --git a/tvOS/Resources/bin/arm64-apple-tvos-clang++ b/tvOS/Resources/bin/arm64-apple-tvos-clang++ -new file mode 100644 -index 0000000..04ca4df +new file mode 100755 +index 00000000000..04ca4df9ff0 --- /dev/null +++ b/tvOS/Resources/bin/arm64-apple-tvos-clang++ @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk appletvos${TVOS_SDK_VERSION} clang++ -target arm64-apple-tvos "$@" diff --git a/tvOS/Resources/bin/arm64-apple-tvos-cpp b/tvOS/Resources/bin/arm64-apple-tvos-cpp -new file mode 100644 -index 0000000..cb797b5 +new file mode 100755 +index 00000000000..cb797b5a530 --- /dev/null +++ b/tvOS/Resources/bin/arm64-apple-tvos-cpp @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk appletvos${TVOS_SDK_VERSION} clang -target arm64-apple-tvos -E "$@" diff --git a/tvOS/Resources/bin/arm64-apple-tvos-simulator-ar b/tvOS/Resources/bin/arm64-apple-tvos-simulator-ar -new file mode 100644 -index 0000000..87ef501 +new file mode 100755 +index 00000000000..87ef5015aae --- /dev/null +++ b/tvOS/Resources/bin/arm64-apple-tvos-simulator-ar @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk appletvsimulator${TVOS_SDK_VERSION} ar "$@" diff --git a/tvOS/Resources/bin/arm64-apple-tvos-simulator-clang b/tvOS/Resources/bin/arm64-apple-tvos-simulator-clang -new file mode 100644 -index 0000000..729f375 +new file mode 100755 +index 00000000000..729f3756fbc --- /dev/null +++ b/tvOS/Resources/bin/arm64-apple-tvos-simulator-clang @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk appletvsimulator${TVOS_SDK_VERSION} clang -target arm64-apple-tvos-simulator "$@" diff --git a/tvOS/Resources/bin/arm64-apple-tvos-simulator-clang++ b/tvOS/Resources/bin/arm64-apple-tvos-simulator-clang++ -new file mode 100644 -index 0000000..f98b36a +new file mode 100755 +index 00000000000..f98b36a6c8f --- /dev/null +++ b/tvOS/Resources/bin/arm64-apple-tvos-simulator-clang++ @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk appletvsimulator${TVOS_SDK_VERSION} clang++ -target arm64-apple-tvos-simulator "$@" diff --git a/tvOS/Resources/bin/arm64-apple-tvos-simulator-cpp b/tvOS/Resources/bin/arm64-apple-tvos-simulator-cpp -new file mode 100644 -index 0000000..4055526 +new file mode 100755 +index 00000000000..40555262ec2 --- /dev/null +++ b/tvOS/Resources/bin/arm64-apple-tvos-simulator-cpp @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk appletvsimulator${TVOS_SDK_VERSION} clang -target arm64-apple-tvos-simulator -E "$@" diff --git a/tvOS/Resources/bin/x86_64-apple-tvos-simulator-ar b/tvOS/Resources/bin/x86_64-apple-tvos-simulator-ar -new file mode 100644 -index 0000000..87ef501 +new file mode 100755 +index 00000000000..87ef5015aae --- /dev/null +++ b/tvOS/Resources/bin/x86_64-apple-tvos-simulator-ar @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk appletvsimulator${TVOS_SDK_VERSION} ar "$@" diff --git a/tvOS/Resources/bin/x86_64-apple-tvos-simulator-clang b/tvOS/Resources/bin/x86_64-apple-tvos-simulator-clang -new file mode 100644 -index 0000000..27b93b5 +new file mode 100755 +index 00000000000..27b93b55bd8 --- /dev/null +++ b/tvOS/Resources/bin/x86_64-apple-tvos-simulator-clang @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk appletvsimulator${TVOS_SDK_VERSION} clang -target x86_64-apple-tvos-simulator "$@" diff --git a/tvOS/Resources/bin/x86_64-apple-tvos-simulator-clang++ b/tvOS/Resources/bin/x86_64-apple-tvos-simulator-clang++ -new file mode 100644 -index 0000000..df08331 +new file mode 100755 +index 00000000000..df083314351 --- /dev/null +++ b/tvOS/Resources/bin/x86_64-apple-tvos-simulator-clang++ @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk appletvsimulator${TVOS_SDK_VERSION} clang++ -target x86_64-apple-tvos-simulator "$@" diff --git a/tvOS/Resources/bin/x86_64-apple-tvos-simulator-cpp b/tvOS/Resources/bin/x86_64-apple-tvos-simulator-cpp -new file mode 100644 -index 0000000..ad0c98a +new file mode 100755 +index 00000000000..ad0c98ac52c --- /dev/null +++ b/tvOS/Resources/bin/x86_64-apple-tvos-simulator-cpp @@ -0,0 +1,2 @@ @@ -2278,7 +2271,7 @@ index 0000000..ad0c98a +xcrun --sdk appletvsimulator${TVOS_SDK_VERSION} clang -target x86_64-apple-tvos-simulator -E "$@" diff --git a/tvOS/Resources/dylib-Info-template.plist b/tvOS/Resources/dylib-Info-template.plist new file mode 100644 -index 0000000..a20d476 +index 00000000000..a20d476fa7b --- /dev/null +++ b/tvOS/Resources/dylib-Info-template.plist @@ -0,0 +1,26 @@ @@ -2310,7 +2303,7 @@ index 0000000..a20d476 + diff --git a/tvOS/Resources/pyconfig.h b/tvOS/Resources/pyconfig.h new file mode 100644 -index 0000000..4acff2c +index 00000000000..4acff2c6051 --- /dev/null +++ b/tvOS/Resources/pyconfig.h @@ -0,0 +1,7 @@ @@ -2323,7 +2316,7 @@ index 0000000..4acff2c +#endif diff --git a/watchOS/README.rst b/watchOS/README.rst new file mode 100644 -index 0000000..3522147 +index 00000000000..35221478452 --- /dev/null +++ b/watchOS/README.rst @@ -0,0 +1,108 @@ @@ -2437,7 +2430,7 @@ index 0000000..3522147 +====================================== diff --git a/watchOS/Resources/Info.plist.in b/watchOS/Resources/Info.plist.in new file mode 100644 -index 0000000..e83ddfd +index 00000000000..e83ddfd2a43 --- /dev/null +++ b/watchOS/Resources/Info.plist.in @@ -0,0 +1,34 @@ @@ -2476,96 +2469,96 @@ index 0000000..e83ddfd + + diff --git a/watchOS/Resources/bin/arm64-apple-watchos-simulator-ar b/watchOS/Resources/bin/arm64-apple-watchos-simulator-ar -new file mode 100644 -index 0000000..dda2b21 +new file mode 100755 +index 00000000000..dda2b211bd5 --- /dev/null +++ b/watchOS/Resources/bin/arm64-apple-watchos-simulator-ar @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk watchsimulator${WATCHOS_SDK_VERSION} ar "$@" diff --git a/watchOS/Resources/bin/arm64-apple-watchos-simulator-clang b/watchOS/Resources/bin/arm64-apple-watchos-simulator-clang -new file mode 100644 -index 0000000..38c3de7 +new file mode 100755 +index 00000000000..38c3de7f86b --- /dev/null +++ b/watchOS/Resources/bin/arm64-apple-watchos-simulator-clang @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk watchsimulator${WATCHOS_SDK_VERSION} clang -target arm64-apple-watchos-simulator "$@" diff --git a/watchOS/Resources/bin/arm64-apple-watchos-simulator-clang++ b/watchOS/Resources/bin/arm64-apple-watchos-simulator-clang++ -new file mode 100644 -index 0000000..e25acb1 +new file mode 100755 +index 00000000000..e25acb1a52d --- /dev/null +++ b/watchOS/Resources/bin/arm64-apple-watchos-simulator-clang++ @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk watchsimulator${WATCHOS_SDK_VERSION} clang++ -target arm64-apple-watchos-simulator "$@" diff --git a/watchOS/Resources/bin/arm64-apple-watchos-simulator-cpp b/watchOS/Resources/bin/arm64-apple-watchos-simulator-cpp -new file mode 100644 -index 0000000..0503ed4 +new file mode 100755 +index 00000000000..0503ed40f64 --- /dev/null +++ b/watchOS/Resources/bin/arm64-apple-watchos-simulator-cpp @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk watchsimulator clang -target arm64-apple-watchos-simulator -E "$@" diff --git a/watchOS/Resources/bin/arm64_32-apple-watchos-ar b/watchOS/Resources/bin/arm64_32-apple-watchos-ar -new file mode 100644 -index 0000000..029f9a3 +new file mode 100755 +index 00000000000..029f9a32073 --- /dev/null +++ b/watchOS/Resources/bin/arm64_32-apple-watchos-ar @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk watchos${WATCHOS_SDK_VERSION} ar "$@" diff --git a/watchOS/Resources/bin/arm64_32-apple-watchos-clang b/watchOS/Resources/bin/arm64_32-apple-watchos-clang -new file mode 100644 -index 0000000..0c6a207 +new file mode 100755 +index 00000000000..0c6a20795e9 --- /dev/null +++ b/watchOS/Resources/bin/arm64_32-apple-watchos-clang @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk watchos${WATCHOS_SDK_VERSION} clang -target arm64_32-apple-watchos "$@" diff --git a/watchOS/Resources/bin/arm64_32-apple-watchos-clang++ b/watchOS/Resources/bin/arm64_32-apple-watchos-clang++ -new file mode 100644 -index 0000000..89da49a +new file mode 100755 +index 00000000000..89da49a1f78 --- /dev/null +++ b/watchOS/Resources/bin/arm64_32-apple-watchos-clang++ @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk watchos${WATCHOS_SDK_VERSION} clang++ -target arm64_32-apple-watchos "$@" diff --git a/watchOS/Resources/bin/arm64_32-apple-watchos-cpp b/watchOS/Resources/bin/arm64_32-apple-watchos-cpp -new file mode 100644 -index 0000000..1b91127 +new file mode 100755 +index 00000000000..1b911273f08 --- /dev/null +++ b/watchOS/Resources/bin/arm64_32-apple-watchos-cpp @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk watchos${WATCHOS_SDK_VERSION} clang -target arm64_32-apple-watchos -E "$@" diff --git a/watchOS/Resources/bin/x86_64-apple-watchos-simulator-ar b/watchOS/Resources/bin/x86_64-apple-watchos-simulator-ar -new file mode 100644 -index 0000000..dda2b21 +new file mode 100755 +index 00000000000..dda2b211bd5 --- /dev/null +++ b/watchOS/Resources/bin/x86_64-apple-watchos-simulator-ar @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk watchsimulator${WATCHOS_SDK_VERSION} ar "$@" diff --git a/watchOS/Resources/bin/x86_64-apple-watchos-simulator-clang b/watchOS/Resources/bin/x86_64-apple-watchos-simulator-clang -new file mode 100644 -index 0000000..185a8fb +new file mode 100755 +index 00000000000..185a8fb22e0 --- /dev/null +++ b/watchOS/Resources/bin/x86_64-apple-watchos-simulator-clang @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk watchsimulator${WATCHOS_SDK_VERSION} clang -target x86_64-apple-watchos-simulator "$@" diff --git a/watchOS/Resources/bin/x86_64-apple-watchos-simulator-clang++ b/watchOS/Resources/bin/x86_64-apple-watchos-simulator-clang++ -new file mode 100644 -index 0000000..d112772 +new file mode 100755 +index 00000000000..d1127720bb9 --- /dev/null +++ b/watchOS/Resources/bin/x86_64-apple-watchos-simulator-clang++ @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk watchsimulator${WATCHOS_SDK_VERSION} clang++ -target x86_64-apple-watchos-simulator "$@" diff --git a/watchOS/Resources/bin/x86_64-apple-watchos-simulator-cpp b/watchOS/Resources/bin/x86_64-apple-watchos-simulator-cpp -new file mode 100644 -index 0000000..bd436d8 +new file mode 100755 +index 00000000000..bd436d8a6c3 --- /dev/null +++ b/watchOS/Resources/bin/x86_64-apple-watchos-simulator-cpp @@ -0,0 +1,2 @@ @@ -2573,7 +2566,7 @@ index 0000000..bd436d8 +xcrun --sdk watchsimulator${WATCHOS_SDK_VERSION} clang -target x86_64-apple-watchos-simulator -E "$@" diff --git a/watchOS/Resources/dylib-Info-template.plist b/watchOS/Resources/dylib-Info-template.plist new file mode 100644 -index 0000000..6f8c0bc +index 00000000000..6f8c0bc2095 --- /dev/null +++ b/watchOS/Resources/dylib-Info-template.plist @@ -0,0 +1,26 @@ @@ -2605,7 +2598,7 @@ index 0000000..6f8c0bc + diff --git a/watchOS/Resources/pyconfig.h b/watchOS/Resources/pyconfig.h new file mode 100644 -index 0000000..f842b98 +index 00000000000..f842b987b2e --- /dev/null +++ b/watchOS/Resources/pyconfig.h @@ -0,0 +1,11 @@ @@ -2622,7 +2615,7 @@ index 0000000..f842b98 +#endif diff --git a/xrOS/Resources/Info.plist.in b/xrOS/Resources/Info.plist.in new file mode 100644 -index 0000000..d62cb35 +index 00000000000..d62cb35b1c4 --- /dev/null +++ b/xrOS/Resources/Info.plist.in @@ -0,0 +1,34 @@ @@ -2661,69 +2654,104 @@ index 0000000..d62cb35 + + diff --git a/xrOS/Resources/bin/arm64-apple-xros-simulator-ar b/xrOS/Resources/bin/arm64-apple-xros-simulator-ar -new file mode 100644 -index 0000000..b202330 +new file mode 100755 +index 00000000000..b202330fb5d --- /dev/null +++ b/xrOS/Resources/bin/arm64-apple-xros-simulator-ar @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk xrsimulator${XROS_SDK_VERSION} ar "$@" diff --git a/xrOS/Resources/bin/arm64-apple-xros-simulator-clang b/xrOS/Resources/bin/arm64-apple-xros-simulator-clang -new file mode 100644 -index 0000000..9aefb41 +new file mode 100755 +index 00000000000..9aefb41a7f1 --- /dev/null +++ b/xrOS/Resources/bin/arm64-apple-xros-simulator-clang @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk xrsimulator${XROS_SDK_VERSION} clang -target arm64-apple-xros-simulator "$@" diff --git a/xrOS/Resources/bin/arm64-apple-xros-simulator-clang++ b/xrOS/Resources/bin/arm64-apple-xros-simulator-clang++ -new file mode 100644 -index 0000000..3d25641 +new file mode 100755 +index 00000000000..3d256414b61 --- /dev/null +++ b/xrOS/Resources/bin/arm64-apple-xros-simulator-clang++ @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk xrsimulator${XROS_SDK_VERSION} clang++ -target arm64-apple-xros-simulator "$@" diff --git a/xrOS/Resources/bin/arm64-apple-xros-simulator-cpp b/xrOS/Resources/bin/arm64-apple-xros-simulator-cpp -new file mode 100644 -index 0000000..2e7be87 +new file mode 100755 +index 00000000000..2e7be877106 --- /dev/null +++ b/xrOS/Resources/bin/arm64-apple-xros-simulator-cpp @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk xrsimulator clang -target arm64-apple-xros-simulator -E "$@" -diff --git a/xrOS/Resources/bin/arm64-apple-xros-ar b/xrOS/Resources/bin/arm64-apple-xros-ar -new file mode 100644 -index 0000000..9fd78a2 +diff --git a/xrOS/Resources/bin/arm64_32-apple-xros-ar b/xrOS/Resources/bin/arm64_32-apple-xros-ar +new file mode 100755 +index 00000000000..9fd78a205f3 --- /dev/null -+++ b/xrOS/Resources/bin/arm64-apple-xros-ar ++++ b/xrOS/Resources/bin/arm64_32-apple-xros-ar @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk xros${XROS_SDK_VERSION} ar "$@" -diff --git a/xrOS/Resources/bin/arm64-apple-xros-clang b/xrOS/Resources/bin/arm64-apple-xros-clang -new file mode 100644 -index 0000000..5ac7a31 +diff --git a/xrOS/Resources/bin/arm64_32-apple-xros-clang b/xrOS/Resources/bin/arm64_32-apple-xros-clang +new file mode 100755 +index 00000000000..5ac7a312c66 --- /dev/null -+++ b/xrOS/Resources/bin/arm64-apple-xros-clang ++++ b/xrOS/Resources/bin/arm64_32-apple-xros-clang @@ -0,0 +1,2 @@ +#!/bin/bash -+xcrun --sdk xros${XROS_SDK_VERSION} clang -target arm64-apple-xros "$@" -diff --git a/xrOS/Resources/bin/arm64-apple-xros-clang++ b/xrOS/Resources/bin/arm64-apple-xros-clang++ -new file mode 100644 -index 0000000..35f1820 ++xcrun --sdk xros${XROS_SDK_VERSION} clang -target arm64_32-apple-xros "$@" +diff --git a/xrOS/Resources/bin/arm64_32-apple-xros-clang++ b/xrOS/Resources/bin/arm64_32-apple-xros-clang++ +new file mode 100755 +index 00000000000..35f1820a3e3 --- /dev/null -+++ b/xrOS/Resources/bin/arm64-apple-xros-clang++ ++++ b/xrOS/Resources/bin/arm64_32-apple-xros-clang++ @@ -0,0 +1,2 @@ +#!/bin/bash -+xcrun --sdk xros${XROS_SDK_VERSION} clang++ -target arm64-apple-xros "$@" -diff --git a/xrOS/Resources/bin/arm64-apple-xros-cpp b/xrOS/Resources/bin/arm64-apple-xros-cpp -new file mode 100644 -index 0000000..e34ba5d ++xcrun --sdk xros${XROS_SDK_VERSION} clang++ -target arm64_32-apple-xros "$@" +diff --git a/xrOS/Resources/bin/arm64_32-apple-xros-cpp b/xrOS/Resources/bin/arm64_32-apple-xros-cpp +new file mode 100755 +index 00000000000..e34ba5da0b1 --- /dev/null -+++ b/xrOS/Resources/bin/arm64-apple-xros-cpp ++++ b/xrOS/Resources/bin/arm64_32-apple-xros-cpp @@ -0,0 +1,2 @@ +#!/bin/bash -+xcrun --sdk xros${XROS_SDK_VERSION} clang -target arm64-apple-xros -E "$@" ++xcrun --sdk xros${XROS_SDK_VERSION} clang -target arm64_32-apple-xros -E "$@" +diff --git a/xrOS/Resources/bin/x86_64-apple-xros-simulator-ar b/xrOS/Resources/bin/x86_64-apple-xros-simulator-ar +new file mode 100755 +index 00000000000..b202330fb5d +--- /dev/null ++++ b/xrOS/Resources/bin/x86_64-apple-xros-simulator-ar +@@ -0,0 +1,2 @@ ++#!/bin/bash ++xcrun --sdk xrsimulator${XROS_SDK_VERSION} ar "$@" +diff --git a/xrOS/Resources/bin/x86_64-apple-xros-simulator-clang b/xrOS/Resources/bin/x86_64-apple-xros-simulator-clang +new file mode 100755 +index 00000000000..e094d172b53 +--- /dev/null ++++ b/xrOS/Resources/bin/x86_64-apple-xros-simulator-clang +@@ -0,0 +1,2 @@ ++#!/bin/bash ++xcrun --sdk xrsimulator${XROS_SDK_VERSION} clang -target x86_64-apple-xros-simulator "$@" +diff --git a/xrOS/Resources/bin/x86_64-apple-xros-simulator-clang++ b/xrOS/Resources/bin/x86_64-apple-xros-simulator-clang++ +new file mode 100755 +index 00000000000..f161ac780b8 +--- /dev/null ++++ b/xrOS/Resources/bin/x86_64-apple-xros-simulator-clang++ +@@ -0,0 +1,2 @@ ++#!/bin/bash ++xcrun --sdk xrsimulator${XROS_SDK_VERSION} clang++ -target x86_64-apple-xros-simulator "$@" +diff --git a/xrOS/Resources/bin/x86_64-apple-xros-simulator-cpp b/xrOS/Resources/bin/x86_64-apple-xros-simulator-cpp +new file mode 100755 +index 00000000000..38e4e3dc8b6 +--- /dev/null ++++ b/xrOS/Resources/bin/x86_64-apple-xros-simulator-cpp +@@ -0,0 +1,2 @@ ++#!/bin/bash ++xcrun --sdk xrsimulator${XROS_SDK_VERSION} clang -target x86_64-apple-xros-simulator -E "$@" +diff --git a/xrOS/Resources/dylib-Info-template.plist b/xrOS/Resources/dylib-Info-template.plist +new file mode 100644 +index 00000000000..f630cdb72b6 --- /dev/null +++ b/xrOS/Resources/dylib-Info-template.plist @@ -0,0 +1,26 @@ @@ -2755,7 +2783,7 @@ index 0000000..e34ba5d + diff --git a/xrOS/Resources/pyconfig.h b/xrOS/Resources/pyconfig.h new file mode 100644 -index 0000000..f842b98 +index 00000000000..f842b987b2e --- /dev/null +++ b/xrOS/Resources/pyconfig.h @@ -0,0 +1,11 @@ @@ -2769,4 +2797,4 @@ index 0000000..f842b98 + +#ifdef __x86_64__ +#include "pyconfig-x86_64.h" -+#endif \ No newline at end of file ++#endif From 691353715b553b8333e9a92bc8cc25b026aedeeb Mon Sep 17 00:00:00 2001 From: John Zhou Date: Mon, 14 Apr 2025 20:35:06 -0500 Subject: [PATCH 14/22] random stuff ig --- Makefile | 21 +- patch/Python/Python.patch | 1296 +++++++------------------ patch/Python/release.visionOS.exclude | 6 + 3 files changed, 366 insertions(+), 957 deletions(-) create mode 100644 patch/Python/release.visionOS.exclude diff --git a/Makefile b/Makefile index 262d8635..88affad5 100644 --- a/Makefile +++ b/Makefile @@ -34,28 +34,33 @@ OPENSSL_VERSION=3.0.16-1 XZ_VERSION=5.6.4-1 # Supported OS -OS_LIST=macOS iOS tvOS watchOS xrOS +OS_LIST=macOS iOS tvOS watchOS visionOS CURL_FLAGS=--disable --fail --location --create-dirs --progress-bar # macOS targets TARGETS-macOS=macosx.x86_64 macosx.arm64 +TRIPLE_OS-macOS=macos VERSION_MIN-macOS=11.0 # iOS targets TARGETS-iOS=iphonesimulator.x86_64 iphonesimulator.arm64 iphoneos.arm64 +TRIPLE_OS-iOS=ios VERSION_MIN-iOS=13.0 # tvOS targets TARGETS-tvOS=appletvsimulator.x86_64 appletvsimulator.arm64 appletvos.arm64 +TRIPLE_OS-tvOS=tvos VERSION_MIN-tvOS=12.0 # watchOS targets TARGETS-watchOS=watchsimulator.x86_64 watchsimulator.arm64 watchos.arm64_32 +TRIPLE_OS-watchOS=watchos VERSION_MIN-watchOS=4.0 -TARGETS-xrOS=xrsimulator.arm64 xros.arm64 -VERSION_MIN-xrOS=1.0 +TARGETS-visionOS=xrsimulator.arm64 xros.arm64 +TRIPLE_OS-visionOS=xros +VERSION_MIN-visionOS=2.0 # The architecture of the machine doing the build HOST_ARCH=$(shell uname -m) @@ -125,6 +130,7 @@ target=$1 os=$2 OS_LOWER-$(target)=$(shell echo $(os) | tr '[:upper:]' '[:lower:]') +TRIPLE_OS-$(target)=$$(TRIPLE_OS-$(os)) # $(target) can be broken up into is composed of $(SDK).$(ARCH) SDK-$(target)=$$(basename $(target)) @@ -132,10 +138,10 @@ ARCH-$(target)=$$(subst .,,$$(suffix $(target))) ifneq ($(os),macOS) ifeq ($$(findstring simulator,$$(SDK-$(target))),) -TARGET_TRIPLE-$(target)=$$(ARCH-$(target))-apple-$$(OS_LOWER-$(target))$$(VERSION_MIN-$(os)) +TARGET_TRIPLE-$(target)=$$(ARCH-$(target))-apple-$$(TRIPLE_OS-$(target))$$(VERSION_MIN-$(os)) IS_SIMULATOR-$(target)=False else -TARGET_TRIPLE-$(target)=$$(ARCH-$(target))-apple-$$(OS_LOWER-$(target))$$(VERSION_MIN-$(os))-simulator +TARGET_TRIPLE-$(target)=$$(ARCH-$(target))-apple-$$(TRIPLE_OS-$(target))$$(VERSION_MIN-$(os))-simulator IS_SIMULATOR-$(target)=True endif endif @@ -403,14 +409,15 @@ sdk=$1 os=$2 OS_LOWER-$(sdk)=$(shell echo $(os) | tr '[:upper:]' '[:lower:]') +TRIPLE_OS-$(sdk)=$$(TRIPLE_OS-$(os)) SDK_TARGETS-$(sdk)=$$(filter $(sdk).%,$$(TARGETS-$(os))) SDK_ARCHES-$(sdk)=$$(sort $$(subst .,,$$(suffix $$(SDK_TARGETS-$(sdk))))) ifeq ($$(findstring simulator,$(sdk)),) -SDK_SLICE-$(sdk)=$$(OS_LOWER-$(sdk))-$$(shell echo $$(SDK_ARCHES-$(sdk)) | sed "s/ /_/g") +SDK_SLICE-$(sdk)=$$(TRIPLE_OS-$(sdk))-$$(shell echo $$(SDK_ARCHES-$(sdk)) | sed "s/ /_/g") else -SDK_SLICE-$(sdk)=$$(OS_LOWER-$(sdk))-$$(shell echo $$(SDK_ARCHES-$(sdk)) | sed "s/ /_/g")-simulator +SDK_SLICE-$(sdk)=$$(TRIPLE_OS-$(sdk))-$$(shell echo $$(SDK_ARCHES-$(sdk)) | sed "s/ /_/g")-simulator endif # Expand the build-target macro for target on this OS diff --git a/patch/Python/Python.patch b/patch/Python/Python.patch index 8281db6d..1650da2f 100644 --- a/patch/Python/Python.patch +++ b/patch/Python/Python.patch @@ -1,20 +1,7 @@ -diff --git a/.gitignore b/.gitignore -index 8872e9d5508..864eb355f3f 100644 ---- a/.gitignore -+++ b/.gitignore -@@ -80,6 +80,10 @@ iOS/testbed/Python.xcframework/ios-*/Python.framework - iOS/testbed/iOSTestbed.xcodeproj/project.xcworkspace - iOS/testbed/iOSTestbed.xcodeproj/xcuserdata - iOS/testbed/iOSTestbed.xcodeproj/xcshareddata -+tvOS/Frameworks -+tvOS/Resources/Info.plist -+watchOS/Frameworks -+watchOS/Resources/Info.plist - Mac/Makefile - Mac/PythonLauncher/Info.plist - Mac/PythonLauncher/Makefile +Note -- gitignore is not in the source tree + diff --git a/Lib/platform.py b/Lib/platform.py -index 1f6baed66d3..7e8bc9be04b 100644 +index 1f6baed66d3..9ccac040250 100644 --- a/Lib/platform.py +++ b/Lib/platform.py @@ -521,6 +521,78 @@ def ios_ver(system="", release="", model="", is_simulator=False): @@ -69,28 +56,28 @@ index 1f6baed66d3..7e8bc9be04b 100644 + return WatchOSVersionInfo(system, release, model, is_simulator) + + -+# A namedtuple for xrOS version information. -+XrOSVersionInfo = collections.namedtuple( -+ "XrOSVersionInfo", ++# A namedtuple for visionOS version information. ++VisionOSVersionInfo = collections.namedtuple( ++ "VisionOSVersionInfo", + ["system", "release", "model", "is_simulator"] +) + + -+def xros_ver(system="", release="", model="", is_simulator=False): -+ """Get xrOS version information, and return it as a namedtuple: ++def visionos_ver(system="", release="", model="", is_simulator=False): ++ """Get visionOS version information, and return it as a namedtuple: + (system, release, model, is_simulator). + + If values can't be determined, they are set to values provided as + parameters. + """ -+ if sys.platform == "xros": ++ if sys.platform == "visionos": + # TODO: Can the iOS implementation be used here? + import _ios_support + result = _ios_support.get_platform_ios() + if result is not None: -+ return XrOSVersionInfo(*result) ++ return VisionOSVersionInfo(*result) + -+ return XrOSVersionInfo(system, release, model, is_simulator) ++ return VisionOSVersionInfo(system, release, model, is_simulator) + + def _java_getprop(name, default): @@ -103,7 +90,7 @@ index 1f6baed66d3..7e8bc9be04b 100644 - # On the iOS simulator, os.uname returns the architecture as uname.machine. - # On device it returns the model name for some reason; but there's only one - # CPU architecture for iOS devices, so we know the right answer. -+ # On the iOS/tvOS/watchOS/xrOS simulator, os.uname returns the architecture as ++ # On the iOS/tvOS/watchOS/visionOS simulator, os.uname returns the architecture as + # uname.machine. On device it returns the model name for some reason; but + # there's only one CPU architecture for devices, so we know the right + # answer. @@ -122,7 +109,7 @@ index 1f6baed66d3..7e8bc9be04b 100644 + return os.uname().machine + return 'arm64_32' + -+ def get_xros(): ++ def get_visionos(): + if sys.implementation._multiarch.endswith("simulator"): + return os.uname().machine + return 'arm64' @@ -142,8 +129,8 @@ index 1f6baed66d3..7e8bc9be04b 100644 + system, release, _, _ = tvos_ver() + if sys.platform == 'watchos': + system, release, _, _ = watchos_ver() -+ if sys.platform == 'xros': -+ system, release, _, _ = xros_ver() ++ if sys.platform == 'visionos': ++ system, release, _, _ = visionos_ver() vals = system, node, release, version, machine # Replace 'unknown' values with the more portable '' @@ -155,13 +142,13 @@ index 1f6baed66d3..7e8bc9be04b 100644 + system, release, _, _ = tvos_ver() + elif sys.platform == "watchos": + system, release, _, _ = watchos_ver() -+ elif sys.platform == "xros": -+ system, release, _, _ = xros_ver() ++ elif sys.platform == "visionos": ++ system, release, _, _ = visionos_ver() else: macos_release = mac_ver()[0] if macos_release: diff --git a/Lib/sysconfig/__init__.py b/Lib/sysconfig/__init__.py -index 18e6b8d25e5..28a491fe207 100644 +index 18e6b8d25e5..8a8ec696510 100644 --- a/Lib/sysconfig/__init__.py +++ b/Lib/sysconfig/__init__.py @@ -719,6 +719,18 @@ def get_platform(): @@ -176,221 +163,52 @@ index 18e6b8d25e5..28a491fe207 100644 + release = get_config_vars().get("WATCHOS_DEPLOYMENT_TARGET", "4.0") + osname = sys.platform + machine = sys.implementation._multiarch -+ elif sys.platform == "xros": -+ release = get_config_vars().get("XROS_DEPLOYMENT_TARGET", "4.0") ++ elif sys.platform == "visionos": ++ release = get_config_vars().get("XROS_DEPLOYMENT_TARGET", "2.0") + osname = sys.platform + machine = sys.implementation._multiarch else: import _osx_support osname, release, machine = _osx_support.get_platform_osx( -diff --git a/aclocal.m4 b/aclocal.m4 -index 920c2b38560..1d9e259fc07 100644 ---- a/aclocal.m4 -+++ b/aclocal.m4 -@@ -1,6 +1,6 @@ --# generated automatically by aclocal 1.16.5 -*- Autoconf -*- -+# generated automatically by aclocal 1.16.2 -*- Autoconf -*- - --# Copyright (C) 1996-2021 Free Software Foundation, Inc. -+# Copyright (C) 1996-2020 Free Software Foundation, Inc. - - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -44,12 +44,12 @@ m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun - # Early versions of this macro (i.e., before serial 12) would not work - # when interprocedural optimization (via link-time optimization) was - # enabled. This would happen when, say, the GCC/clang "-flto" flag, or the --# ICC "-ipo" flag was used, for example. The problem was that under --# these conditions, the compiler did not allocate for and write the special -+# ICC "-ipo" flag was used, for example. The problem was that under these -+# conditions, the compiler did not allocate for and write the special - # float value in the data segment of the object file, since doing so might --# not prove optimal once more context was available. Thus, the special value --# (in platform-dependent binary form) could not be found in the object file, --# and the macro would fail. -+# not prove optimal once more context was available. Thus, the special -+# value (in platform-dependent binary form) could not be found in the -+# object file, and the macro would fail. - # - # The solution to the above problem was to: - # -@@ -68,19 +68,19 @@ m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun - # program binary that contains the value, which the macro can then find. - # - # How does the exit code depend on the special value residing in memory? --# Memory, unlike variables and registers, can be addressed indirectly at run --# time. The exit code of this test program is a result of indirectly reading --# and writing to the memory region where the special value is supposed to --# reside. The actual memory addresses used and the values to be written are --# derived from the the program input ("argv") and are therefore not known at --# compile or link time. The compiler has no choice but to defer the --# computation to run time, and to prepare by allocating and populating the --# data segment with the special value. For further details, refer to the --# source code of the test program. --# --# Note that the test program is never meant to be run. It only exists to host --# a double float value in a given platform's binary format. Thus, error --# handling is not included. -+# Memory, unlike variables and registers, can be addressed indirectly at -+# run time. The exit code of this test program is a result of indirectly -+# reading and writing to the memory region where the special value is -+# supposed to reside. The actual memory addresses used and the values to -+# be written are derived from the the program input ("argv") and are -+# therefore not known at compile or link time. The compiler has no choice -+# but to defer the computation to run time, and to prepare by allocating -+# and populating the data segment with the special value. For further -+# details, refer to the source code of the test program. -+# -+# Note that the test program is never meant to be run. It only exists to -+# host a double float value in a given platform's binary format. Thus, -+# error handling is not included. - # - # LICENSE - # -@@ -91,7 +91,7 @@ m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun - # and this notice are preserved. This file is offered as-is, without any - # warranty. - --#serial 14 -+#serial 13 - - AC_DEFUN([AX_C_FLOAT_WORDS_BIGENDIAN], - [AC_CACHE_CHECK(whether float word ordering is bigendian, -@@ -112,10 +112,10 @@ int main (int argc, char *argv[]) - - ]])], [ - --if grep noonsees conftest* > /dev/null ; then -+if grep noonsees conftest$EXEEXT >/dev/null ; then - ax_cv_c_float_words_bigendian=yes - fi --if grep seesnoon conftest* >/dev/null ; then -+if grep seesnoon conftest$EXEEXT >/dev/null ; then - if test "$ax_cv_c_float_words_bigendian" = unknown; then - ax_cv_c_float_words_bigendian=no - else -@@ -181,14 +181,24 @@ esac - # and this notice are preserved. This file is offered as-is, without any - # warranty. - --#serial 6 -+#serial 11 - - AC_DEFUN([AX_CHECK_COMPILE_FLAG], - [AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF - AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl --AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [ -+AC_CACHE_CHECK([whether the _AC_LANG compiler accepts $1], CACHEVAR, [ - ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS -- _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1" -+ if test x"m4_case(_AC_LANG, -+ [C], [$GCC], -+ [C++], [$GXX], -+ [Fortran], [$GFC], -+ [Fortran 77], [$G77], -+ [Objective C], [$GOBJC], -+ [Objective C++], [$GOBJCXX], -+ [no])" = xyes ; then -+ add_gnu_werror="-Werror" -+ fi -+ _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1 $add_gnu_werror" - AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], - [AS_VAR_SET(CACHEVAR,[yes])], - [AS_VAR_SET(CACHEVAR,[no])]) -@@ -224,7 +234,7 @@ AS_VAR_POPDEF([CACHEVAR])dnl - # and this notice are preserved. This file is offered as-is, without any - # warranty. - --#serial 11 -+#serial 12 - - AU_ALIAS([AC_CHECK_DEFINED], [AC_CHECK_DEFINE]) - AC_DEFUN([AC_CHECK_DEFINE],[ -@@ -264,8 +274,8 @@ AC_CACHE_CHECK([for $2], ac_var, - dnl AC_LANG_FUNC_LINK_TRY - [AC_LINK_IFELSE([AC_LANG_PROGRAM([$1 - #undef $2 -- char $2 ();],[ -- char (*f) () = $2; -+ char $2 (void);],[ -+ char (*f) (void) = $2; - return f != $2; ])], - [AS_VAR_SET(ac_var, yes)], - [AS_VAR_SET(ac_var, no)])]) -@@ -399,7 +409,7 @@ AC_DEFUN([AX_CHECK_OPENSSL], [ - ]) - - # pkg.m4 - Macros to locate and use pkg-config. -*- Autoconf -*- --# serial 12 (pkg-config-0.29.2) -+# serial 13 (pkgconf) - - dnl Copyright © 2004 Scott James Remnant . - dnl Copyright © 2012-2015 Dan Nicholson -@@ -415,9 +425,7 @@ dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - dnl General Public License for more details. - dnl - dnl You should have received a copy of the GNU General Public License --dnl along with this program; if not, write to the Free Software --dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA --dnl 02111-1307, USA. -+dnl along with this program; if not, see . - dnl - dnl As a special exception to the GNU General Public License, if you - dnl distribute this file as part of a program that contains a -@@ -446,8 +454,8 @@ m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, - [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) - ])dnl PKG_PREREQ - --dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) --dnl ---------------------------------- -+dnl PKG_PROG_PKG_CONFIG([MIN-VERSION], [ACTION-IF-NOT-FOUND]) -+dnl --------------------------------------------------------- - dnl Since: 0.16 - dnl - dnl Search for the pkg-config tool and set the PKG_CONFIG variable to -@@ -455,6 +463,12 @@ dnl first found in the path. Checks that the version of pkg-config found - dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is - dnl used since that's the first version where most current features of - dnl pkg-config existed. -+dnl -+dnl If pkg-config is not found or older than specified, it will result -+dnl in an empty PKG_CONFIG variable. To avoid widespread issues with -+dnl scripts not checking it, ACTION-IF-NOT-FOUND defaults to aborting. -+dnl You can specify [PKG_CONFIG=false] as an action instead, which would -+dnl result in pkg-config tests failing, but no bogus error messages. - AC_DEFUN([PKG_PROG_PKG_CONFIG], - [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) - m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) -@@ -475,6 +489,9 @@ if test -n "$PKG_CONFIG"; then - AC_MSG_RESULT([no]) - PKG_CONFIG="" - fi -+fi -+if test -z "$PKG_CONFIG"; then -+ m4_default([$2], [AC_MSG_ERROR([pkg-config not found])]) - fi[]dnl - ])dnl PKG_PROG_PKG_CONFIG - -@@ -744,7 +761,7 @@ AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"], - - # AM_CONDITIONAL -*- Autoconf -*- - --# Copyright (C) 1997-2021 Free Software Foundation, Inc. -+# Copyright (C) 1997-2020 Free Software Foundation, Inc. - # - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -775,7 +792,7 @@ AC_CONFIG_COMMANDS_PRE( - Usually this means the macro was only invoked conditionally.]]) - fi])]) - --# Copyright (C) 2006-2021 Free Software Foundation, Inc. -+# Copyright (C) 2006-2020 Free Software Foundation, Inc. - # - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, +diff --git a/Misc/platform_triplet.c b/Misc/platform_triplet.c +index ec0857a4a99..e52f486cdb3 100644 +--- a/Misc/platform_triplet.c ++++ b/Misc/platform_triplet.c +@@ -257,6 +257,32 @@ PLATFORM_TRIPLET=arm64-iphonesimulator + # else + PLATFORM_TRIPLET=arm64-iphoneos + # endif ++# elif defined(TARGET_OS_TV) && TARGET_OS_TV ++# if defined(TARGET_OS_SIMULATOR) && TARGET_OS_SIMULATOR ++# if __x86_64__ ++PLATFORM_TRIPLET=x86_64-appletvsimulator ++# else ++PLATFORM_TRIPLET=arm64-appletvsimulator ++# endif ++# else ++PLATFORM_TRIPLET=arm64-appletvos ++# endif ++# elif defined(TARGET_OS_WATCH) && TARGET_OS_WATCH ++# if defined(TARGET_OS_SIMULATOR) && TARGET_OS_SIMULATOR ++# if __x86_64__ ++PLATFORM_TRIPLET=x86_64-watchsimulator ++# else ++PLATFORM_TRIPLET=arm64-watchsimulator ++# endif ++# else ++PLATFORM_TRIPLET=arm64_32-watchos ++# endif ++# elif defined(TARGET_OS_VISION) && TARGET_OS_VISION ++# if defined(TARGET_OS_SIMULATOR) && TARGET_OS_SIMULATOR ++PLATFORM_TRIPLET=arm64-xrsimulator ++# else ++PLATFORM_TRIPLET=arm64-xros ++# endif + // Older macOS SDKs do not define TARGET_OS_OSX + # elif !defined(TARGET_OS_OSX) || TARGET_OS_OSX + PLATFORM_TRIPLET=darwin diff --git a/config.sub b/config.sub -index 1bb6a05dc11..e74b3e933ac 100755 +index 1bb6a05dc11..49febd56a37 100755 --- a/config.sub +++ b/config.sub @@ -1743,7 +1743,7 @@ case $os in @@ -407,12 +225,12 @@ index 1bb6a05dc11..e74b3e933ac 100755 *-eabi*- | *-gnueabi*-) ;; - ios*-simulator- | tvos*-simulator- | watchos*-simulator- ) -+ ios*-simulator- | tvos*-simulator- | watchos*-simulator- | xros*-simulator- ) ++ ios*-simulator- | tvos*-simulator- | watchos*-simulator- | xros*-simulator-) ;; none--*) # None (no kernel, i.e. freestanding / bare metal), diff --git a/configure b/configure -index d0ae103014a..d0cdcc1e775 100755 +index d0ae103014a..2dcc106da53 100755 --- a/configure +++ b/configure @@ -974,6 +974,9 @@ LDFLAGS @@ -425,17 +243,7 @@ index d0ae103014a..d0cdcc1e775 100755 IPHONEOS_DEPLOYMENT_TARGET EXPORT_MACOSX_DEPLOYMENT_TARGET CONFIGURE_MACOSX_DEPLOYMENT_TARGET -@@ -4060,6 +4063,9 @@ printf "%s\n" "yes" >&6; } - printf "%s\n" "no" >&6; } - PKG_CONFIG="" - fi -+fi -+if test -z "$PKG_CONFIG"; then -+ as_fn_error $? "pkg-config not found" "$LINENO" 5 - fi - ;; #( - no) : -@@ -4100,6 +4106,15 @@ then +@@ -4100,6 +4103,15 @@ then *-apple-ios*) ac_sys_system=iOS ;; @@ -446,21 +254,21 @@ index d0ae103014a..d0cdcc1e775 100755 + ac_sys_system=watchOS + ;; + *-apple-xros*) -+ ac_sys_system=xrOS ++ ac_sys_system=visionOS + ;; *-*-darwin*) ac_sys_system=Darwin ;; -@@ -4181,7 +4196,7 @@ fi +@@ -4181,7 +4193,7 @@ fi # On cross-compile builds, configure will look for a host-specific compiler by # prepending the user-provided host triple to the required binary name. # -# On iOS, this results in binaries like "arm64-apple-ios13.0-simulator-gcc", -+# On iOS/tvOS/watchOS/xrOS, this results in binaries like "arm64-apple-ios13.0-simulator-gcc", ++# On iOS/tvOS/watchOS/visionOS, this results in binaries like "arm64-apple-ios13.0-simulator-gcc", # which isn't a binary that exists, and isn't very convenient, as it contains the # iOS version. As the default cross-compiler name won't exist, configure falls # back to gcc, which *definitely* won't work. We're providing wrapper scripts for -@@ -4196,6 +4211,17 @@ if test -z "$AR"; then +@@ -4196,6 +4208,17 @@ if test -z "$AR"; then aarch64-apple-ios*-simulator) AR=arm64-apple-ios-simulator-ar ;; aarch64-apple-ios*) AR=arm64-apple-ios-ar ;; x86_64-apple-ios*-simulator) AR=x86_64-apple-ios-simulator-ar ;; @@ -478,7 +286,7 @@ index d0ae103014a..d0cdcc1e775 100755 *) esac fi -@@ -4204,6 +4230,17 @@ if test -z "$CC"; then +@@ -4204,6 +4227,17 @@ if test -z "$CC"; then aarch64-apple-ios*-simulator) CC=arm64-apple-ios-simulator-clang ;; aarch64-apple-ios*) CC=arm64-apple-ios-clang ;; x86_64-apple-ios*-simulator) CC=x86_64-apple-ios-simulator-clang ;; @@ -496,7 +304,7 @@ index d0ae103014a..d0cdcc1e775 100755 *) esac fi -@@ -4212,6 +4249,17 @@ if test -z "$CPP"; then +@@ -4212,6 +4246,17 @@ if test -z "$CPP"; then aarch64-apple-ios*-simulator) CPP=arm64-apple-ios-simulator-cpp ;; aarch64-apple-ios*) CPP=arm64-apple-ios-cpp ;; x86_64-apple-ios*-simulator) CPP=x86_64-apple-ios-simulator-cpp ;; @@ -514,7 +322,7 @@ index d0ae103014a..d0cdcc1e775 100755 *) esac fi -@@ -4220,6 +4268,17 @@ if test -z "$CXX"; then +@@ -4220,6 +4265,17 @@ if test -z "$CXX"; then aarch64-apple-ios*-simulator) CXX=arm64-apple-ios-simulator-clang++ ;; aarch64-apple-ios*) CXX=arm64-apple-ios-clang++ ;; x86_64-apple-ios*-simulator) CXX=x86_64-apple-ios-simulator-clang++ ;; @@ -524,7 +332,7 @@ index d0ae103014a..d0cdcc1e775 100755 + x86_64-apple-tvos*-simulator) CXX=x86_64-apple-tvos-simulator-clang++ ;; + + aarch64-apple-watchos*-simulator) CXX=arm64-apple-watchos-simulator-clang++ ;; -+ aarch64-apple-watchos*) CXX=arm64-apple-watchos-clang++ ;; ++ aarch64-apple-watchos*) CXX=arm64_32-apple-watchos-clang++ ;; + x86_64-apple-watchos*-simulator) CXX=x86_64-apple-watchos-simulator-clang++ ;; + + aarch64-apple-xros*-simulator) CXX=arm64-apple-xros-simulator-clang++ ;; @@ -532,7 +340,7 @@ index d0ae103014a..d0cdcc1e775 100755 *) esac fi -@@ -4342,8 +4401,11 @@ then : +@@ -4342,8 +4398,11 @@ then : case $enableval in yes) case $ac_sys_system in @@ -542,21 +350,21 @@ index d0ae103014a..d0cdcc1e775 100755 + iOS) enableval=iOS/Frameworks/\$\(MULTIARCH\) ;; + tvOS) enableval=tvOS/Frameworks/\$\(MULTIARCH\) ;; + watchOS) enableval=watchOS/Frameworks/\$\(MULTIARCH\) ;; -+ xrOS) enableval=xrOS/Frameworks/\$\(MULTIARCH\) ;; ++ visionOS) enableval=visionOS/Frameworks/\$\(MULTIARCH\) ;; *) as_fn_error $? "Unknown platform for framework build" "$LINENO" 5 esac esac -@@ -4352,6 +4414,9 @@ then : +@@ -4352,6 +4411,9 @@ then : no) case $ac_sys_system in iOS) as_fn_error $? "iOS builds must use --enable-framework" "$LINENO" 5 ;; + tvOS) as_fn_error $? "tvOS builds must use --enable-framework" "$LINENO" 5 ;; + watchOS) as_fn_error $? "watchOS builds must use --enable-framework" "$LINENO" 5 ;; -+ xrOS) as_fn_error $? "xrOS builds must use --enable-framework" "$LINENO" 5 ;; ++ visionOS) as_fn_error $? "visionOS builds must use --enable-framework" "$LINENO" 5 ;; *) PYTHONFRAMEWORK= PYTHONFRAMEWORKDIR=no-framework -@@ -4458,6 +4523,51 @@ then : +@@ -4458,6 +4520,51 @@ then : ac_config_files="$ac_config_files iOS/Resources/Info.plist" @@ -591,7 +399,7 @@ index d0ae103014a..d0cdcc1e775 100755 + ac_config_files="$ac_config_files watchOS/Resources/Info.plist" + + ;; -+ xrOS) : ++ visionOS) : + FRAMEWORKINSTALLFIRST="frameworkinstallunversionedstructure" + FRAMEWORKALTINSTALLFIRST="frameworkinstallunversionedstructure " + FRAMEWORKINSTALLLAST="frameworkinstallmobileheaders" @@ -601,46 +409,46 @@ index d0ae103014a..d0cdcc1e775 100755 + + prefix=$PYTHONFRAMEWORKPREFIX + PYTHONFRAMEWORKINSTALLNAMEPREFIX="@rpath/$PYTHONFRAMEWORKDIR" -+ RESSRCDIR=xrOS/Resources ++ RESSRCDIR=visionOS/Resources + -+ ac_config_files="$ac_config_files xrOS/Resources/Info.plist" ++ ac_config_files="$ac_config_files visionOS/Resources/Info.plist" + ;; *) as_fn_error $? "Unknown platform for framework build" "$LINENO" 5 -@@ -4469,6 +4579,9 @@ else case e in #( +@@ -4469,6 +4576,9 @@ else case e in #( e) case $ac_sys_system in iOS) as_fn_error $? "iOS builds must use --enable-framework" "$LINENO" 5 ;; + tvOS) as_fn_error $? "tvOS builds must use --enable-framework" "$LINENO" 5 ;; + watchOS) as_fn_error $? "watchOS builds must use --enable-framework" "$LINENO" 5 ;; -+ xrOS) as_fn_error $? "xrOS builds must use --enable-framework" "$LINENO" 5 ;; ++ visionOS) as_fn_error $? "visionOS builds must use --enable-framework" "$LINENO" 5 ;; *) PYTHONFRAMEWORK= PYTHONFRAMEWORKDIR=no-framework -@@ -4523,8 +4636,8 @@ then : +@@ -4523,8 +4633,8 @@ then : case "$withval" in yes) case $ac_sys_system in - Darwin|iOS) - # iOS is able to share the macOS patch -+ Darwin|iOS|tvOS|watchOS|xrOS) -+ # iOS/tvOS/watchOS/xrOS is able to share the macOS patch ++ Darwin|iOS|tvOS|watchOS|visionOS) ++ # iOS/tvOS/watchOS/visionOS is able to share the macOS patch APP_STORE_COMPLIANCE_PATCH="Mac/Resources/app-store-compliance.patch" ;; *) as_fn_error $? "no default app store compliance patch available for $ac_sys_system" "$LINENO" 5 ;; -@@ -4542,8 +4655,8 @@ printf "%s\n" "applying custom app store compliance patch" >&6; } +@@ -4542,8 +4652,8 @@ printf "%s\n" "applying custom app store compliance patch" >&6; } else case e in #( e) case $ac_sys_system in - iOS) - # Always apply the compliance patch on iOS; we can use the macOS patch -+ iOS|tvOS|watchOS|xrOS) -+ # Always apply the compliance patch on iOS/tvOS/watchOS/xrOS; we can use the macOS patch ++ iOS|tvOS|watchOS|visionOS) ++ # Always apply the compliance patch on iOS/tvOS/watchOS/visionOS; we can use the macOS patch APP_STORE_COMPLIANCE_PATCH="Mac/Resources/app-store-compliance.patch" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: applying default app store compliance patch" >&5 printf "%s\n" "applying default app store compliance patch" >&6; } -@@ -4598,6 +4711,72 @@ printf "%s\n" "$IPHONEOS_DEPLOYMENT_TARGET" >&6; } +@@ -4598,6 +4708,72 @@ printf "%s\n" "$IPHONEOS_DEPLOYMENT_TARGET" >&6; } ;; esac ;; @@ -693,44 +501,44 @@ index d0ae103014a..d0cdcc1e775 100755 + _host_device=`echo $host | cut -d '-' -f4` + _host_device=${_host_device:=os} + -+ # XROS_DEPLOYMENT_TARGET is the minimum supported xrOS version -+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking xrOS deployment target" >&5 -+printf %s "checking xrOS deployment target... " >&6; } -+ XROS_DEPLOYMENT_TARGET=${_host_os:7} -+ XROS_DEPLOYMENT_TARGET=${XROS_DEPLOYMENT_TARGET:=4.0} ++ # XROS_DEPLOYMENT_TARGET is the minimum supported visionOS version ++ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking visionOS deployment target" >&5 ++printf %s "checking visionOS deployment target... " >&6; } ++ XROS_DEPLOYMENT_TARGET=${_host_os:8} ++ XROS_DEPLOYMENT_TARGET=${XROS_DEPLOYMENT_TARGET:=2.0} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XROS_DEPLOYMENT_TARGET" >&5 +printf "%s\n" "$XROS_DEPLOYMENT_TARGET" >&6; } + + case "$host_cpu" in + aarch64) -+ _host_ident=${XROS_DEPLOYMENT_TARGET}-arm64-xr${_host_device} ++ _host_ident=${XROS_DEPLOYMENT_TARGET}-arm64-vision${_host_device} + ;; + *) -+ _host_ident=${XROS_DEPLOYMENT_TARGET}-$host_cpu-xr${_host_device} ++ _host_ident=${XROS_DEPLOYMENT_TARGET}-$host_cpu-vision${_host_device} + ;; + esac + ;; *-*-darwin*) case "$host_cpu" in arm*) -@@ -4688,9 +4867,15 @@ printf "%s\n" "#define _BSD_SOURCE 1" >>confdefs.h +@@ -4688,9 +4864,15 @@ printf "%s\n" "#define _BSD_SOURCE 1" >>confdefs.h define_xopen_source=no;; Darwin/[12][0-9].*) define_xopen_source=no;; - # On iOS, defining _POSIX_C_SOURCE also disables platform specific features. -+ # On iOS/tvOS/watchOS/xrOS, defining _POSIX_C_SOURCE also disables platform specific features. ++ # On iOS/tvOS/watchOS/visionOS, defining _POSIX_C_SOURCE also disables platform specific features. iOS/*) define_xopen_source=no;; + tvOS/*) + define_xopen_source=no;; + watchOS/*) + define_xopen_source=no;; -+ xrOS/*) ++ visionOS/*) + define_xopen_source=no;; # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from # defining NI_NUMERICHOST. QNX/6.3.2) -@@ -4753,7 +4938,11 @@ fi +@@ -4753,7 +4935,11 @@ fi CONFIGURE_MACOSX_DEPLOYMENT_TARGET= EXPORT_MACOSX_DEPLOYMENT_TARGET='#' @@ -743,7 +551,7 @@ index d0ae103014a..d0cdcc1e775 100755 # checks for alternative programs -@@ -4794,6 +4983,16 @@ case $ac_sys_system in #( +@@ -4794,6 +4980,16 @@ case $ac_sys_system in #( as_fn_append CFLAGS " -mios-version-min=${IPHONEOS_DEPLOYMENT_TARGET}" as_fn_append LDFLAGS " -mios-version-min=${IPHONEOS_DEPLOYMENT_TARGET}" ;; #( @@ -760,7 +568,7 @@ index d0ae103014a..d0cdcc1e775 100755 *) : ;; esac -@@ -7163,6 +7362,12 @@ case $ac_sys_system in #( +@@ -7163,6 +7359,12 @@ case $ac_sys_system in #( MULTIARCH="" ;; #( iOS) : MULTIARCH="" ;; #( @@ -768,21 +576,21 @@ index d0ae103014a..d0cdcc1e775 100755 + MULTIARCH="" ;; #( + watchOS) : + MULTIARCH="" ;; #( -+ xrOS) : ++ visionOS) : + MULTIARCH="" ;; #( FreeBSD*) : MULTIARCH="" ;; #( *) : -@@ -7183,7 +7388,7 @@ fi +@@ -7183,7 +7385,7 @@ fi printf "%s\n" "$MULTIARCH" >&6; } case $ac_sys_system in #( - iOS) : -+ iOS|tvOS|watchOS|xrOS) : ++ iOS|tvOS|watchOS|visionOS) : SOABI_PLATFORM=`echo "$PLATFORM_TRIPLET" | cut -d '-' -f2` ;; #( *) : SOABI_PLATFORM=$PLATFORM_TRIPLET -@@ -7234,6 +7439,18 @@ case $host/$ac_cv_cc_name in #( +@@ -7234,6 +7436,18 @@ case $host/$ac_cv_cc_name in #( PY_SUPPORT_TIER=3 ;; #( aarch64-apple-ios*/clang) : PY_SUPPORT_TIER=3 ;; #( @@ -796,374 +604,66 @@ index d0ae103014a..d0cdcc1e775 100755 + PY_SUPPORT_TIER=3 ;; #( + aarch64-apple-xros*-simulator/clang) : + PY_SUPPORT_TIER=3 ;; #( -+ arm64-apple-xros*/clang) : ++ aarch64-apple-xros*/clang) : + PY_SUPPORT_TIER=3 ;; #( aarch64-*-linux-android/clang) : PY_SUPPORT_TIER=3 ;; #( x86_64-*-linux-android/clang) : -@@ -7670,7 +7887,7 @@ then +@@ -7670,7 +7884,7 @@ then case $ac_sys_system in Darwin) LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)';; - iOS) -+ iOS|tvOS|watchOS|xrOS) ++ iOS|tvOS|watchOS|visionOS) LDLIBRARY='$(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK)';; *) as_fn_error $? "Unknown platform for framework build" "$LINENO" 5;; -@@ -7736,7 +7953,7 @@ printf "%s\n" "#define Py_ENABLE_SHARED 1" >>confdefs.h +@@ -7736,7 +7950,7 @@ printf "%s\n" "#define Py_ENABLE_SHARED 1" >>confdefs.h BLDLIBRARY='-L. -lpython$(LDVERSION)' RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}} ;; - iOS) -+ iOS|tvOS|watchOS|xrOS) ++ iOS|tvOS|watchOS|visionOS) LDLIBRARY='libpython$(LDVERSION).dylib' ;; AIX*) -@@ -8444,15 +8661,18 @@ if test "$Py_OPT" = 'true' ; then - if test "x$ac_cv_gcc_compat" = xyes - then : - -- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fno-semantic-interposition" >&5 --printf %s "checking whether C compiler accepts -fno-semantic-interposition... " >&6; } -+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -fno-semantic-interposition" >&5 -+printf %s "checking whether the C compiler accepts -fno-semantic-interposition... " >&6; } - if test ${ax_cv_check_cflags__Werror__fno_semantic_interposition+y} - then : - printf %s "(cached) " >&6 - else case e in #( - e) - ax_check_save_flags=$CFLAGS -- CFLAGS="$CFLAGS -Werror -fno-semantic-interposition" -+ if test x"$GCC" = xyes ; then -+ add_gnu_werror="-Werror" -+ fi -+ CFLAGS="$CFLAGS -Werror -fno-semantic-interposition $add_gnu_werror" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - -@@ -8582,15 +8802,18 @@ if test "$Py_LTO" = 'true' ; then - case $ac_cv_cc_name in - clang) - LDFLAGS_NOLTO="-fno-lto" -- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -flto=thin" >&5 --printf %s "checking whether C compiler accepts -flto=thin... " >&6; } -+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -flto=thin" >&5 -+printf %s "checking whether the C compiler accepts -flto=thin... " >&6; } - if test ${ax_cv_check_cflags___flto_thin+y} - then : - printf %s "(cached) " >&6 - else case e in #( - e) - ax_check_save_flags=$CFLAGS -- CFLAGS="$CFLAGS -flto=thin" -+ if test x"$GCC" = xyes ; then -+ add_gnu_werror="-Werror" -+ fi -+ CFLAGS="$CFLAGS -flto=thin $add_gnu_werror" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - -@@ -8767,15 +8990,18 @@ printf "%s\n" "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;} - if test $Py_LTO_POLICY = default - then - # Check that ThinLTO is accepted. -- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -flto=thin" >&5 --printf %s "checking whether C compiler accepts -flto=thin... " >&6; } -+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -flto=thin" >&5 -+printf %s "checking whether the C compiler accepts -flto=thin... " >&6; } - if test ${ax_cv_check_cflags___flto_thin+y} - then : - printf %s "(cached) " >&6 - else case e in #( - e) - ax_check_save_flags=$CFLAGS -- CFLAGS="$CFLAGS -flto=thin" -+ if test x"$GCC" = xyes ; then -+ add_gnu_werror="-Werror" -+ fi -+ CFLAGS="$CFLAGS -flto=thin $add_gnu_werror" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - -@@ -8824,15 +9050,18 @@ fi - if test $Py_LTO_POLICY = default - then - # Check that ThinLTO is accepted -- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -flto=thin" >&5 --printf %s "checking whether C compiler accepts -flto=thin... " >&6; } -+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -flto=thin" >&5 -+printf %s "checking whether the C compiler accepts -flto=thin... " >&6; } - if test ${ax_cv_check_cflags___flto_thin+y} - then : - printf %s "(cached) " >&6 - else case e in #( - e) - ax_check_save_flags=$CFLAGS -- CFLAGS="$CFLAGS -flto=thin" -+ if test x"$GCC" = xyes ; then -+ add_gnu_werror="-Werror" -+ fi -+ CFLAGS="$CFLAGS -flto=thin $add_gnu_werror" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - -@@ -9109,15 +9338,18 @@ if test "$Py_BOLT" = 'true' ; then - - # -fno-reorder-blocks-and-partition is required for bolt to work. - # Possibly GCC only. -- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fno-reorder-blocks-and-partition" >&5 --printf %s "checking whether C compiler accepts -fno-reorder-blocks-and-partition... " >&6; } -+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -fno-reorder-blocks-and-partition" >&5 -+printf %s "checking whether the C compiler accepts -fno-reorder-blocks-and-partition... " >&6; } - if test ${ax_cv_check_cflags___fno_reorder_blocks_and_partition+y} - then : - printf %s "(cached) " >&6 - else case e in #( - e) - ax_check_save_flags=$CFLAGS -- CFLAGS="$CFLAGS -fno-reorder-blocks-and-partition" -+ if test x"$GCC" = xyes ; then -+ add_gnu_werror="-Werror" -+ fi -+ CFLAGS="$CFLAGS -fno-reorder-blocks-and-partition $add_gnu_werror" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - -@@ -9765,15 +9997,18 @@ printf "%s\n" "$enable_safety" >&6; } - - if test "$enable_safety" = "yes" - then -- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fstack-protector-strong" >&5 --printf %s "checking whether C compiler accepts -fstack-protector-strong... " >&6; } -+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -fstack-protector-strong" >&5 -+printf %s "checking whether the C compiler accepts -fstack-protector-strong... " >&6; } - if test ${ax_cv_check_cflags__Werror__fstack_protector_strong+y} - then : - printf %s "(cached) " >&6 - else case e in #( - e) - ax_check_save_flags=$CFLAGS -- CFLAGS="$CFLAGS -Werror -fstack-protector-strong" -+ if test x"$GCC" = xyes ; then -+ add_gnu_werror="-Werror" -+ fi -+ CFLAGS="$CFLAGS -Werror -fstack-protector-strong $add_gnu_werror" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - -@@ -9807,15 +10042,18 @@ printf "%s\n" "$as_me: WARNING: -fstack-protector-strong not supported" >&2;} ;; - esac - fi - -- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wtrampolines" >&5 --printf %s "checking whether C compiler accepts -Wtrampolines... " >&6; } -+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -Wtrampolines" >&5 -+printf %s "checking whether the C compiler accepts -Wtrampolines... " >&6; } - if test ${ax_cv_check_cflags__Werror__Wtrampolines+y} - then : - printf %s "(cached) " >&6 - else case e in #( - e) - ax_check_save_flags=$CFLAGS -- CFLAGS="$CFLAGS -Werror -Wtrampolines" -+ if test x"$GCC" = xyes ; then -+ add_gnu_werror="-Werror" -+ fi -+ CFLAGS="$CFLAGS -Werror -Wtrampolines $add_gnu_werror" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - -@@ -9849,15 +10087,18 @@ printf "%s\n" "$as_me: WARNING: -Wtrampolines not supported" >&2;} ;; - esac - fi - -- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wimplicit-fallthrough" >&5 --printf %s "checking whether C compiler accepts -Wimplicit-fallthrough... " >&6; } -+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -Wimplicit-fallthrough" >&5 -+printf %s "checking whether the C compiler accepts -Wimplicit-fallthrough... " >&6; } - if test ${ax_cv_check_cflags__Werror__Wimplicit_fallthrough+y} - then : - printf %s "(cached) " >&6 - else case e in #( - e) - ax_check_save_flags=$CFLAGS -- CFLAGS="$CFLAGS -Werror -Wimplicit-fallthrough" -+ if test x"$GCC" = xyes ; then -+ add_gnu_werror="-Werror" -+ fi -+ CFLAGS="$CFLAGS -Werror -Wimplicit-fallthrough $add_gnu_werror" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - -@@ -9891,15 +10132,18 @@ printf "%s\n" "$as_me: WARNING: -Wimplicit-fallthrough not supported" >&2;} ;; - esac - fi - -- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Werror=format-security" >&5 --printf %s "checking whether C compiler accepts -Werror=format-security... " >&6; } -+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -Werror=format-security" >&5 -+printf %s "checking whether the C compiler accepts -Werror=format-security... " >&6; } - if test ${ax_cv_check_cflags__Werror__Werror_format_security+y} - then : - printf %s "(cached) " >&6 - else case e in #( - e) - ax_check_save_flags=$CFLAGS -- CFLAGS="$CFLAGS -Werror -Werror=format-security" -+ if test x"$GCC" = xyes ; then -+ add_gnu_werror="-Werror" -+ fi -+ CFLAGS="$CFLAGS -Werror -Werror=format-security $add_gnu_werror" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - -@@ -9933,15 +10177,18 @@ printf "%s\n" "$as_me: WARNING: -Werror=format-security not supported" >&2;} ;; - esac - fi - -- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wbidi-chars=any" >&5 --printf %s "checking whether C compiler accepts -Wbidi-chars=any... " >&6; } -+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -Wbidi-chars=any" >&5 -+printf %s "checking whether the C compiler accepts -Wbidi-chars=any... " >&6; } - if test ${ax_cv_check_cflags__Werror__Wbidi_chars_any+y} - then : - printf %s "(cached) " >&6 - else case e in #( - e) - ax_check_save_flags=$CFLAGS -- CFLAGS="$CFLAGS -Werror -Wbidi-chars=any" -+ if test x"$GCC" = xyes ; then -+ add_gnu_werror="-Werror" -+ fi -+ CFLAGS="$CFLAGS -Werror -Wbidi-chars=any $add_gnu_werror" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - -@@ -9975,15 +10222,18 @@ printf "%s\n" "$as_me: WARNING: -Wbidi-chars=any not supported" >&2;} ;; - esac - fi - -- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wall" >&5 --printf %s "checking whether C compiler accepts -Wall... " >&6; } -+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -Wall" >&5 -+printf %s "checking whether the C compiler accepts -Wall... " >&6; } - if test ${ax_cv_check_cflags__Werror__Wall+y} - then : - printf %s "(cached) " >&6 - else case e in #( - e) - ax_check_save_flags=$CFLAGS -- CFLAGS="$CFLAGS -Werror -Wall" -+ if test x"$GCC" = xyes ; then -+ add_gnu_werror="-Werror" -+ fi -+ CFLAGS="$CFLAGS -Werror -Wall $add_gnu_werror" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - -@@ -10041,15 +10291,18 @@ printf "%s\n" "$enable_slower_safety" >&6; } - - if test "$enable_slower_safety" = "yes" - then -- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -D_FORTIFY_SOURCE=3" >&5 --printf %s "checking whether C compiler accepts -D_FORTIFY_SOURCE=3... " >&6; } -+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -D_FORTIFY_SOURCE=3" >&5 -+printf %s "checking whether the C compiler accepts -D_FORTIFY_SOURCE=3... " >&6; } - if test ${ax_cv_check_cflags__Werror__D_FORTIFY_SOURCE_3+y} - then : - printf %s "(cached) " >&6 - else case e in #( - e) - ax_check_save_flags=$CFLAGS -- CFLAGS="$CFLAGS -Werror -D_FORTIFY_SOURCE=3" -+ if test x"$GCC" = xyes ; then -+ add_gnu_werror="-Werror" -+ fi -+ CFLAGS="$CFLAGS -Werror -D_FORTIFY_SOURCE=3 $add_gnu_werror" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - -@@ -10650,15 +10903,18 @@ printf "%s\n" "$CC" >&6; } - - # Error on unguarded use of new symbols, which will fail at runtime for - # users on older versions of macOS -- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wunguarded-availability" >&5 --printf %s "checking whether C compiler accepts -Wunguarded-availability... " >&6; } -+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -Wunguarded-availability" >&5 -+printf %s "checking whether the C compiler accepts -Wunguarded-availability... " >&6; } - if test ${ax_cv_check_cflags__Werror__Wunguarded_availability+y} - then : - printf %s "(cached) " >&6 - else case e in #( - e) - ax_check_save_flags=$CFLAGS -- CFLAGS="$CFLAGS -Werror -Wunguarded-availability" -+ if test x"$GCC" = xyes ; then -+ add_gnu_werror="-Werror" -+ fi -+ CFLAGS="$CFLAGS -Werror -Wunguarded-availability $add_gnu_werror" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - -@@ -13341,15 +13597,18 @@ then : - withval=$with_memory_sanitizer; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5 - printf "%s\n" "$withval" >&6; } --{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fsanitize=memory" >&5 --printf %s "checking whether C compiler accepts -fsanitize=memory... " >&6; } -+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -fsanitize=memory" >&5 -+printf %s "checking whether the C compiler accepts -fsanitize=memory... " >&6; } - if test ${ax_cv_check_cflags___fsanitize_memory+y} - then : - printf %s "(cached) " >&6 - else case e in #( - e) - ax_check_save_flags=$CFLAGS -- CFLAGS="$CFLAGS -fsanitize=memory" -+ if test x"$GCC" = xyes ; then -+ add_gnu_werror="-Werror" -+ fi -+ CFLAGS="$CFLAGS -fsanitize=memory $add_gnu_werror" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - -@@ -13544,7 +13803,7 @@ then +@@ -13544,7 +13758,7 @@ then BLDSHARED="$LDSHARED" fi ;; - iOS/*) -+ iOS/*|tvOS/*|watchOS/*|xrOS/*) ++ iOS/*|tvOS/*|watchOS/*|visionOS/*) LDSHARED='$(CC) -dynamiclib -F . -framework $(PYTHONFRAMEWORK)' LDCXXSHARED='$(CXX) -dynamiclib -F . -framework $(PYTHONFRAMEWORK)' BLDSHARED="$LDSHARED" -@@ -13677,7 +13936,7 @@ then +@@ -13677,7 +13891,7 @@ then Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";; Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";; # -u libsys_s pulls in all symbols in libsys - Darwin/*|iOS/*) -+ Darwin/*|iOS/*|tvOS/*|watchOS/*|xrOS/*) ++ Darwin/*|iOS/*|tvOS/*|watchOS/*|visionOS/*) LINKFORSHARED="$extra_undefs -framework CoreFoundation" # Issue #18075: the default maximum stack size (8MBytes) is too -@@ -13701,7 +13960,7 @@ printf "%s\n" "#define THREAD_STACK_SIZE 0x$stack_size" >>confdefs.h +@@ -13701,7 +13915,7 @@ printf "%s\n" "#define THREAD_STACK_SIZE 0x$stack_size" >>confdefs.h LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' fi LINKFORSHARED="$LINKFORSHARED" - elif test $ac_sys_system = "iOS"; then -+ elif test "$ac_sys_system" = "iOS" -o "$ac_sys_system" = "tvOS" -o "$ac_sys_system" = "watchOS" -o "$ac_sys_system" = "xrOS"; then ++ elif test "$ac_sys_system" = "iOS" -o "$ac_sys_system" = "tvOS" -o "$ac_sys_system" = "watchOS" -o "$ac_sys_system" = "visionOS"; then LINKFORSHARED="-Wl,-stack_size,$stack_size $LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK)' fi ;; -@@ -15286,7 +15545,7 @@ then : +@@ -15286,7 +15500,7 @@ then : ctypes_malloc_closure=yes ;; #( - iOS) : -+ iOS|tvOS|watchOS|xrOS) : ++ iOS|tvOS|watchOS|visionOS) : ctypes_malloc_closure=yes ;; #( -@@ -19038,12 +19297,6 @@ if test "x$ac_cv_func_dup3" = xyes +@@ -19038,12 +19252,6 @@ if test "x$ac_cv_func_dup3" = xyes then : printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h @@ -1176,7 +676,7 @@ index d0ae103014a..d0cdcc1e775 100755 fi ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero" if test "x$ac_cv_func_explicit_bzero" = xyes -@@ -19104,18 +19357,6 @@ if test "x$ac_cv_func_fexecve" = xyes +@@ -19104,18 +19312,6 @@ if test "x$ac_cv_func_fexecve" = xyes then : printf "%s\n" "#define HAVE_FEXECVE 1" >>confdefs.h @@ -1195,7 +695,7 @@ index d0ae103014a..d0cdcc1e775 100755 fi ac_fn_c_check_func "$LINENO" "fpathconf" "ac_cv_func_fpathconf" if test "x$ac_cv_func_fpathconf" = xyes -@@ -19542,24 +19783,6 @@ if test "x$ac_cv_func_posix_openpt" = xyes +@@ -19542,24 +19738,6 @@ if test "x$ac_cv_func_posix_openpt" = xyes then : printf "%s\n" "#define HAVE_POSIX_OPENPT 1" >>confdefs.h @@ -1220,7 +720,7 @@ index d0ae103014a..d0cdcc1e775 100755 fi ac_fn_c_check_func "$LINENO" "pread" "ac_cv_func_pread" if test "x$ac_cv_func_pread" = xyes -@@ -19866,12 +20089,6 @@ if test "x$ac_cv_func_sigaction" = xyes +@@ -19866,12 +20044,6 @@ if test "x$ac_cv_func_sigaction" = xyes then : printf "%s\n" "#define HAVE_SIGACTION 1" >>confdefs.h @@ -1233,26 +733,26 @@ index d0ae103014a..d0cdcc1e775 100755 fi ac_fn_c_check_func "$LINENO" "sigfillset" "ac_cv_func_sigfillset" if test "x$ac_cv_func_sigfillset" = xyes -@@ -20140,11 +20357,11 @@ fi +@@ -20140,11 +20312,11 @@ fi fi -# iOS defines some system methods that can be linked (so they are -+# iOS/tvOS/watchOS/xrOS define some system methods that can be linked (so they are ++# iOS/tvOS/watchOS/visionOS define some system methods that can be linked (so they are # found by configure), but either raise a compilation error (because the # header definition prevents usage - autoconf doesn't use the headers), or # raise an error if used at runtime. Force these symbols off. -if test "$ac_sys_system" != "iOS" ; then -+if test "$ac_sys_system" != "iOS" -a "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "watchOS" -a "$ac_sys_system" != "xrOS" ; then ++if test "$ac_sys_system" != "iOS" -a "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "watchOS" -a "$ac_sys_system" != "visionOS" ; then ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy" if test "x$ac_cv_func_getentropy" = xyes then : -@@ -20166,6 +20383,53 @@ fi +@@ -20166,6 +20338,53 @@ fi fi -+# tvOS/watchOS.xrOS have some additional methods that can be found, but not used. -+if test "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "watchOS" -a "$ac_sys_system" != "xrOS"; then ++# tvOS/watchOS have some additional methods that can be found, but not used. ++if test "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "watchOS"; then + ac_fn_c_check_func "$LINENO" "execv" "ac_cv_func_execv" +if test "x$ac_cv_func_execv" = xyes +then : @@ -1301,17 +801,17 @@ index d0ae103014a..d0cdcc1e775 100755 { 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} -@@ -23248,7 +23512,8 @@ fi +@@ -23248,7 +23467,8 @@ fi # check for openpty, login_tty, and forkpty - +# tvOS/watchOS have functions for tty, but can't use them -+if test "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "watchOS" -a "$ac_sys_system" != "xrOS"; then ++if test "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "watchOS"; then for ac_func in openpty do : -@@ -23362,7 +23627,7 @@ esac +@@ -23362,7 +23582,7 @@ esac fi done @@ -1320,7 +820,7 @@ index d0ae103014a..d0cdcc1e775 100755 printf %s "checking for library containing login_tty... " >&6; } if test ${ac_cv_search_login_tty+y} then : -@@ -23545,6 +23810,7 @@ esac +@@ -23545,6 +23765,7 @@ esac fi done @@ -1328,126 +828,69 @@ index d0ae103014a..d0cdcc1e775 100755 # check for long file support functions ac_fn_c_check_func "$LINENO" "fseek64" "ac_cv_func_fseek64" -@@ -23810,10 +24076,10 @@ fi +@@ -23810,10 +24031,10 @@ fi done -# On Android and iOS, clock_settime can be linked (so it is found by -+# On Android, iOS, tvOS, watchOS, and xrOS, clock_settime can be linked (so it is found by ++# On Android, iOS, tvOS, watchOS, and visionOS, clock_settime can be linked (so it is found by # configure), but when used in an unprivileged process, it crashes rather than # returning an error. Force the symbol off. -if test "$ac_sys_system" != "Linux-android" && test "$ac_sys_system" != "iOS" -+if test "$ac_sys_system" != "Linux-android" -a "$ac_sys_system" != "iOS" -a "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "watchOS" -a "$ac_sys_system" != "xrOS" ++if test "$ac_sys_system" != "Linux-android" -a "$ac_sys_system" != "iOS" -a "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "watchOS" -a "$ac_sys_system" != "visionOS" then for ac_func in clock_settime -@@ -25236,10 +25502,10 @@ if ac_fn_c_try_link "$LINENO" - then : - - --if grep noonsees conftest* > /dev/null ; then -+if grep noonsees conftest$EXEEXT >/dev/null ; then - ax_cv_c_float_words_bigendian=yes - fi --if grep seesnoon conftest* >/dev/null ; then -+if grep seesnoon conftest$EXEEXT >/dev/null ; then - if test "$ax_cv_c_float_words_bigendian" = unknown; then - ax_cv_c_float_words_bigendian=no - else -@@ -26152,8 +26418,8 @@ if test "$PY_ENABLE_SHARED" = "1" && ( test -n "$ANDROID_API_LEVEL" || test "$MA +@@ -26152,8 +26373,8 @@ if test "$PY_ENABLE_SHARED" = "1" && ( test -n "$ANDROID_API_LEVEL" || test "$MA LIBPYTHON="\$(BLDLIBRARY)" fi -# On iOS the shared libraries must be linked with the Python framework -if test "$ac_sys_system" = "iOS"; then +# On iOS/tvOS/watchOS the shared libraries must be linked with the Python framework -+if test "$ac_sys_system" = "iOS" -o $ac_sys_system = "tvOS" -o $ac_sys_system = "watchOS" -o $ac_sys_system = "xrOS"; then ++if test "$ac_sys_system" = "iOS" -o $ac_sys_system = "tvOS" -o $ac_sys_system = "watchOS" -o $ac_sys_system = "visionOS"; then MODULE_DEPS_SHARED="$MODULE_DEPS_SHARED \$(PYTHONFRAMEWORKDIR)/\$(PYTHONFRAMEWORK)" fi -@@ -29023,7 +29289,7 @@ LIBS=$save_LIBS +@@ -29023,7 +29244,7 @@ LIBS=$save_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for device files" >&5 printf "%s\n" "$as_me: checking for device files" >&6;} -if test "$ac_sys_system" = "Linux-android" || test "$ac_sys_system" = "iOS"; then -+if test "$ac_sys_system" = "Linux-android" -o "$ac_sys_system" = "iOS" -o "$ac_sys_system" = "tvOS" -o "$ac_sys_system" = "watchOS" -o "$ac_sys_system" = "xrOS"; then ++if test "$ac_sys_system" = "Linux-android" -o "$ac_sys_system" = "iOS" -o "$ac_sys_system" = "tvOS" -o "$ac_sys_system" = "watchOS" -o "$ac_sys_system" = "visionOS"; then ac_cv_file__dev_ptmx=no ac_cv_file__dev_ptc=no else -@@ -29504,7 +29770,7 @@ else case e in #( +@@ -29504,7 +29725,7 @@ else case e in #( with_ensurepip=no ;; #( WASI) : with_ensurepip=no ;; #( - iOS) : -+ iOS|tvOS|watchOS|xrOS) : ++ iOS|tvOS|watchOS|visionOS) : with_ensurepip=no ;; #( *) : with_ensurepip=upgrade -@@ -30484,7 +30750,7 @@ case $ac_sys_system in #( +@@ -30484,7 +30705,7 @@ case $ac_sys_system in #( ;; #( Darwin) : ;; #( - iOS) : -+ iOS|tvOS|watchOS|xrOS) : ++ iOS|tvOS|watchOS|visionOS) : -@@ -32082,15 +32348,18 @@ esac - # Android. - # The *mmintrin.h headers are x86-family-specific, so can't be used on WASI. - if test "$ac_sys_system" != "Linux-android" -a "$ac_sys_system" != "WASI" || test "$ANDROID_API_LEVEL" -ge 28; then -- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -msse -msse2 -msse3 -msse4.1 -msse4.2" >&5 --printf %s "checking whether C compiler accepts -msse -msse2 -msse3 -msse4.1 -msse4.2... " >&6; } -+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -msse -msse2 -msse3 -msse4.1 -msse4.2" >&5 -+printf %s "checking whether the C compiler accepts -msse -msse2 -msse3 -msse4.1 -msse4.2... " >&6; } - if test ${ax_cv_check_cflags__Werror__msse__msse2__msse3__msse4_1__msse4_2+y} - then : - printf %s "(cached) " >&6 - else case e in #( - e) - ax_check_save_flags=$CFLAGS -- CFLAGS="$CFLAGS -Werror -msse -msse2 -msse3 -msse4.1 -msse4.2" -+ if test x"$GCC" = xyes ; then -+ add_gnu_werror="-Werror" -+ fi -+ CFLAGS="$CFLAGS -Werror -msse -msse2 -msse3 -msse4.1 -msse4.2 $add_gnu_werror" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - -@@ -32157,15 +32426,18 @@ fi - # (https://developer.android.com/ndk/guides/abis#86-64), this is safe because we do a - # runtime CPUID check. - if test "$ac_sys_system" != "Linux-android" -a "$ac_sys_system" != "WASI" || test "$ANDROID_API_LEVEL" -ge 28; then -- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -mavx2" >&5 --printf %s "checking whether C compiler accepts -mavx2... " >&6; } -+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -mavx2" >&5 -+printf %s "checking whether the C compiler accepts -mavx2... " >&6; } - if test ${ax_cv_check_cflags__Werror__mavx2+y} - then : - printf %s "(cached) " >&6 - else case e in #( - e) - ax_check_save_flags=$CFLAGS -- CFLAGS="$CFLAGS -Werror -mavx2" -+ if test x"$GCC" = xyes ; then -+ add_gnu_werror="-Werror" -+ fi -+ CFLAGS="$CFLAGS -Werror -mavx2 $add_gnu_werror" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - -@@ -34487,6 +34759,9 @@ do +@@ -34487,6 +34708,9 @@ do "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;; "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;; "iOS/Resources/Info.plist") CONFIG_FILES="$CONFIG_FILES iOS/Resources/Info.plist" ;; + "tvOS/Resources/Info.plist") CONFIG_FILES="$CONFIG_FILES tvOS/Resources/Info.plist" ;; + "watchOS/Resources/Info.plist") CONFIG_FILES="$CONFIG_FILES watchOS/Resources/Info.plist" ;; -+ "xrOS/Resources/Info.plist") CONFIG_FILES="$CONFIG_FILES xrOS/Resources/Info.plist" ;; ++ "visionOS/Resources/Info.plist") CONFIG_FILES="$CONFIG_FILES visionOS/Resources/Info.plist" ;; "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;; "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;; "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;; diff --git a/configure.ac b/configure.ac -index 8bb0f1c6ef4..3f1a5b51636 100644 +index 8bb0f1c6ef4..c49e8809f8c 100644 --- a/configure.ac +++ b/configure.ac @@ -330,6 +330,15 @@ then @@ -1461,7 +904,7 @@ index 8bb0f1c6ef4..3f1a5b51636 100644 + ac_sys_system=watchOS + ;; + *-apple-xros*) -+ ac_sys_system=xrOS ++ ac_sys_system=visionOS + ;; *-*-darwin*) ac_sys_system=Darwin @@ -1471,7 +914,7 @@ index 8bb0f1c6ef4..3f1a5b51636 100644 # prepending the user-provided host triple to the required binary name. # -# On iOS, this results in binaries like "arm64-apple-ios13.0-simulator-gcc", -+# On iOS/tvOS/watchOS/xrOS, this results in binaries like "arm64-apple-ios13.0-simulator-gcc", ++# On iOS/tvOS/watchOS/visionOS, this results in binaries like "arm64-apple-ios13.0-simulator-gcc", # which isn't a binary that exists, and isn't very convenient, as it contains the # iOS version. As the default cross-compiler name won't exist, configure falls # back to gcc, which *definitely* won't work. We're providing wrapper scripts for @@ -1539,7 +982,7 @@ index 8bb0f1c6ef4..3f1a5b51636 100644 + x86_64-apple-tvos*-simulator) CXX=x86_64-apple-tvos-simulator-clang++ ;; + + aarch64-apple-watchos*-simulator) CXX=arm64-apple-watchos-simulator-clang++ ;; -+ aarch64-apple-watchos*) CXX=arm64-apple-watchos-clang++ ;; ++ aarch64-apple-watchos*) CXX=arm64_32-apple-watchos-clang++ ;; + x86_64-apple-watchos*-simulator) CXX=x86_64-apple-watchos-simulator-clang++ ;; + + aarch64-apple-xros*-simulator) CXX=arm64-apple-xros-simulator-clang++ ;; @@ -1557,7 +1000,7 @@ index 8bb0f1c6ef4..3f1a5b51636 100644 + iOS) enableval=iOS/Frameworks/\$\(MULTIARCH\) ;; + tvOS) enableval=tvOS/Frameworks/\$\(MULTIARCH\) ;; + watchOS) enableval=watchOS/Frameworks/\$\(MULTIARCH\) ;; -+ xrOS) enableval=xrOS/Frameworks/\$\(MULTIARCH\) ;; ++ visionOS) enableval=visionOS/Frameworks/\$\(MULTIARCH\) ;; *) AC_MSG_ERROR([Unknown platform for framework build]) esac esac @@ -1567,7 +1010,7 @@ index 8bb0f1c6ef4..3f1a5b51636 100644 iOS) AC_MSG_ERROR([iOS builds must use --enable-framework]) ;; + tvOS) AC_MSG_ERROR([tvOS builds must use --enable-framework]) ;; + watchOS) AC_MSG_ERROR([watchOS builds must use --enable-framework]) ;; -+ xrOS) AC_MSG_ERROR([xrOS builds must use --enable-framework]) ;; ++ visionOS) AC_MSG_ERROR([visionOS builds must use --enable-framework]) ;; *) PYTHONFRAMEWORK= PYTHONFRAMEWORKDIR=no-framework @@ -1603,7 +1046,7 @@ index 8bb0f1c6ef4..3f1a5b51636 100644 + + AC_CONFIG_FILES([watchOS/Resources/Info.plist]) + ;; -+ xrOS) : ++ visionOS) : + FRAMEWORKINSTALLFIRST="frameworkinstallunversionedstructure" + FRAMEWORKALTINSTALLFIRST="frameworkinstallunversionedstructure " + FRAMEWORKINSTALLLAST="frameworkinstallmobileheaders" @@ -1613,9 +1056,9 @@ index 8bb0f1c6ef4..3f1a5b51636 100644 + + prefix=$PYTHONFRAMEWORKPREFIX + PYTHONFRAMEWORKINSTALLNAMEPREFIX="@rpath/$PYTHONFRAMEWORKDIR" -+ RESSRCDIR=xrOS/Resources ++ RESSRCDIR=visionOS/Resources + -+ AC_CONFIG_FILES([xrOS/Resources/Info.plist]) ++ AC_CONFIG_FILES([visionOS/Resources/Info.plist]) + ;; *) AC_MSG_ERROR([Unknown platform for framework build]) @@ -1626,7 +1069,7 @@ index 8bb0f1c6ef4..3f1a5b51636 100644 iOS) AC_MSG_ERROR([iOS builds must use --enable-framework]) ;; + tvOS) AC_MSG_ERROR([tvOS builds must use --enable-framework]) ;; + watchOS) AC_MSG_ERROR([watchOS builds must use --enable-framework]) ;; -+ xrOS) AC_MSG_ERROR([xrOS builds must use --enable-framework]) ;; ++ visionOS) AC_MSG_ERROR([visionOS builds must use --enable-framework]) ;; *) PYTHONFRAMEWORK= PYTHONFRAMEWORKDIR=no-framework @@ -1636,8 +1079,8 @@ index 8bb0f1c6ef4..3f1a5b51636 100644 case $ac_sys_system in - Darwin|iOS) - # iOS is able to share the macOS patch -+ Darwin|iOS|tvOS|watchOS|xrOS) -+ # iOS/tvOS/watchOS/xrOS is able to share the macOS patch ++ Darwin|iOS|tvOS|watchOS|visionOS) ++ # iOS/tvOS/watchOS/visionOS is able to share the macOS patch APP_STORE_COMPLIANCE_PATCH="Mac/Resources/app-store-compliance.patch" ;; *) AC_MSG_ERROR([no default app store compliance patch available for $ac_sys_system]) ;; @@ -1647,8 +1090,8 @@ index 8bb0f1c6ef4..3f1a5b51636 100644 case $ac_sys_system in - iOS) - # Always apply the compliance patch on iOS; we can use the macOS patch -+ iOS|tvOS|watchOS|xrOS) -+ # Always apply the compliance patch on iOS/tvOS/watchOS/xrOS; we can use the macOS patch ++ iOS|tvOS|watchOS|visionOS) ++ # Always apply the compliance patch on iOS/tvOS/watchOS/visionOS; we can use the macOS patch APP_STORE_COMPLIANCE_PATCH="Mac/Resources/app-store-compliance.patch" AC_MSG_RESULT([applying default app store compliance patch]) ;; @@ -1701,18 +1144,18 @@ index 8bb0f1c6ef4..3f1a5b51636 100644 + _host_device=`echo $host | cut -d '-' -f4` + _host_device=${_host_device:=os} + -+ # XROS_DEPLOYMENT_TARGET is the minimum supported xrOS version -+ AC_MSG_CHECKING([xrOS deployment target]) -+ XROS_DEPLOYMENT_TARGET=${_host_os:7} -+ XROS_DEPLOYMENT_TARGET=${XROS_DEPLOYMENT_TARGET:=4.0} ++ # XROS_DEPLOYMENT_TARGET is the minimum supported visionOS version ++ AC_MSG_CHECKING([visionOS deployment target]) ++ XROS_DEPLOYMENT_TARGET=${_host_os:8} ++ XROS_DEPLOYMENT_TARGET=${XROS_DEPLOYMENT_TARGET:=2.0} + AC_MSG_RESULT([$XROS_DEPLOYMENT_TARGET]) + + case "$host_cpu" in + aarch64) -+ _host_ident=${XROS_DEPLOYMENT_TARGET}-arm64-xr${_host_device} ++ _host_ident=${XROS_DEPLOYMENT_TARGET}-arm64-vision${_host_device} + ;; + *) -+ _host_ident=${XROS_DEPLOYMENT_TARGET}-$host_cpu-xr${_host_device} ++ _host_ident=${XROS_DEPLOYMENT_TARGET}-$host_cpu-vision${_host_device} + ;; + esac + ;; @@ -1724,14 +1167,14 @@ index 8bb0f1c6ef4..3f1a5b51636 100644 Darwin/@<:@[12]@:>@@<:@0-9@:>@.*) define_xopen_source=no;; - # On iOS, defining _POSIX_C_SOURCE also disables platform specific features. -+ # On iOS/tvOS/watchOS/xrOS, defining _POSIX_C_SOURCE also disables platform specific features. ++ # On iOS/tvOS/watchOS/visionOS, defining _POSIX_C_SOURCE also disables platform specific features. iOS/*) define_xopen_source=no;; + tvOS/*) + define_xopen_source=no;; + watchOS/*) + define_xopen_source=no;; -+ xrOS/*) ++ visionOS/*) + define_xopen_source=no;; # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from # defining NI_NUMERICHOST. @@ -1750,13 +1193,14 @@ index 8bb0f1c6ef4..3f1a5b51636 100644 # checks for alternative programs -@@ -979,11 +1153,18 @@ AS_CASE([$host], +@@ -979,11 +1153,19 @@ AS_CASE([$host], ], ) -dnl Add the compiler flag for the iOS minimum supported OS version. -+dnl Add the compiler flag for the iOS/tvOS/watchOS/xrOS minimum supported OS version, -+dnl albeit I don't know the flag for the version in xrOS. ++dnl Add the compiler flag for the iOS/tvOS/watchOS minimum supported OS ++dnl version. visionOS doesn't use an explicit -mxros-version-min option - ++dnl it encodes the min version into the target triple. AS_CASE([$ac_sys_system], [iOS], [ AS_VAR_APPEND([CFLAGS], [" -mios-version-min=${IPHONEOS_DEPLOYMENT_TARGET}"]) @@ -1770,26 +1214,26 @@ index 8bb0f1c6ef4..3f1a5b51636 100644 ], ) -@@ -1172,6 +1353,9 @@ AC_MSG_CHECKING([for multiarch]) +@@ -1172,6 +1354,9 @@ AC_MSG_CHECKING([for multiarch]) AS_CASE([$ac_sys_system], [Darwin*], [MULTIARCH=""], [iOS], [MULTIARCH=""], + [tvOS], [MULTIARCH=""], + [watchOS], [MULTIARCH=""], -+ [xrOS], [MULTIARCH=""], ++ [visionOS], [MULTIARCH=""], [FreeBSD*], [MULTIARCH=""], [MULTIARCH=$($CC --print-multiarch 2>/dev/null)] ) -@@ -1193,7 +1377,7 @@ dnl will have multiple sysconfig modules (one for each CPU architecture), but +@@ -1193,7 +1378,7 @@ dnl will have multiple sysconfig modules (one for each CPU architecture), but dnl use a single "fat" binary at runtime. SOABI_PLATFORM is the component of dnl the PLATFORM_TRIPLET that will be used in binary module extensions. AS_CASE([$ac_sys_system], - [iOS], [SOABI_PLATFORM=`echo "$PLATFORM_TRIPLET" | cut -d '-' -f2`], -+ [iOS|tvOS|watchOS|xrOS], [SOABI_PLATFORM=`echo "$PLATFORM_TRIPLET" | cut -d '-' -f2`], ++ [iOS|tvOS|watchOS|visionOS], [SOABI_PLATFORM=`echo "$PLATFORM_TRIPLET" | cut -d '-' -f2`], [SOABI_PLATFORM=$PLATFORM_TRIPLET] ) -@@ -1227,6 +1411,12 @@ AS_CASE([$host/$ac_cv_cc_name], +@@ -1227,6 +1412,12 @@ AS_CASE([$host/$ac_cv_cc_name], [x86_64-*-freebsd*/clang], [PY_SUPPORT_TIER=3], dnl FreeBSD on AMD64 [aarch64-apple-ios*-simulator/clang], [PY_SUPPORT_TIER=3], dnl iOS Simulator on arm64 [aarch64-apple-ios*/clang], [PY_SUPPORT_TIER=3], dnl iOS on ARM64 @@ -1797,66 +1241,66 @@ index 8bb0f1c6ef4..3f1a5b51636 100644 + [aarch64-apple-tvos*/clang], [PY_SUPPORT_TIER=3], dnl tvOS on ARM64 + [aarch64-apple-watchos*-simulator/clang], [PY_SUPPORT_TIER=3], dnl watchOS Simulator on arm64 + [arm64_32-apple-watchos*/clang], [PY_SUPPORT_TIER=3], dnl watchOS on ARM64 -+ [aarch64-apple-xros*-simulator/clang], [PY_SUPPORT_TIER=3], dnl xrOS Simulator on arm64 -+ [arm64-apple-xros*/clang], [PY_SUPPORT_TIER=3], dnl xrOS on ARM64 ++ [aarch64-apple-xros*-simulator/clang], [PY_SUPPORT_TIER=3], dnl visionOS Simulator on arm64 ++ [aarch64-apple-xros*/clang], [PY_SUPPORT_TIER=3], dnl visionOS on ARM64 [aarch64-*-linux-android/clang], [PY_SUPPORT_TIER=3], dnl Android on ARM64 [x86_64-*-linux-android/clang], [PY_SUPPORT_TIER=3], dnl Android on AMD64 -@@ -1536,7 +1726,7 @@ then +@@ -1536,7 +1727,7 @@ then case $ac_sys_system in Darwin) LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)';; - iOS) -+ iOS|tvOS|watchOS|xrOS) ++ iOS|tvOS|watchOS|visionOS) LDLIBRARY='$(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK)';; *) AC_MSG_ERROR([Unknown platform for framework build]);; -@@ -1601,7 +1791,7 @@ if test $enable_shared = "yes"; then +@@ -1601,7 +1792,7 @@ if test $enable_shared = "yes"; then BLDLIBRARY='-L. -lpython$(LDVERSION)' RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}} ;; - iOS) -+ iOS|tvOS|watchOS|xrOS) ++ iOS|tvOS|watchOS|visionOS) LDLIBRARY='libpython$(LDVERSION).dylib' ;; AIX*) -@@ -3456,7 +3646,7 @@ then +@@ -3456,7 +3647,7 @@ then BLDSHARED="$LDSHARED" fi ;; - iOS/*) -+ iOS/*|tvOS/*|watchOS/*|xrOS/*) ++ iOS/*|tvOS/*|watchOS/*|visionOS/*) LDSHARED='$(CC) -dynamiclib -F . -framework $(PYTHONFRAMEWORK)' LDCXXSHARED='$(CXX) -dynamiclib -F . -framework $(PYTHONFRAMEWORK)' BLDSHARED="$LDSHARED" -@@ -3580,7 +3770,7 @@ then +@@ -3580,7 +3771,7 @@ then Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";; Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";; # -u libsys_s pulls in all symbols in libsys - Darwin/*|iOS/*) -+ Darwin/*|iOS/*|tvOS/*|watchOS/*|xrOS/*) ++ Darwin/*|iOS/*|tvOS/*|watchOS/*|visionOS/*) LINKFORSHARED="$extra_undefs -framework CoreFoundation" # Issue #18075: the default maximum stack size (8MBytes) is too -@@ -3604,7 +3794,7 @@ then +@@ -3604,7 +3795,7 @@ then LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' fi LINKFORSHARED="$LINKFORSHARED" - elif test $ac_sys_system = "iOS"; then -+ elif test "$ac_sys_system" = "iOS" -o "$ac_sys_system" = "tvOS" -o "$ac_sys_system" = "watchOS" -o "$ac_sys_system" = "xrOS"; then ++ elif test "$ac_sys_system" = "iOS" -o "$ac_sys_system" = "tvOS" -o "$ac_sys_system" = "watchOS" -o "$ac_sys_system" = "visionOS"; then LINKFORSHARED="-Wl,-stack_size,$stack_size $LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK)' fi ;; -@@ -4024,7 +4214,7 @@ AS_VAR_IF([have_libffi], [yes], [ +@@ -4024,7 +4215,7 @@ AS_VAR_IF([have_libffi], [yes], [ dnl when do we need USING_APPLE_OS_LIBFFI? ctypes_malloc_closure=yes ], - [iOS], [ -+ [iOS|tvOS|watchOS|xrOS], [ ++ [iOS|tvOS|watchOS|visionOS], [ ctypes_malloc_closure=yes ], [sunos5], [AS_VAR_APPEND([LIBFFI_LIBS], [" -mimpure-text"])] -@@ -5133,9 +5323,9 @@ fi +@@ -5133,9 +5324,9 @@ fi # checks for library functions AC_CHECK_FUNCS([ \ accept4 alarm bind_textdomain_codeset chmod chown clock closefrom close_range confstr \ @@ -1868,7 +1312,7 @@ index 8bb0f1c6ef4..3f1a5b51636 100644 gai_strerror getegid geteuid getgid getgrent getgrgid getgrgid_r \ getgrnam_r getgrouplist gethostname getitimer getloadavg getlogin \ getpeername getpgid getpid getppid getpriority _getpty \ -@@ -5143,8 +5333,7 @@ AC_CHECK_FUNCS([ \ +@@ -5143,8 +5334,7 @@ AC_CHECK_FUNCS([ \ getspnam getuid getwd grantpt 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 \ @@ -1878,7 +1322,7 @@ index 8bb0f1c6ef4..3f1a5b51636 100644 pread preadv preadv2 process_vm_readv \ pthread_cond_timedwait_relative_np pthread_condattr_setclock pthread_init \ pthread_kill pthread_getname_np pthread_setname_np pthread_getattr_np \ -@@ -5153,7 +5342,7 @@ AC_CHECK_FUNCS([ \ +@@ -5153,7 +5343,7 @@ AC_CHECK_FUNCS([ \ sched_setparam sched_setscheduler sem_clockwait sem_getvalue sem_open \ sem_timedwait sem_unlink sendfile setegid seteuid setgid sethostname \ setitimer setlocale setpgid setpgrp setpriority setregid setresgid \ @@ -1887,23 +1331,23 @@ index 8bb0f1c6ef4..3f1a5b51636 100644 sigfillset siginterrupt sigpending sigrelse sigtimedwait sigwait \ sigwaitinfo snprintf splice strftime strlcpy strsignal symlinkat sync \ sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile \ -@@ -5168,12 +5357,20 @@ if test "$MACHDEP" != linux; then +@@ -5168,12 +5358,20 @@ if test "$MACHDEP" != linux; then AC_CHECK_FUNCS([lchmod]) fi -# iOS defines some system methods that can be linked (so they are -+# iOS/tvOS/watchOS/xrOS define some system methods that can be linked (so they are ++# iOS/tvOS/watchOS/visionOS define some system methods that can be linked (so they are # found by configure), but either raise a compilation error (because the # header definition prevents usage - autoconf doesn't use the headers), or # raise an error if used at runtime. Force these symbols off. -if test "$ac_sys_system" != "iOS" ; then - AC_CHECK_FUNCS([getentropy getgroups system]) -+if test "$ac_sys_system" != "iOS" -a "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "watchOS" -a "$ac_sys_system" != "xrOS" ; then ++if test "$ac_sys_system" != "iOS" -a "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "watchOS" -a "$ac_sys_system" != "visionOS" ; then + AC_CHECK_FUNCS([ getentropy getgroups system ]) +fi + -+# tvOS/watchOS.xrOS have some additional methods that can be found, but not used. -+if test "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "watchOS" -a "$ac_sys_system" != "xrOS"; then ++# tvOS/watchOS have some additional methods that can be found, but not used. ++if test "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "watchOS"; then + AC_CHECK_FUNCS([ \ + execv fork fork1 posix_spawn posix_spawnp posix_spawn_file_actions_addclosefrom_np \ + sigaltstack \ @@ -1911,7 +1355,7 @@ index 8bb0f1c6ef4..3f1a5b51636 100644 fi AC_CHECK_DECL([dirfd], -@@ -5427,20 +5624,22 @@ PY_CHECK_FUNC([setgroups], [ +@@ -5427,20 +5625,23 @@ PY_CHECK_FUNC([setgroups], [ ]) # check for openpty, login_tty, and forkpty @@ -1930,7 +1374,8 @@ index 8bb0f1c6ef4..3f1a5b51636 100644 - [AC_CHECK_LIB([bsd], [forkpty], - [AC_DEFINE([HAVE_FORKPTY]) LIBS="$LIBS -lbsd"])])]) +# tvOS/watchOS have functions for tty, but can't use them -+if test "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "watchOS" -a "$ac_sys_system" != "xrOS"; then ++dnl is the same applies for visionOS ++if test "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "watchOS"; then + AC_CHECK_FUNCS([openpty], [], + [AC_CHECK_LIB([util], [openpty], + [AC_DEFINE([HAVE_OPENPTY]) LIBS="$LIBS -lutil"], @@ -1948,54 +1393,54 @@ index 8bb0f1c6ef4..3f1a5b51636 100644 # check for long file support functions AC_CHECK_FUNCS([fseek64 fseeko fstatvfs ftell64 ftello statvfs]) -@@ -5479,10 +5678,10 @@ AC_CHECK_FUNCS([clock_getres], [], [ +@@ -5479,10 +5680,10 @@ AC_CHECK_FUNCS([clock_getres], [], [ ]) ]) -# On Android and iOS, clock_settime can be linked (so it is found by -+# On Android, iOS, tvOS, watchOS, and xrOS, clock_settime can be linked (so it is found by ++# On Android, iOS, tvOS, watchOS, and visionOS, clock_settime can be linked (so it is found by # configure), but when used in an unprivileged process, it crashes rather than # returning an error. Force the symbol off. -if test "$ac_sys_system" != "Linux-android" && test "$ac_sys_system" != "iOS" -+if test "$ac_sys_system" != "Linux-android" -a "$ac_sys_system" != "iOS" -a "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "watchOS" -a "$ac_sys_system" != "xrOS" ++if test "$ac_sys_system" != "Linux-android" -a "$ac_sys_system" != "iOS" -a "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "watchOS" -a "$ac_sys_system" != "visionOS" then AC_CHECK_FUNCS([clock_settime], [], [ AC_CHECK_LIB([rt], [clock_settime], [ -@@ -6233,8 +6432,8 @@ if test "$PY_ENABLE_SHARED" = "1" && ( test -n "$ANDROID_API_LEVEL" || test "$MA +@@ -6233,8 +6434,8 @@ if test "$PY_ENABLE_SHARED" = "1" && ( test -n "$ANDROID_API_LEVEL" || test "$MA LIBPYTHON="\$(BLDLIBRARY)" fi -# On iOS the shared libraries must be linked with the Python framework -if test "$ac_sys_system" = "iOS"; then +# On iOS/tvOS/watchOS the shared libraries must be linked with the Python framework -+if test "$ac_sys_system" = "iOS" -o $ac_sys_system = "tvOS" -o $ac_sys_system = "watchOS" -o $ac_sys_system = "xrOS"; then ++if test "$ac_sys_system" = "iOS" -o $ac_sys_system = "tvOS" -o $ac_sys_system = "watchOS" -o $ac_sys_system = "visionOS"; then MODULE_DEPS_SHARED="$MODULE_DEPS_SHARED \$(PYTHONFRAMEWORKDIR)/\$(PYTHONFRAMEWORK)" fi -@@ -6893,7 +7092,7 @@ AC_MSG_NOTICE([checking for device files]) +@@ -6893,7 +7094,7 @@ AC_MSG_NOTICE([checking for device files]) dnl NOTE: Inform user how to proceed with files when cross compiling. dnl Some cross-compile builds are predictable; they won't ever dnl have /dev/ptmx or /dev/ptc, so we can set them explicitly. -if test "$ac_sys_system" = "Linux-android" || test "$ac_sys_system" = "iOS"; then -+if test "$ac_sys_system" = "Linux-android" -o "$ac_sys_system" = "iOS" -o "$ac_sys_system" = "tvOS" -o "$ac_sys_system" = "watchOS" -o "$ac_sys_system" = "xrOS"; then ++if test "$ac_sys_system" = "Linux-android" -o "$ac_sys_system" = "iOS" -o "$ac_sys_system" = "tvOS" -o "$ac_sys_system" = "watchOS" -o "$ac_sys_system" = "visionOS"; then ac_cv_file__dev_ptmx=no ac_cv_file__dev_ptc=no else -@@ -7174,7 +7373,7 @@ AC_ARG_WITH([ensurepip], +@@ -7174,7 +7375,7 @@ AC_ARG_WITH([ensurepip], AS_CASE([$ac_sys_system], [Emscripten], [with_ensurepip=no], [WASI], [with_ensurepip=no], - [iOS], [with_ensurepip=no], -+ [iOS|tvOS|watchOS|xrOS], [with_ensurepip=no], ++ [iOS|tvOS|watchOS|visionOS], [with_ensurepip=no], [with_ensurepip=upgrade] ) ]) -@@ -7585,7 +7784,7 @@ AS_CASE([$ac_sys_system], +@@ -7585,7 +7786,7 @@ AS_CASE([$ac_sys_system], [VxWorks*], [PY_STDLIB_MOD_SET_NA([_scproxy], [termios], [grp])], dnl The _scproxy module is available on macOS [Darwin], [], - [iOS], [ -+ [iOS|tvOS|watchOS|xrOS], [ ++ [iOS|tvOS|watchOS|visionOS], [ dnl subprocess and multiprocessing are not supported (no fork syscall). dnl curses and tkinter user interface are not available. dnl gdbm and nis aren't available @@ -2314,6 +1759,142 @@ index 00000000000..4acff2c6051 +#ifdef __x86_64__ +#include "pyconfig-x86_64.h" +#endif +diff --git a/visionOS/Resources/Info.plist.in b/visionOS/Resources/Info.plist.in +new file mode 100644 +index 00000000000..d62cb35b1c4 +--- /dev/null ++++ b/visionOS/Resources/Info.plist.in +@@ -0,0 +1,34 @@ ++ ++ ++ ++ ++ CFBundleDevelopmentRegion ++ en ++ CFBundleExecutable ++ Python ++ CFBundleGetInfoString ++ Python Runtime and Library ++ CFBundleIdentifier ++ @PYTHONFRAMEWORKIDENTIFIER@ ++ CFBundleInfoDictionaryVersion ++ 6.0 ++ CFBundleName ++ Python ++ CFBundlePackageType ++ FMWK ++ CFBundleShortVersionString ++ %VERSION% ++ CFBundleLongVersionString ++ %VERSION%, (c) 2001-2023 Python Software Foundation. ++ CFBundleSignature ++ ???? ++ CFBundleVersion ++ %VERSION% ++ CFBundleSupportedPlatforms ++ ++ xrOS ++ ++ MinimumOSVersion ++ @XROS_DEPLOYMENT_TARGET@ ++ ++ +diff --git a/visionOS/Resources/bin/arm64-apple-xros-ar b/visionOS/Resources/bin/arm64-apple-xros-ar +new file mode 100755 +index 00000000000..9fd78a205f3 +--- /dev/null ++++ b/visionOS/Resources/bin/arm64-apple-xros-ar +@@ -0,0 +1,2 @@ ++#!/bin/bash ++xcrun --sdk xros${XROS_SDK_VERSION} ar "$@" +diff --git a/visionOS/Resources/bin/arm64-apple-xros-clang b/visionOS/Resources/bin/arm64-apple-xros-clang +new file mode 100755 +index 00000000000..9a1a757cbd0 +--- /dev/null ++++ b/visionOS/Resources/bin/arm64-apple-xros-clang +@@ -0,0 +1,2 @@ ++#!/bin/bash ++xcrun --sdk xros${XROS_SDK_VERSION} clang -target arm64-apple-xros${XROS_DEPLOYMENT_TARGET} "$@" +diff --git a/visionOS/Resources/bin/arm64-apple-xros-clang++ b/visionOS/Resources/bin/arm64-apple-xros-clang++ +new file mode 100755 +index 00000000000..f64fcfc11cd +--- /dev/null ++++ b/visionOS/Resources/bin/arm64-apple-xros-clang++ +@@ -0,0 +1,2 @@ ++#!/bin/bash ++xcrun --sdk xros${XROS_SDK_VERSION} clang++ -target arm64-apple-xros${XROS_DEPLOYMENT_TARGET} "$@" +diff --git a/visionOS/Resources/bin/arm64-apple-xros-cpp b/visionOS/Resources/bin/arm64-apple-xros-cpp +new file mode 100755 +index 00000000000..d6492eff052 +--- /dev/null ++++ b/visionOS/Resources/bin/arm64-apple-xros-cpp +@@ -0,0 +1,2 @@ ++#!/bin/bash ++xcrun --sdk xros${XROS_SDK_VERSION} clang -target arm64-apple-xros${XROS_DEPLOYMENT_TARGET} -E "$@" +diff --git a/visionOS/Resources/bin/arm64-apple-xros-simulator-ar b/visionOS/Resources/bin/arm64-apple-xros-simulator-ar +new file mode 100755 +index 00000000000..b202330fb5d +--- /dev/null ++++ b/visionOS/Resources/bin/arm64-apple-xros-simulator-ar +@@ -0,0 +1,2 @@ ++#!/bin/bash ++xcrun --sdk xrsimulator${XROS_SDK_VERSION} ar "$@" +diff --git a/visionOS/Resources/bin/arm64-apple-xros-simulator-clang b/visionOS/Resources/bin/arm64-apple-xros-simulator-clang +new file mode 100755 +index 00000000000..87b0aba0751 +--- /dev/null ++++ b/visionOS/Resources/bin/arm64-apple-xros-simulator-clang +@@ -0,0 +1,2 @@ ++#!/bin/bash ++xcrun --sdk xrsimulator${XROS_SDK_VERSION} clang -target arm64-apple-xros${XROS_DEPLOYMENT_TARGET}-simulator "$@" +diff --git a/visionOS/Resources/bin/arm64-apple-xros-simulator-clang++ b/visionOS/Resources/bin/arm64-apple-xros-simulator-clang++ +new file mode 100755 +index 00000000000..c89d48f1cb8 +--- /dev/null ++++ b/visionOS/Resources/bin/arm64-apple-xros-simulator-clang++ +@@ -0,0 +1,2 @@ ++#!/bin/bash ++xcrun --sdk xrsimulator${XROS_SDK_VERSION} clang++ -target arm64-apple-xros${XROS_DEPLOYMENT_TARGET}-simulator "$@" +diff --git a/visionOS/Resources/bin/arm64-apple-xros-simulator-cpp b/visionOS/Resources/bin/arm64-apple-xros-simulator-cpp +new file mode 100755 +index 00000000000..91b2d626432 +--- /dev/null ++++ b/visionOS/Resources/bin/arm64-apple-xros-simulator-cpp +@@ -0,0 +1,2 @@ ++#!/bin/bash ++xcrun --sdk xrsimulator clang -target arm64-apple-xros${XROS_DEPLOYMENT_TARGET}-simulator -E "$@" +diff --git a/visionOS/Resources/dylib-Info-template.plist b/visionOS/Resources/dylib-Info-template.plist +new file mode 100644 +index 00000000000..97431a903c1 +--- /dev/null ++++ b/visionOS/Resources/dylib-Info-template.plist +@@ -0,0 +1,26 @@ ++ ++ ++ ++ ++ CFBundleDevelopmentRegion ++ en ++ CFBundleExecutable ++ ++ CFBundleIdentifier ++ ++ CFBundleInfoDictionaryVersion ++ 6.0 ++ CFBundlePackageType ++ APPL ++ CFBundleShortVersionString ++ 1.0 ++ CFBundleSupportedPlatforms ++ ++ xrOS ++ ++ MinimumOSVersion ++ 2.0 ++ CFBundleVersion ++ 1 ++ ++ diff --git a/watchOS/README.rst b/watchOS/README.rst new file mode 100644 index 00000000000..35221478452 @@ -2613,188 +2194,3 @@ index 00000000000..f842b987b2e +#ifdef __x86_64__ +#include "pyconfig-x86_64.h" +#endif -diff --git a/xrOS/Resources/Info.plist.in b/xrOS/Resources/Info.plist.in -new file mode 100644 -index 00000000000..d62cb35b1c4 ---- /dev/null -+++ b/xrOS/Resources/Info.plist.in -@@ -0,0 +1,34 @@ -+ -+ -+ -+ -+ CFBundleDevelopmentRegion -+ en -+ CFBundleExecutable -+ Python -+ CFBundleGetInfoString -+ Python Runtime and Library -+ CFBundleIdentifier -+ @PYTHONFRAMEWORKIDENTIFIER@ -+ CFBundleInfoDictionaryVersion -+ 6.0 -+ CFBundleName -+ Python -+ CFBundlePackageType -+ FMWK -+ CFBundleShortVersionString -+ %VERSION% -+ CFBundleLongVersionString -+ %VERSION%, (c) 2001-2023 Python Software Foundation. -+ CFBundleSignature -+ ???? -+ CFBundleVersion -+ %VERSION% -+ CFBundleSupportedPlatforms -+ -+ xrOS -+ -+ MinimumOSVersion -+ @XROS_DEPLOYMENT_TARGET@ -+ -+ -diff --git a/xrOS/Resources/bin/arm64-apple-xros-simulator-ar b/xrOS/Resources/bin/arm64-apple-xros-simulator-ar -new file mode 100755 -index 00000000000..b202330fb5d ---- /dev/null -+++ b/xrOS/Resources/bin/arm64-apple-xros-simulator-ar -@@ -0,0 +1,2 @@ -+#!/bin/bash -+xcrun --sdk xrsimulator${XROS_SDK_VERSION} ar "$@" -diff --git a/xrOS/Resources/bin/arm64-apple-xros-simulator-clang b/xrOS/Resources/bin/arm64-apple-xros-simulator-clang -new file mode 100755 -index 00000000000..9aefb41a7f1 ---- /dev/null -+++ b/xrOS/Resources/bin/arm64-apple-xros-simulator-clang -@@ -0,0 +1,2 @@ -+#!/bin/bash -+xcrun --sdk xrsimulator${XROS_SDK_VERSION} clang -target arm64-apple-xros-simulator "$@" -diff --git a/xrOS/Resources/bin/arm64-apple-xros-simulator-clang++ b/xrOS/Resources/bin/arm64-apple-xros-simulator-clang++ -new file mode 100755 -index 00000000000..3d256414b61 ---- /dev/null -+++ b/xrOS/Resources/bin/arm64-apple-xros-simulator-clang++ -@@ -0,0 +1,2 @@ -+#!/bin/bash -+xcrun --sdk xrsimulator${XROS_SDK_VERSION} clang++ -target arm64-apple-xros-simulator "$@" -diff --git a/xrOS/Resources/bin/arm64-apple-xros-simulator-cpp b/xrOS/Resources/bin/arm64-apple-xros-simulator-cpp -new file mode 100755 -index 00000000000..2e7be877106 ---- /dev/null -+++ b/xrOS/Resources/bin/arm64-apple-xros-simulator-cpp -@@ -0,0 +1,2 @@ -+#!/bin/bash -+xcrun --sdk xrsimulator clang -target arm64-apple-xros-simulator -E "$@" -diff --git a/xrOS/Resources/bin/arm64_32-apple-xros-ar b/xrOS/Resources/bin/arm64_32-apple-xros-ar -new file mode 100755 -index 00000000000..9fd78a205f3 ---- /dev/null -+++ b/xrOS/Resources/bin/arm64_32-apple-xros-ar -@@ -0,0 +1,2 @@ -+#!/bin/bash -+xcrun --sdk xros${XROS_SDK_VERSION} ar "$@" -diff --git a/xrOS/Resources/bin/arm64_32-apple-xros-clang b/xrOS/Resources/bin/arm64_32-apple-xros-clang -new file mode 100755 -index 00000000000..5ac7a312c66 ---- /dev/null -+++ b/xrOS/Resources/bin/arm64_32-apple-xros-clang -@@ -0,0 +1,2 @@ -+#!/bin/bash -+xcrun --sdk xros${XROS_SDK_VERSION} clang -target arm64_32-apple-xros "$@" -diff --git a/xrOS/Resources/bin/arm64_32-apple-xros-clang++ b/xrOS/Resources/bin/arm64_32-apple-xros-clang++ -new file mode 100755 -index 00000000000..35f1820a3e3 ---- /dev/null -+++ b/xrOS/Resources/bin/arm64_32-apple-xros-clang++ -@@ -0,0 +1,2 @@ -+#!/bin/bash -+xcrun --sdk xros${XROS_SDK_VERSION} clang++ -target arm64_32-apple-xros "$@" -diff --git a/xrOS/Resources/bin/arm64_32-apple-xros-cpp b/xrOS/Resources/bin/arm64_32-apple-xros-cpp -new file mode 100755 -index 00000000000..e34ba5da0b1 ---- /dev/null -+++ b/xrOS/Resources/bin/arm64_32-apple-xros-cpp -@@ -0,0 +1,2 @@ -+#!/bin/bash -+xcrun --sdk xros${XROS_SDK_VERSION} clang -target arm64_32-apple-xros -E "$@" -diff --git a/xrOS/Resources/bin/x86_64-apple-xros-simulator-ar b/xrOS/Resources/bin/x86_64-apple-xros-simulator-ar -new file mode 100755 -index 00000000000..b202330fb5d ---- /dev/null -+++ b/xrOS/Resources/bin/x86_64-apple-xros-simulator-ar -@@ -0,0 +1,2 @@ -+#!/bin/bash -+xcrun --sdk xrsimulator${XROS_SDK_VERSION} ar "$@" -diff --git a/xrOS/Resources/bin/x86_64-apple-xros-simulator-clang b/xrOS/Resources/bin/x86_64-apple-xros-simulator-clang -new file mode 100755 -index 00000000000..e094d172b53 ---- /dev/null -+++ b/xrOS/Resources/bin/x86_64-apple-xros-simulator-clang -@@ -0,0 +1,2 @@ -+#!/bin/bash -+xcrun --sdk xrsimulator${XROS_SDK_VERSION} clang -target x86_64-apple-xros-simulator "$@" -diff --git a/xrOS/Resources/bin/x86_64-apple-xros-simulator-clang++ b/xrOS/Resources/bin/x86_64-apple-xros-simulator-clang++ -new file mode 100755 -index 00000000000..f161ac780b8 ---- /dev/null -+++ b/xrOS/Resources/bin/x86_64-apple-xros-simulator-clang++ -@@ -0,0 +1,2 @@ -+#!/bin/bash -+xcrun --sdk xrsimulator${XROS_SDK_VERSION} clang++ -target x86_64-apple-xros-simulator "$@" -diff --git a/xrOS/Resources/bin/x86_64-apple-xros-simulator-cpp b/xrOS/Resources/bin/x86_64-apple-xros-simulator-cpp -new file mode 100755 -index 00000000000..38e4e3dc8b6 ---- /dev/null -+++ b/xrOS/Resources/bin/x86_64-apple-xros-simulator-cpp -@@ -0,0 +1,2 @@ -+#!/bin/bash -+xcrun --sdk xrsimulator${XROS_SDK_VERSION} clang -target x86_64-apple-xros-simulator -E "$@" -diff --git a/xrOS/Resources/dylib-Info-template.plist b/xrOS/Resources/dylib-Info-template.plist -new file mode 100644 -index 00000000000..f630cdb72b6 ---- /dev/null -+++ b/xrOS/Resources/dylib-Info-template.plist -@@ -0,0 +1,26 @@ -+ -+ -+ -+ -+ CFBundleDevelopmentRegion -+ en -+ CFBundleExecutable -+ -+ CFBundleIdentifier -+ -+ CFBundleInfoDictionaryVersion -+ 6.0 -+ CFBundlePackageType -+ APPL -+ CFBundleShortVersionString -+ 1.0 -+ CFBundleSupportedPlatforms -+ -+ xrOS -+ -+ MinimumOSVersion -+ 4.0 -+ CFBundleVersion -+ 1 -+ -+ -diff --git a/xrOS/Resources/pyconfig.h b/xrOS/Resources/pyconfig.h -new file mode 100644 -index 00000000000..f842b987b2e ---- /dev/null -+++ b/xrOS/Resources/pyconfig.h -@@ -0,0 +1,11 @@ -+#ifdef __arm64__ -+# ifdef __LP64__ -+#include "pyconfig-arm64.h" -+# else -+#include "pyconfig-arm64_32.h" -+# endif -+#endif -+ -+#ifdef __x86_64__ -+#include "pyconfig-x86_64.h" -+#endif diff --git a/patch/Python/release.visionOS.exclude b/patch/Python/release.visionOS.exclude new file mode 100644 index 00000000..f1d0f75e --- /dev/null +++ b/patch/Python/release.visionOS.exclude @@ -0,0 +1,6 @@ +# This is a list of support package path patterns that we exclude +# from all Python-Apple-support tarballs. +# It is used by `tar -X` during the Makefile build. +# Remove pyc files. These take up space, but since most stdlib modules are +# never imported by user code, they mostly have no value. +*/__pycache__ From 9931a816569ab7afb353ab351c684bbc3aeed724 Mon Sep 17 00:00:00 2001 From: John Zhou Date: Mon, 14 Apr 2025 20:49:50 -0500 Subject: [PATCH 15/22] fixed build using conditional header copy --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 88affad5..83c2f4ed 100644 --- a/Makefile +++ b/Makefile @@ -492,11 +492,15 @@ $$(PYTHON_INCLUDE-$(sdk))/pyconfig.h: $$(PYTHON_LIB-$(sdk)) mkdir -p $$(PYTHON_INSTALL-$(sdk))/include ln -si ../Python.framework/Headers $$(PYTHON_INSTALL-$(sdk))/include/python$(PYTHON_VER) +ifeq ($(os), visionOS) + echo "Skipping arch-specific header copying for visionOS" +else # Add the individual headers from each target in an arch-specific name - $$(foreach target,$$(SDK_TARGETS-$(sdk)),cp $$(PYTHON_INCLUDE-$$(target))/pyconfig.h $$(PYTHON_INCLUDE-$(sdk))/pyconfig-$$(ARCH-$$(target)).h; ) + $(foreach target,$(SDK_TARGETS-$(sdk)),cp $(PYTHON_INCLUDE-$(target))/pyconfig.h $(PYTHON_INCLUDE-$(sdk))/pyconfig-$(ARCH-$(target)).h;) # Copy the cross-target header from the source folder of the first target in the $(sdk) SDK - cp $$(PYTHON_SRCDIR-$$(firstword $$(SDK_TARGETS-$(sdk))))/$(os)/Resources/pyconfig.h $$(PYTHON_INCLUDE-$(sdk))/pyconfig.h + cp $(PYTHON_SRCDIR-$(firstword $(SDK_TARGETS-$(sdk))))/$(os)/Resources/pyconfig.h $(PYTHON_INCLUDE-$(sdk))/pyconfig.h +endif $$(PYTHON_STDLIB-$(sdk))/LICENSE.TXT: $$(PYTHON_LIB-$(sdk)) $$(PYTHON_FRAMEWORK-$(sdk))/Info.plist $$(PYTHON_INCLUDE-$(sdk))/pyconfig.h $$(foreach target,$$(SDK_TARGETS-$(sdk)),$$(PYTHON_PLATFORM_SITECUSTOMIZE-$$(target))) From c2f6f5bb0a1a7a5c4d87ab58ef94386346aff9e2 Mon Sep 17 00:00:00 2001 From: John Date: Mon, 14 Apr 2025 21:39:24 -0500 Subject: [PATCH 16/22] Update Makefile Co-authored-by: Russell Keith-Magee --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 83c2f4ed..3ebfe479 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ # - iOS - build everything for iOS # - tvOS - build everything for tvOS # - watchOS - build everything for watchOS -# - xrOS - build everything for xrOS (visionOS) +# - visionOS - build everything for visionOS # Current directory PROJECT_DIR=$(shell pwd) From 9cf2fc08b0f19b5a6aa4204f91f6dc98b7c3aec4 Mon Sep 17 00:00:00 2001 From: John Zhou Date: Mon, 14 Apr 2025 21:46:04 -0500 Subject: [PATCH 17/22] apply sugg --- Makefile | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 3ebfe479..719a953d 100644 --- a/Makefile +++ b/Makefile @@ -130,7 +130,6 @@ target=$1 os=$2 OS_LOWER-$(target)=$(shell echo $(os) | tr '[:upper:]' '[:lower:]') -TRIPLE_OS-$(target)=$$(TRIPLE_OS-$(os)) # $(target) can be broken up into is composed of $(SDK).$(ARCH) SDK-$(target)=$$(basename $(target)) @@ -138,10 +137,10 @@ ARCH-$(target)=$$(subst .,,$$(suffix $(target))) ifneq ($(os),macOS) ifeq ($$(findstring simulator,$$(SDK-$(target))),) -TARGET_TRIPLE-$(target)=$$(ARCH-$(target))-apple-$$(TRIPLE_OS-$(target))$$(VERSION_MIN-$(os)) +TARGET_TRIPLE-$(target)=$$(ARCH-$(target))-apple-$$(TRIPLE_OS-$(os))$$(VERSION_MIN-$(os)) IS_SIMULATOR-$(target)=False else -TARGET_TRIPLE-$(target)=$$(ARCH-$(target))-apple-$$(TRIPLE_OS-$(target))$$(VERSION_MIN-$(os))-simulator +TARGET_TRIPLE-$(target)=$$(ARCH-$(target))-apple-$$(TRIPLE_OS-$(os))$$(VERSION_MIN-$(os))-simulator IS_SIMULATOR-$(target)=True endif endif @@ -408,16 +407,13 @@ define build-sdk sdk=$1 os=$2 -OS_LOWER-$(sdk)=$(shell echo $(os) | tr '[:upper:]' '[:lower:]') -TRIPLE_OS-$(sdk)=$$(TRIPLE_OS-$(os)) - SDK_TARGETS-$(sdk)=$$(filter $(sdk).%,$$(TARGETS-$(os))) SDK_ARCHES-$(sdk)=$$(sort $$(subst .,,$$(suffix $$(SDK_TARGETS-$(sdk))))) ifeq ($$(findstring simulator,$(sdk)),) -SDK_SLICE-$(sdk)=$$(TRIPLE_OS-$(sdk))-$$(shell echo $$(SDK_ARCHES-$(sdk)) | sed "s/ /_/g") +SDK_SLICE-$(sdk)=$$(TRIPLE_OS-$(os))-$$(shell echo $$(SDK_ARCHES-$(sdk)) | sed "s/ /_/g") else -SDK_SLICE-$(sdk)=$$(TRIPLE_OS-$(sdk))-$$(shell echo $$(SDK_ARCHES-$(sdk)) | sed "s/ /_/g")-simulator +SDK_SLICE-$(sdk)=$$(TRIPLE_OS-$(os))-$$(shell echo $$(SDK_ARCHES-$(sdk)) | sed "s/ /_/g")-simulator endif # Expand the build-target macro for target on this OS From e8fa5a41322bac23917863f628fde3b8163d1c6a Mon Sep 17 00:00:00 2001 From: John Zhou Date: Tue, 15 Apr 2025 07:54:26 -0500 Subject: [PATCH 18/22] upd patch --- patch/Python/Python.patch | 185 ++++++++++++++++++++++++-------------- 1 file changed, 117 insertions(+), 68 deletions(-) diff --git a/patch/Python/Python.patch b/patch/Python/Python.patch index 1650da2f..e726bf0f 100644 --- a/patch/Python/Python.patch +++ b/patch/Python/Python.patch @@ -1,5 +1,4 @@ -Note -- gitignore is not in the source tree - +Gitignore removed by john diff --git a/Lib/platform.py b/Lib/platform.py index 1f6baed66d3..9ccac040250 100644 --- a/Lib/platform.py @@ -170,6 +169,23 @@ index 18e6b8d25e5..8a8ec696510 100644 else: import _osx_support osname, release, machine = _osx_support.get_platform_osx( +diff --git a/Makefile.pre.in b/Makefile.pre.in +index 5fdbfa1053c..3580a386d40 100644 +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -209,6 +209,12 @@ MACOSX_DEPLOYMENT_TARGET=@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@ + # the build, and is only listed here so it will be included in sysconfigdata. + IPHONEOS_DEPLOYMENT_TARGET=@IPHONEOS_DEPLOYMENT_TARGET@ + ++# visionOS Deployment target is *actually* used during the build, by the ++# compiler shims; export. ++XROS_DEPLOYMENT_TARGET=@XROS_DEPLOYMENT_TARGET@ ++@EXPORT_XROS_DEPLOYMENT_TARGET@export XROS_DEPLOYMENT_TARGET ++ ++ + # Option to install to strip binaries + STRIPFLAG=-s + diff --git a/Misc/platform_triplet.c b/Misc/platform_triplet.c index ec0857a4a99..e52f486cdb3 100644 --- a/Misc/platform_triplet.c @@ -230,20 +246,21 @@ index 1bb6a05dc11..49febd56a37 100755 none--*) # None (no kernel, i.e. freestanding / bare metal), diff --git a/configure b/configure -index d0ae103014a..2dcc106da53 100755 +index d0ae103014a..47952522387 100755 --- a/configure +++ b/configure -@@ -974,6 +974,9 @@ LDFLAGS +@@ -974,6 +974,10 @@ LDFLAGS CFLAGS CC HAS_XCRUN ++EXPORT_XROS_DEPLOYMENT_TARGET +XROS_DEPLOYMENT_TARGET +WATCHOS_DEPLOYMENT_TARGET +TVOS_DEPLOYMENT_TARGET IPHONEOS_DEPLOYMENT_TARGET EXPORT_MACOSX_DEPLOYMENT_TARGET CONFIGURE_MACOSX_DEPLOYMENT_TARGET -@@ -4100,6 +4103,15 @@ then +@@ -4100,6 +4104,15 @@ then *-apple-ios*) ac_sys_system=iOS ;; @@ -259,7 +276,7 @@ index d0ae103014a..2dcc106da53 100755 *-*-darwin*) ac_sys_system=Darwin ;; -@@ -4181,7 +4193,7 @@ fi +@@ -4181,7 +4194,7 @@ fi # On cross-compile builds, configure will look for a host-specific compiler by # prepending the user-provided host triple to the required binary name. # @@ -268,7 +285,7 @@ index d0ae103014a..2dcc106da53 100755 # which isn't a binary that exists, and isn't very convenient, as it contains the # iOS version. As the default cross-compiler name won't exist, configure falls # back to gcc, which *definitely* won't work. We're providing wrapper scripts for -@@ -4196,6 +4208,17 @@ if test -z "$AR"; then +@@ -4196,6 +4209,17 @@ if test -z "$AR"; then aarch64-apple-ios*-simulator) AR=arm64-apple-ios-simulator-ar ;; aarch64-apple-ios*) AR=arm64-apple-ios-ar ;; x86_64-apple-ios*-simulator) AR=x86_64-apple-ios-simulator-ar ;; @@ -286,7 +303,7 @@ index d0ae103014a..2dcc106da53 100755 *) esac fi -@@ -4204,6 +4227,17 @@ if test -z "$CC"; then +@@ -4204,6 +4228,17 @@ if test -z "$CC"; then aarch64-apple-ios*-simulator) CC=arm64-apple-ios-simulator-clang ;; aarch64-apple-ios*) CC=arm64-apple-ios-clang ;; x86_64-apple-ios*-simulator) CC=x86_64-apple-ios-simulator-clang ;; @@ -304,7 +321,7 @@ index d0ae103014a..2dcc106da53 100755 *) esac fi -@@ -4212,6 +4246,17 @@ if test -z "$CPP"; then +@@ -4212,6 +4247,17 @@ if test -z "$CPP"; then aarch64-apple-ios*-simulator) CPP=arm64-apple-ios-simulator-cpp ;; aarch64-apple-ios*) CPP=arm64-apple-ios-cpp ;; x86_64-apple-ios*-simulator) CPP=x86_64-apple-ios-simulator-cpp ;; @@ -322,7 +339,7 @@ index d0ae103014a..2dcc106da53 100755 *) esac fi -@@ -4220,6 +4265,17 @@ if test -z "$CXX"; then +@@ -4220,6 +4266,17 @@ if test -z "$CXX"; then aarch64-apple-ios*-simulator) CXX=arm64-apple-ios-simulator-clang++ ;; aarch64-apple-ios*) CXX=arm64-apple-ios-clang++ ;; x86_64-apple-ios*-simulator) CXX=x86_64-apple-ios-simulator-clang++ ;; @@ -340,7 +357,7 @@ index d0ae103014a..2dcc106da53 100755 *) esac fi -@@ -4342,8 +4398,11 @@ then : +@@ -4342,8 +4399,11 @@ then : case $enableval in yes) case $ac_sys_system in @@ -354,7 +371,7 @@ index d0ae103014a..2dcc106da53 100755 *) as_fn_error $? "Unknown platform for framework build" "$LINENO" 5 esac esac -@@ -4352,6 +4411,9 @@ then : +@@ -4352,6 +4412,9 @@ then : no) case $ac_sys_system in iOS) as_fn_error $? "iOS builds must use --enable-framework" "$LINENO" 5 ;; @@ -364,7 +381,7 @@ index d0ae103014a..2dcc106da53 100755 *) PYTHONFRAMEWORK= PYTHONFRAMEWORKDIR=no-framework -@@ -4458,6 +4520,51 @@ then : +@@ -4458,6 +4521,51 @@ then : ac_config_files="$ac_config_files iOS/Resources/Info.plist" @@ -416,7 +433,7 @@ index d0ae103014a..2dcc106da53 100755 ;; *) as_fn_error $? "Unknown platform for framework build" "$LINENO" 5 -@@ -4469,6 +4576,9 @@ else case e in #( +@@ -4469,6 +4577,9 @@ else case e in #( e) case $ac_sys_system in iOS) as_fn_error $? "iOS builds must use --enable-framework" "$LINENO" 5 ;; @@ -426,7 +443,7 @@ index d0ae103014a..2dcc106da53 100755 *) PYTHONFRAMEWORK= PYTHONFRAMEWORKDIR=no-framework -@@ -4523,8 +4633,8 @@ then : +@@ -4523,8 +4634,8 @@ then : case "$withval" in yes) case $ac_sys_system in @@ -437,7 +454,7 @@ index d0ae103014a..2dcc106da53 100755 APP_STORE_COMPLIANCE_PATCH="Mac/Resources/app-store-compliance.patch" ;; *) as_fn_error $? "no default app store compliance patch available for $ac_sys_system" "$LINENO" 5 ;; -@@ -4542,8 +4652,8 @@ printf "%s\n" "applying custom app store compliance patch" >&6; } +@@ -4542,8 +4653,8 @@ printf "%s\n" "applying custom app store compliance patch" >&6; } else case e in #( e) case $ac_sys_system in @@ -448,7 +465,16 @@ index d0ae103014a..2dcc106da53 100755 APP_STORE_COMPLIANCE_PATCH="Mac/Resources/app-store-compliance.patch" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: applying default app store compliance patch" >&5 printf "%s\n" "applying default app store compliance patch" >&6; } -@@ -4598,6 +4708,72 @@ printf "%s\n" "$IPHONEOS_DEPLOYMENT_TARGET" >&6; } +@@ -4561,6 +4672,8 @@ fi + + + ++EXPORT_XROS_DEPLOYMENT_TARGET='#' ++ + + if test "$cross_compiling" = yes; then + case "$host" in +@@ -4598,6 +4711,78 @@ printf "%s\n" "$IPHONEOS_DEPLOYMENT_TARGET" >&6; } ;; esac ;; @@ -508,6 +534,12 @@ index d0ae103014a..2dcc106da53 100755 + XROS_DEPLOYMENT_TARGET=${XROS_DEPLOYMENT_TARGET:=2.0} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XROS_DEPLOYMENT_TARGET" >&5 +printf "%s\n" "$XROS_DEPLOYMENT_TARGET" >&6; } ++ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking exporting flag of visionOS deployment target" >&5 ++printf %s "checking exporting flag of visionOS deployment target... " >&6; } ++ export XROS_DEPLOYMENT_TARGET ++ EXPORT_XROS_DEPLOYMENT_TARGET='' ++ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $EXPORT_XROS_DEPLOYMENT_TARGET" >&5 ++printf "%s\n" "$EXPORT_XROS_DEPLOYMENT_TARGET" >&6; } + + case "$host_cpu" in + aarch64) @@ -521,7 +553,7 @@ index d0ae103014a..2dcc106da53 100755 *-*-darwin*) case "$host_cpu" in arm*) -@@ -4688,9 +4864,15 @@ printf "%s\n" "#define _BSD_SOURCE 1" >>confdefs.h +@@ -4688,9 +4873,15 @@ printf "%s\n" "#define _BSD_SOURCE 1" >>confdefs.h define_xopen_source=no;; Darwin/[12][0-9].*) define_xopen_source=no;; @@ -538,7 +570,7 @@ index d0ae103014a..2dcc106da53 100755 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from # defining NI_NUMERICHOST. QNX/6.3.2) -@@ -4753,7 +4935,11 @@ fi +@@ -4753,7 +4944,13 @@ fi CONFIGURE_MACOSX_DEPLOYMENT_TARGET= EXPORT_MACOSX_DEPLOYMENT_TARGET='#' @@ -548,10 +580,12 @@ index d0ae103014a..2dcc106da53 100755 + + + ++ ++# XROS_DEPLOYMENT_TARGET should get exported # checks for alternative programs -@@ -4794,6 +4980,16 @@ case $ac_sys_system in #( +@@ -4794,6 +4991,16 @@ case $ac_sys_system in #( as_fn_append CFLAGS " -mios-version-min=${IPHONEOS_DEPLOYMENT_TARGET}" as_fn_append LDFLAGS " -mios-version-min=${IPHONEOS_DEPLOYMENT_TARGET}" ;; #( @@ -568,7 +602,7 @@ index d0ae103014a..2dcc106da53 100755 *) : ;; esac -@@ -7163,6 +7359,12 @@ case $ac_sys_system in #( +@@ -7163,6 +7370,12 @@ case $ac_sys_system in #( MULTIARCH="" ;; #( iOS) : MULTIARCH="" ;; #( @@ -581,7 +615,7 @@ index d0ae103014a..2dcc106da53 100755 FreeBSD*) : MULTIARCH="" ;; #( *) : -@@ -7183,7 +7385,7 @@ fi +@@ -7183,7 +7396,7 @@ fi printf "%s\n" "$MULTIARCH" >&6; } case $ac_sys_system in #( @@ -590,7 +624,7 @@ index d0ae103014a..2dcc106da53 100755 SOABI_PLATFORM=`echo "$PLATFORM_TRIPLET" | cut -d '-' -f2` ;; #( *) : SOABI_PLATFORM=$PLATFORM_TRIPLET -@@ -7234,6 +7436,18 @@ case $host/$ac_cv_cc_name in #( +@@ -7234,6 +7447,18 @@ case $host/$ac_cv_cc_name in #( PY_SUPPORT_TIER=3 ;; #( aarch64-apple-ios*/clang) : PY_SUPPORT_TIER=3 ;; #( @@ -609,7 +643,7 @@ index d0ae103014a..2dcc106da53 100755 aarch64-*-linux-android/clang) : PY_SUPPORT_TIER=3 ;; #( x86_64-*-linux-android/clang) : -@@ -7670,7 +7884,7 @@ then +@@ -7670,7 +7895,7 @@ then case $ac_sys_system in Darwin) LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)';; @@ -618,7 +652,7 @@ index d0ae103014a..2dcc106da53 100755 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK)';; *) as_fn_error $? "Unknown platform for framework build" "$LINENO" 5;; -@@ -7736,7 +7950,7 @@ printf "%s\n" "#define Py_ENABLE_SHARED 1" >>confdefs.h +@@ -7736,7 +7961,7 @@ printf "%s\n" "#define Py_ENABLE_SHARED 1" >>confdefs.h BLDLIBRARY='-L. -lpython$(LDVERSION)' RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}} ;; @@ -627,7 +661,7 @@ index d0ae103014a..2dcc106da53 100755 LDLIBRARY='libpython$(LDVERSION).dylib' ;; AIX*) -@@ -13544,7 +13758,7 @@ then +@@ -13544,7 +13769,7 @@ then BLDSHARED="$LDSHARED" fi ;; @@ -636,7 +670,7 @@ index d0ae103014a..2dcc106da53 100755 LDSHARED='$(CC) -dynamiclib -F . -framework $(PYTHONFRAMEWORK)' LDCXXSHARED='$(CXX) -dynamiclib -F . -framework $(PYTHONFRAMEWORK)' BLDSHARED="$LDSHARED" -@@ -13677,7 +13891,7 @@ then +@@ -13677,7 +13902,7 @@ then Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";; Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";; # -u libsys_s pulls in all symbols in libsys @@ -645,7 +679,7 @@ index d0ae103014a..2dcc106da53 100755 LINKFORSHARED="$extra_undefs -framework CoreFoundation" # Issue #18075: the default maximum stack size (8MBytes) is too -@@ -13701,7 +13915,7 @@ printf "%s\n" "#define THREAD_STACK_SIZE 0x$stack_size" >>confdefs.h +@@ -13701,7 +13926,7 @@ printf "%s\n" "#define THREAD_STACK_SIZE 0x$stack_size" >>confdefs.h LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' fi LINKFORSHARED="$LINKFORSHARED" @@ -654,7 +688,7 @@ index d0ae103014a..2dcc106da53 100755 LINKFORSHARED="-Wl,-stack_size,$stack_size $LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK)' fi ;; -@@ -15286,7 +15500,7 @@ then : +@@ -15286,7 +15511,7 @@ then : ctypes_malloc_closure=yes ;; #( @@ -663,7 +697,7 @@ index d0ae103014a..2dcc106da53 100755 ctypes_malloc_closure=yes ;; #( -@@ -19038,12 +19252,6 @@ if test "x$ac_cv_func_dup3" = xyes +@@ -19038,12 +19263,6 @@ if test "x$ac_cv_func_dup3" = xyes then : printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h @@ -676,7 +710,7 @@ index d0ae103014a..2dcc106da53 100755 fi ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero" if test "x$ac_cv_func_explicit_bzero" = xyes -@@ -19104,18 +19312,6 @@ if test "x$ac_cv_func_fexecve" = xyes +@@ -19104,18 +19323,6 @@ if test "x$ac_cv_func_fexecve" = xyes then : printf "%s\n" "#define HAVE_FEXECVE 1" >>confdefs.h @@ -695,7 +729,7 @@ index d0ae103014a..2dcc106da53 100755 fi ac_fn_c_check_func "$LINENO" "fpathconf" "ac_cv_func_fpathconf" if test "x$ac_cv_func_fpathconf" = xyes -@@ -19542,24 +19738,6 @@ if test "x$ac_cv_func_posix_openpt" = xyes +@@ -19542,24 +19749,6 @@ if test "x$ac_cv_func_posix_openpt" = xyes then : printf "%s\n" "#define HAVE_POSIX_OPENPT 1" >>confdefs.h @@ -720,7 +754,7 @@ index d0ae103014a..2dcc106da53 100755 fi ac_fn_c_check_func "$LINENO" "pread" "ac_cv_func_pread" if test "x$ac_cv_func_pread" = xyes -@@ -19866,12 +20044,6 @@ if test "x$ac_cv_func_sigaction" = xyes +@@ -19866,12 +20055,6 @@ if test "x$ac_cv_func_sigaction" = xyes then : printf "%s\n" "#define HAVE_SIGACTION 1" >>confdefs.h @@ -733,7 +767,7 @@ index d0ae103014a..2dcc106da53 100755 fi ac_fn_c_check_func "$LINENO" "sigfillset" "ac_cv_func_sigfillset" if test "x$ac_cv_func_sigfillset" = xyes -@@ -20140,11 +20312,11 @@ fi +@@ -20140,11 +20323,11 @@ fi fi @@ -747,7 +781,7 @@ index d0ae103014a..2dcc106da53 100755 ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy" if test "x$ac_cv_func_getentropy" = xyes then : -@@ -20166,6 +20338,53 @@ fi +@@ -20166,6 +20349,53 @@ fi fi @@ -801,7 +835,7 @@ index d0ae103014a..2dcc106da53 100755 { 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} -@@ -23248,7 +23467,8 @@ fi +@@ -23248,7 +23478,8 @@ fi # check for openpty, login_tty, and forkpty @@ -811,7 +845,7 @@ index d0ae103014a..2dcc106da53 100755 for ac_func in openpty do : -@@ -23362,7 +23582,7 @@ esac +@@ -23362,7 +23593,7 @@ esac fi done @@ -820,7 +854,7 @@ index d0ae103014a..2dcc106da53 100755 printf %s "checking for library containing login_tty... " >&6; } if test ${ac_cv_search_login_tty+y} then : -@@ -23545,6 +23765,7 @@ esac +@@ -23545,6 +23776,7 @@ esac fi done @@ -828,7 +862,7 @@ index d0ae103014a..2dcc106da53 100755 # check for long file support functions ac_fn_c_check_func "$LINENO" "fseek64" "ac_cv_func_fseek64" -@@ -23810,10 +24031,10 @@ fi +@@ -23810,10 +24042,10 @@ fi done @@ -841,7 +875,7 @@ index d0ae103014a..2dcc106da53 100755 then for ac_func in clock_settime -@@ -26152,8 +26373,8 @@ if test "$PY_ENABLE_SHARED" = "1" && ( test -n "$ANDROID_API_LEVEL" || test "$MA +@@ -26152,8 +26384,8 @@ if test "$PY_ENABLE_SHARED" = "1" && ( test -n "$ANDROID_API_LEVEL" || test "$MA LIBPYTHON="\$(BLDLIBRARY)" fi @@ -852,7 +886,7 @@ index d0ae103014a..2dcc106da53 100755 MODULE_DEPS_SHARED="$MODULE_DEPS_SHARED \$(PYTHONFRAMEWORKDIR)/\$(PYTHONFRAMEWORK)" fi -@@ -29023,7 +29244,7 @@ LIBS=$save_LIBS +@@ -29023,7 +29255,7 @@ LIBS=$save_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for device files" >&5 printf "%s\n" "$as_me: checking for device files" >&6;} @@ -861,7 +895,7 @@ index d0ae103014a..2dcc106da53 100755 ac_cv_file__dev_ptmx=no ac_cv_file__dev_ptc=no else -@@ -29504,7 +29725,7 @@ else case e in #( +@@ -29504,7 +29736,7 @@ else case e in #( with_ensurepip=no ;; #( WASI) : with_ensurepip=no ;; #( @@ -870,7 +904,7 @@ index d0ae103014a..2dcc106da53 100755 with_ensurepip=no ;; #( *) : with_ensurepip=upgrade -@@ -30484,7 +30705,7 @@ case $ac_sys_system in #( +@@ -30484,7 +30716,7 @@ case $ac_sys_system in #( ;; #( Darwin) : ;; #( @@ -879,7 +913,7 @@ index d0ae103014a..2dcc106da53 100755 -@@ -34487,6 +34708,9 @@ do +@@ -34487,6 +34719,9 @@ do "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;; "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;; "iOS/Resources/Info.plist") CONFIG_FILES="$CONFIG_FILES iOS/Resources/Info.plist" ;; @@ -890,7 +924,7 @@ index d0ae103014a..2dcc106da53 100755 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;; "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;; diff --git a/configure.ac b/configure.ac -index 8bb0f1c6ef4..c49e8809f8c 100644 +index 8bb0f1c6ef4..0c1c2ca50cc 100644 --- a/configure.ac +++ b/configure.ac @@ -330,6 +330,15 @@ then @@ -1095,7 +1129,16 @@ index 8bb0f1c6ef4..c49e8809f8c 100644 APP_STORE_COMPLIANCE_PATCH="Mac/Resources/app-store-compliance.patch" AC_MSG_RESULT([applying default app store compliance patch]) ;; -@@ -794,6 +898,66 @@ if test "$cross_compiling" = yes; then +@@ -759,6 +863,8 @@ AC_ARG_WITH( + ]) + AC_SUBST([APP_STORE_COMPLIANCE_PATCH]) + ++EXPORT_XROS_DEPLOYMENT_TARGET='#' ++ + AC_SUBST([_PYTHON_HOST_PLATFORM]) + if test "$cross_compiling" = yes; then + case "$host" in +@@ -794,6 +900,70 @@ if test "$cross_compiling" = yes; then ;; esac ;; @@ -1149,6 +1192,10 @@ index 8bb0f1c6ef4..c49e8809f8c 100644 + XROS_DEPLOYMENT_TARGET=${_host_os:8} + XROS_DEPLOYMENT_TARGET=${XROS_DEPLOYMENT_TARGET:=2.0} + AC_MSG_RESULT([$XROS_DEPLOYMENT_TARGET]) ++ AC_MSG_CHECKING([exporting flag of visionOS deployment target]) ++ export XROS_DEPLOYMENT_TARGET ++ EXPORT_XROS_DEPLOYMENT_TARGET='' ++ AC_MSG_RESULT([$EXPORT_XROS_DEPLOYMENT_TARGET]) + + case "$host_cpu" in + aarch64) @@ -1162,7 +1209,7 @@ index 8bb0f1c6ef4..c49e8809f8c 100644 *-*-darwin*) case "$host_cpu" in arm*) -@@ -883,9 +1047,15 @@ case $ac_sys_system/$ac_sys_release in +@@ -883,9 +1053,15 @@ case $ac_sys_system/$ac_sys_release in define_xopen_source=no;; Darwin/@<:@[12]@:>@@<:@0-9@:>@.*) define_xopen_source=no;; @@ -1179,7 +1226,7 @@ index 8bb0f1c6ef4..c49e8809f8c 100644 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from # defining NI_NUMERICHOST. QNX/6.3.2) -@@ -944,8 +1114,12 @@ AC_SUBST([EXPORT_MACOSX_DEPLOYMENT_TARGET]) +@@ -944,8 +1120,14 @@ AC_SUBST([EXPORT_MACOSX_DEPLOYMENT_TARGET]) CONFIGURE_MACOSX_DEPLOYMENT_TARGET= EXPORT_MACOSX_DEPLOYMENT_TARGET='#' @@ -1190,10 +1237,12 @@ index 8bb0f1c6ef4..c49e8809f8c 100644 +AC_SUBST([TVOS_DEPLOYMENT_TARGET]) +AC_SUBST([WATCHOS_DEPLOYMENT_TARGET]) +AC_SUBST([XROS_DEPLOYMENT_TARGET]) ++# XROS_DEPLOYMENT_TARGET should get exported ++AC_SUBST([EXPORT_XROS_DEPLOYMENT_TARGET]) # checks for alternative programs -@@ -979,11 +1153,19 @@ AS_CASE([$host], +@@ -979,11 +1161,19 @@ AS_CASE([$host], ], ) @@ -1214,7 +1263,7 @@ index 8bb0f1c6ef4..c49e8809f8c 100644 ], ) -@@ -1172,6 +1354,9 @@ AC_MSG_CHECKING([for multiarch]) +@@ -1172,6 +1362,9 @@ AC_MSG_CHECKING([for multiarch]) AS_CASE([$ac_sys_system], [Darwin*], [MULTIARCH=""], [iOS], [MULTIARCH=""], @@ -1224,7 +1273,7 @@ index 8bb0f1c6ef4..c49e8809f8c 100644 [FreeBSD*], [MULTIARCH=""], [MULTIARCH=$($CC --print-multiarch 2>/dev/null)] ) -@@ -1193,7 +1378,7 @@ dnl will have multiple sysconfig modules (one for each CPU architecture), but +@@ -1193,7 +1386,7 @@ dnl will have multiple sysconfig modules (one for each CPU architecture), but dnl use a single "fat" binary at runtime. SOABI_PLATFORM is the component of dnl the PLATFORM_TRIPLET that will be used in binary module extensions. AS_CASE([$ac_sys_system], @@ -1233,7 +1282,7 @@ index 8bb0f1c6ef4..c49e8809f8c 100644 [SOABI_PLATFORM=$PLATFORM_TRIPLET] ) -@@ -1227,6 +1412,12 @@ AS_CASE([$host/$ac_cv_cc_name], +@@ -1227,6 +1420,12 @@ AS_CASE([$host/$ac_cv_cc_name], [x86_64-*-freebsd*/clang], [PY_SUPPORT_TIER=3], dnl FreeBSD on AMD64 [aarch64-apple-ios*-simulator/clang], [PY_SUPPORT_TIER=3], dnl iOS Simulator on arm64 [aarch64-apple-ios*/clang], [PY_SUPPORT_TIER=3], dnl iOS on ARM64 @@ -1246,7 +1295,7 @@ index 8bb0f1c6ef4..c49e8809f8c 100644 [aarch64-*-linux-android/clang], [PY_SUPPORT_TIER=3], dnl Android on ARM64 [x86_64-*-linux-android/clang], [PY_SUPPORT_TIER=3], dnl Android on AMD64 -@@ -1536,7 +1727,7 @@ then +@@ -1536,7 +1735,7 @@ then case $ac_sys_system in Darwin) LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)';; @@ -1255,7 +1304,7 @@ index 8bb0f1c6ef4..c49e8809f8c 100644 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK)';; *) AC_MSG_ERROR([Unknown platform for framework build]);; -@@ -1601,7 +1792,7 @@ if test $enable_shared = "yes"; then +@@ -1601,7 +1800,7 @@ if test $enable_shared = "yes"; then BLDLIBRARY='-L. -lpython$(LDVERSION)' RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}} ;; @@ -1264,7 +1313,7 @@ index 8bb0f1c6ef4..c49e8809f8c 100644 LDLIBRARY='libpython$(LDVERSION).dylib' ;; AIX*) -@@ -3456,7 +3647,7 @@ then +@@ -3456,7 +3655,7 @@ then BLDSHARED="$LDSHARED" fi ;; @@ -1273,7 +1322,7 @@ index 8bb0f1c6ef4..c49e8809f8c 100644 LDSHARED='$(CC) -dynamiclib -F . -framework $(PYTHONFRAMEWORK)' LDCXXSHARED='$(CXX) -dynamiclib -F . -framework $(PYTHONFRAMEWORK)' BLDSHARED="$LDSHARED" -@@ -3580,7 +3771,7 @@ then +@@ -3580,7 +3779,7 @@ then Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";; Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";; # -u libsys_s pulls in all symbols in libsys @@ -1282,7 +1331,7 @@ index 8bb0f1c6ef4..c49e8809f8c 100644 LINKFORSHARED="$extra_undefs -framework CoreFoundation" # Issue #18075: the default maximum stack size (8MBytes) is too -@@ -3604,7 +3795,7 @@ then +@@ -3604,7 +3803,7 @@ then LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' fi LINKFORSHARED="$LINKFORSHARED" @@ -1291,7 +1340,7 @@ index 8bb0f1c6ef4..c49e8809f8c 100644 LINKFORSHARED="-Wl,-stack_size,$stack_size $LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK)' fi ;; -@@ -4024,7 +4215,7 @@ AS_VAR_IF([have_libffi], [yes], [ +@@ -4024,7 +4223,7 @@ AS_VAR_IF([have_libffi], [yes], [ dnl when do we need USING_APPLE_OS_LIBFFI? ctypes_malloc_closure=yes ], @@ -1300,7 +1349,7 @@ index 8bb0f1c6ef4..c49e8809f8c 100644 ctypes_malloc_closure=yes ], [sunos5], [AS_VAR_APPEND([LIBFFI_LIBS], [" -mimpure-text"])] -@@ -5133,9 +5324,9 @@ fi +@@ -5133,9 +5332,9 @@ fi # checks for library functions AC_CHECK_FUNCS([ \ accept4 alarm bind_textdomain_codeset chmod chown clock closefrom close_range confstr \ @@ -1312,7 +1361,7 @@ index 8bb0f1c6ef4..c49e8809f8c 100644 gai_strerror getegid geteuid getgid getgrent getgrgid getgrgid_r \ getgrnam_r getgrouplist gethostname getitimer getloadavg getlogin \ getpeername getpgid getpid getppid getpriority _getpty \ -@@ -5143,8 +5334,7 @@ AC_CHECK_FUNCS([ \ +@@ -5143,8 +5342,7 @@ AC_CHECK_FUNCS([ \ getspnam getuid getwd grantpt 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 \ @@ -1322,7 +1371,7 @@ index 8bb0f1c6ef4..c49e8809f8c 100644 pread preadv preadv2 process_vm_readv \ pthread_cond_timedwait_relative_np pthread_condattr_setclock pthread_init \ pthread_kill pthread_getname_np pthread_setname_np pthread_getattr_np \ -@@ -5153,7 +5343,7 @@ AC_CHECK_FUNCS([ \ +@@ -5153,7 +5351,7 @@ AC_CHECK_FUNCS([ \ sched_setparam sched_setscheduler sem_clockwait sem_getvalue sem_open \ sem_timedwait sem_unlink sendfile setegid seteuid setgid sethostname \ setitimer setlocale setpgid setpgrp setpriority setregid setresgid \ @@ -1331,7 +1380,7 @@ index 8bb0f1c6ef4..c49e8809f8c 100644 sigfillset siginterrupt sigpending sigrelse sigtimedwait sigwait \ sigwaitinfo snprintf splice strftime strlcpy strsignal symlinkat sync \ sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile \ -@@ -5168,12 +5358,20 @@ if test "$MACHDEP" != linux; then +@@ -5168,12 +5366,20 @@ if test "$MACHDEP" != linux; then AC_CHECK_FUNCS([lchmod]) fi @@ -1355,7 +1404,7 @@ index 8bb0f1c6ef4..c49e8809f8c 100644 fi AC_CHECK_DECL([dirfd], -@@ -5427,20 +5625,23 @@ PY_CHECK_FUNC([setgroups], [ +@@ -5427,20 +5633,23 @@ PY_CHECK_FUNC([setgroups], [ ]) # check for openpty, login_tty, and forkpty @@ -1393,7 +1442,7 @@ index 8bb0f1c6ef4..c49e8809f8c 100644 # check for long file support functions AC_CHECK_FUNCS([fseek64 fseeko fstatvfs ftell64 ftello statvfs]) -@@ -5479,10 +5680,10 @@ AC_CHECK_FUNCS([clock_getres], [], [ +@@ -5479,10 +5688,10 @@ AC_CHECK_FUNCS([clock_getres], [], [ ]) ]) @@ -1406,7 +1455,7 @@ index 8bb0f1c6ef4..c49e8809f8c 100644 then AC_CHECK_FUNCS([clock_settime], [], [ AC_CHECK_LIB([rt], [clock_settime], [ -@@ -6233,8 +6434,8 @@ if test "$PY_ENABLE_SHARED" = "1" && ( test -n "$ANDROID_API_LEVEL" || test "$MA +@@ -6233,8 +6442,8 @@ if test "$PY_ENABLE_SHARED" = "1" && ( test -n "$ANDROID_API_LEVEL" || test "$MA LIBPYTHON="\$(BLDLIBRARY)" fi @@ -1417,7 +1466,7 @@ index 8bb0f1c6ef4..c49e8809f8c 100644 MODULE_DEPS_SHARED="$MODULE_DEPS_SHARED \$(PYTHONFRAMEWORKDIR)/\$(PYTHONFRAMEWORK)" fi -@@ -6893,7 +7094,7 @@ AC_MSG_NOTICE([checking for device files]) +@@ -6893,7 +7102,7 @@ AC_MSG_NOTICE([checking for device files]) dnl NOTE: Inform user how to proceed with files when cross compiling. dnl Some cross-compile builds are predictable; they won't ever dnl have /dev/ptmx or /dev/ptc, so we can set them explicitly. @@ -1426,7 +1475,7 @@ index 8bb0f1c6ef4..c49e8809f8c 100644 ac_cv_file__dev_ptmx=no ac_cv_file__dev_ptc=no else -@@ -7174,7 +7375,7 @@ AC_ARG_WITH([ensurepip], +@@ -7174,7 +7383,7 @@ AC_ARG_WITH([ensurepip], AS_CASE([$ac_sys_system], [Emscripten], [with_ensurepip=no], [WASI], [with_ensurepip=no], @@ -1435,7 +1484,7 @@ index 8bb0f1c6ef4..c49e8809f8c 100644 [with_ensurepip=upgrade] ) ]) -@@ -7585,7 +7786,7 @@ AS_CASE([$ac_sys_system], +@@ -7585,7 +7794,7 @@ AS_CASE([$ac_sys_system], [VxWorks*], [PY_STDLIB_MOD_SET_NA([_scproxy], [termios], [grp])], dnl The _scproxy module is available on macOS [Darwin], [], From f7991739bf6388191dde5c10ef501c8086a64ecc Mon Sep 17 00:00:00 2001 From: John Zhou Date: Tue, 15 Apr 2025 07:57:21 -0500 Subject: [PATCH 19/22] ci i guess --- .github/workflows/ci.yaml | 2 +- .github/workflows/publish.yaml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 22859602..1f53f4cc 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -89,7 +89,7 @@ jobs: strategy: fail-fast: false matrix: - target: ['macOS', 'iOS', 'tvOS', 'watchOS'] + target: ['macOS', 'iOS', 'tvOS', 'watchOS', 'visionOS'] include: - briefcase-run-args: - run-tests: false diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 3d6922ba..c06a6e06 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -48,3 +48,6 @@ jobs: # watchOS build curl -o watchOS-artefact.tar.gz -L https://github.com/beeware/Python-Apple-support/releases/download/${{ steps.build-vars.outputs.TAG }}/Python-${{ steps.build-vars.outputs.PYTHON_VER }}-watchOS-support.${{ steps.build-vars.outputs.BUILD_NUMBER }}.tar.gz aws s3 cp watchOS-artefact.tar.gz s3://briefcase-support/python/${{ steps.build-vars.outputs.PYTHON_VER }}/watchOS/Python-${{ steps.build-vars.outputs.PYTHON_VER }}-watchOS-support.${{ steps.build-vars.outputs.BUILD_NUMBER }}.tar.gz + # visionOS build + curl -o visionOS-artefact.tar.gz -L https://github.com/beeware/Python-Apple-support/releases/download/${{ steps.build-vars.outputs.TAG }}/Python-${{ steps.build-vars.outputs.PYTHON_VER }}-visionOS-support.${{ steps.build-vars.outputs.BUILD_NUMBER }}.tar.gz + aws s3 cp visionOS-artefact.tar.gz s3://briefcase-support/python/${{ steps.build-vars.outputs.PYTHON_VER }}/visionOS/Python-${{ steps.build-vars.outputs.PYTHON_VER }}-visionOS-support.${{ steps.build-vars.outputs.BUILD_NUMBER }}.tar.gz From 1c8b7930316f6a24d09928063c307fb05dce1bc1 Mon Sep 17 00:00:00 2001 From: John Zhou Date: Tue, 15 Apr 2025 21:25:54 -0500 Subject: [PATCH 20/22] fix makefile --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 719a953d..7f938354 100644 --- a/Makefile +++ b/Makefile @@ -492,10 +492,10 @@ ifeq ($(os), visionOS) echo "Skipping arch-specific header copying for visionOS" else # Add the individual headers from each target in an arch-specific name - $(foreach target,$(SDK_TARGETS-$(sdk)),cp $(PYTHON_INCLUDE-$(target))/pyconfig.h $(PYTHON_INCLUDE-$(sdk))/pyconfig-$(ARCH-$(target)).h;) + $$(foreach target,$$(SDK_TARGETS-$(sdk)),cp $$(PYTHON_INCLUDE-$$(target))/pyconfig.h $$(PYTHON_INCLUDE-$(sdk))/pyconfig-$$(ARCH-$$(target)).h; ) # Copy the cross-target header from the source folder of the first target in the $(sdk) SDK - cp $(PYTHON_SRCDIR-$(firstword $(SDK_TARGETS-$(sdk))))/$(os)/Resources/pyconfig.h $(PYTHON_INCLUDE-$(sdk))/pyconfig.h + cp $$(PYTHON_SRCDIR-$$(firstword $$(SDK_TARGETS-$(sdk))))/$(os)/Resources/pyconfig.h $$(PYTHON_INCLUDE-$(sdk))/pyconfig.h endif From 1274694b02ba2e36b48623aec0464b08bbdec531 Mon Sep 17 00:00:00 2001 From: John Zhou Date: Thu, 17 Apr 2025 19:39:02 -0500 Subject: [PATCH 21/22] updates to patch and makefilw --- Makefile | 2 +- patch/Python/Python.patch | 1766 ++++++++++++++++++++++++++++++++++++- 2 files changed, 1760 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 7f938354..b1a21d09 100644 --- a/Makefile +++ b/Makefile @@ -661,7 +661,7 @@ $$(PYTHON_XCFRAMEWORK-$(os))/Info.plist: \ $$(foreach sdk,$$(SDKS-$(os)),cp -r $$(PYTHON_INSTALL-$$(sdk))/lib $$(PYTHON_XCFRAMEWORK-$(os))/$$(SDK_SLICE-$$(sdk)); ) $$(foreach sdk,$$(SDKS-$(os)),cp -r $$(PYTHON_INSTALL-$$(sdk))/platform-config $$(PYTHON_XCFRAMEWORK-$(os))/$$(SDK_SLICE-$$(sdk)); ) -ifeq ($(os),iOS) +ifeq ($(filter $(os),iOS visionOS),$(os)) @echo ">>> Clone testbed project for $(os)" $(HOST_PYTHON) $$(PYTHON_SRCDIR-$$(firstword $$(SDK_TARGETS-$$(firstword $$(SDKS-$(os))))))/iOS/testbed clone --framework $$(PYTHON_XCFRAMEWORK-$(os)) support/$(PYTHON_VER)/$(os)/testbed endif diff --git a/patch/Python/Python.patch b/patch/Python/Python.patch index e726bf0f..fec4a3aa 100644 --- a/patch/Python/Python.patch +++ b/patch/Python/Python.patch @@ -1,6 +1,53 @@ -Gitignore removed by john +diff --git a/Lib/ctypes/__init__.py b/Lib/ctypes/__init__.py +index 8e2a2926f7a..a0384634a49 100644 +--- a/Lib/ctypes/__init__.py ++++ b/Lib/ctypes/__init__.py +@@ -359,7 +359,7 @@ def __init__(self, name, mode=DEFAULT_MODE, handle=None, + if name: + name = _os.fspath(name) + +- # If the filename that has been provided is an iOS/tvOS/watchOS ++ # If the filename that has been provided is an iOS/tvOS/watchOS/visionOS + # .fwork file, dereference the location to the true origin of the + # binary. + if name.endswith(".fwork"): +diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py +index 99504911a3d..6f6d1a4e837 100644 +--- a/Lib/ctypes/util.py ++++ b/Lib/ctypes/util.py +@@ -425,7 +425,7 @@ def find_library(name): + # https://man.openbsd.org/dl_iterate_phdr + # https://docs.oracle.com/cd/E88353_01/html/E37843/dl-iterate-phdr-3c.html + if (os.name == "posix" and +- sys.platform not in {"darwin", "ios", "tvos", "watchos"}): ++ sys.platform not in {"darwin", "ios", "tvos", "watchos", "visionos"}): + import ctypes + if hasattr((_libc := ctypes.CDLL(None)), "dl_iterate_phdr"): + +diff --git a/Lib/importlib/_bootstrap_external.py b/Lib/importlib/_bootstrap_external.py +index 8bcd741c446..d8a6f28edba 100644 +--- a/Lib/importlib/_bootstrap_external.py ++++ b/Lib/importlib/_bootstrap_external.py +@@ -52,7 +52,7 @@ + + # Bootstrap-related code ###################################################### + _CASE_INSENSITIVE_PLATFORMS_STR_KEY = 'win', +-_CASE_INSENSITIVE_PLATFORMS_BYTES_KEY = 'cygwin', 'darwin', 'ios', 'tvos', 'watchos' ++_CASE_INSENSITIVE_PLATFORMS_BYTES_KEY = 'cygwin', 'darwin', 'ios', 'tvos', 'watchos', 'visionos' + _CASE_INSENSITIVE_PLATFORMS = (_CASE_INSENSITIVE_PLATFORMS_BYTES_KEY + + _CASE_INSENSITIVE_PLATFORMS_STR_KEY) + +@@ -1535,7 +1535,7 @@ def _get_supported_file_loaders(): + """ + extension_loaders = [] + if hasattr(_imp, 'create_dynamic'): +- if sys.platform in {"ios", "tvos", "watchos"}: ++ if sys.platform in {"ios", "tvos", "watchos", "visionos"}: + extension_loaders = [(AppleFrameworkLoader, [ + suffix.replace(".so", ".fwork") + for suffix in _imp.extension_suffixes() diff --git a/Lib/platform.py b/Lib/platform.py -index 1f6baed66d3..9ccac040250 100644 +index 1f6baed66d3..6276d0dbdd3 100644 --- a/Lib/platform.py +++ b/Lib/platform.py @@ -521,6 +521,78 @@ def ios_ver(system="", release="", model="", is_simulator=False): @@ -82,6 +129,15 @@ index 1f6baed66d3..9ccac040250 100644 def _java_getprop(name, default): """This private helper is deprecated in 3.13 and will be removed in 3.15""" from java.lang import System +@@ -720,7 +792,7 @@ def _syscmd_file(target, default=''): + default in case the command should fail. + + """ +- if sys.platform in {'dos', 'win32', 'win16', 'ios', 'tvos', 'watchos'}: ++ if sys.platform in {'dos', 'win32', 'win16', 'ios', 'tvos', 'watchos', 'visionos'}: + # XXX Others too ? + return default + @@ -884,14 +956,30 @@ def get_OpenVMS(): csid, cpu_number = vms_lib.getsyi('SYI$_CPU', 0) return 'Alpha' if cpu_number >= 128 else 'VAX' @@ -146,11 +202,45 @@ index 1f6baed66d3..9ccac040250 100644 else: macos_release = mac_ver()[0] if macos_release: +diff --git a/Lib/site.py b/Lib/site.py +index 9da8b6724e1..345f55a5bde 100644 +--- a/Lib/site.py ++++ b/Lib/site.py +@@ -297,8 +297,8 @@ def _getuserbase(): + if env_base: + return env_base + +- # Emscripten, iOS, tvOS, VxWorks, WASI, and watchOS have no home directories +- if sys.platform in {"emscripten", "ios", "tvos", "vxworks", "wasi", "watchos"}: ++ # Emscripten, iOS, tvOS, visionOS, VxWorks, WASI, and watchOS have no home directories ++ if sys.platform in {"emscripten", "ios", "tvos", "vxworks", "visionos", "wasi", "watchos"}: + return None + + def joinuser(*args): diff --git a/Lib/sysconfig/__init__.py b/Lib/sysconfig/__init__.py -index 18e6b8d25e5..8a8ec696510 100644 +index 18e6b8d25e5..64603fb1bb1 100644 --- a/Lib/sysconfig/__init__.py +++ b/Lib/sysconfig/__init__.py -@@ -719,6 +719,18 @@ def get_platform(): +@@ -23,6 +23,9 @@ + _ALWAYS_STR = { + 'IPHONEOS_DEPLOYMENT_TARGET', + 'MACOSX_DEPLOYMENT_TARGET', ++ 'TVOS_DEPLOYMENT_TARGET', ++ 'WATCHOS_DEPLOYMENT_TARGET', ++ 'XROS_DEPLOYMENT_TARGET', + } + + _INSTALL_SCHEMES = { +@@ -119,7 +122,7 @@ def _getuserbase(): + # Emscripten, iOS, tvOS, VxWorks, WASI, and watchOS have no home directories. + # Use _PYTHON_HOST_PLATFORM to get the correct platform when cross-compiling. + system_name = os.environ.get('_PYTHON_HOST_PLATFORM', sys.platform).split('-')[0] +- if system_name in {"emscripten", "ios", "tvos", "vxworks", "wasi", "watchos"}: ++ if system_name in {"emscripten", "ios", "tvos", "visionos", "vxworks", "wasi", "watchos"}: + return None + + def joinuser(*args): +@@ -719,6 +722,18 @@ def get_platform(): release = get_config_vars().get("IPHONEOS_DEPLOYMENT_TARGET", "13.0") osname = sys.platform machine = sys.implementation._multiarch @@ -170,7 +260,7 @@ index 18e6b8d25e5..8a8ec696510 100644 import _osx_support osname, release, machine = _osx_support.get_platform_osx( diff --git a/Makefile.pre.in b/Makefile.pre.in -index 5fdbfa1053c..3580a386d40 100644 +index 5fdbfa1053c..cc3f9d4cdbe 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -209,6 +209,12 @@ MACOSX_DEPLOYMENT_TARGET=@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@ @@ -186,6 +276,60 @@ index 5fdbfa1053c..3580a386d40 100644 # Option to install to strip binaries STRIPFLAG=-s +@@ -2149,7 +2155,7 @@ testuniversal: all + # a full Xcode install that has an iPhone SE (3rd edition) simulator available. + # This must be run *after* a `make install` has completed the build. The + # `--with-framework-name` argument *cannot* be used when configuring the build. +-XCFOLDER:=iOSTestbed.$(MULTIARCH).$(shell date +%s).$$PPID ++XCFOLDER-iOS:=iOSTestbed.$(MULTIARCH).$(shell date +%s).$$PPID + .PHONY: testios + testios: + @if test "$(MACHDEP)" != "ios"; then \ +@@ -2169,11 +2175,41 @@ testios: + exit 1;\ + fi + +- # Clone the testbed project into the XCFOLDER +- $(PYTHON_FOR_BUILD) $(srcdir)/iOS/testbed clone --framework $(PYTHONFRAMEWORKPREFIX) "$(XCFOLDER)" ++ # Clone the testbed project into the XCFOLDER-iOS ++ $(PYTHON_FOR_BUILD) $(srcdir)/iOS/testbed clone --framework $(PYTHONFRAMEWORKPREFIX) "$(XCFOLDER-iOS)" ++ ++ # Run the testbed project ++ $(PYTHON_FOR_BUILD) "$(XCFOLDER-iOS)" run --verbose -- test -uall --single-process --rerun -W ++ ++# Run the test suite on the visionOS simulator. Must be run on a macOS machine with ++# a full Xcode install that has an Apple Vision Pro simulator available. ++# This must be run *after* a `make install` has completed the build. The ++# `--with-framework-name` argument *cannot* be used when configuring the build. ++XCFOLDER-visionOS:=visionOSTestbed.$(MULTIARCH).$(shell date +%s).$$PPID ++.PHONY: testvisionos ++testvisionos: ++ @if test "$(MACHDEP)" != "visionos"; then \ ++ echo "Cannot run the visionOS testbed for a non-visionOS build."; \ ++ exit 1;\ ++ fi ++ @if test "$(findstring -xrsimulator,$(MULTIARCH))" != "-xrsimulator"; then \ ++ echo "Cannot run the visionOS testbed for non-simulator builds."; \ ++ exit 1;\ ++ fi ++ @if test $(PYTHONFRAMEWORK) != "Python"; then \ ++ echo "Cannot run the visionOS testbed with a non-default framework name."; \ ++ exit 1;\ ++ fi ++ @if ! test -d $(PYTHONFRAMEWORKPREFIX); then \ ++ echo "Cannot find a finalized visionOS Python.framework. Have you run 'make install' to finalize the framework build?"; \ ++ exit 1;\ ++ fi ++ ++ # Clone the testbed project into the XCFOLDER-visionOS ++ $(PYTHON_FOR_BUILD) $(srcdir)/visionOS/testbed clone --framework $(PYTHONFRAMEWORKPREFIX) "$(XCFOLDER-visionOS)" + + # Run the testbed project +- $(PYTHON_FOR_BUILD) "$(XCFOLDER)" run --verbose -- test -uall --single-process --rerun -W ++ $(PYTHON_FOR_BUILD) "$(XCFOLDER-visionOS)" run --verbose -- test -uall --single-process --rerun -W + + # Like test, but using --slow-ci which enables all test resources and use + # longer timeout. Run an optional pybuildbot.identify script to include diff --git a/Misc/platform_triplet.c b/Misc/platform_triplet.c index ec0857a4a99..e52f486cdb3 100644 --- a/Misc/platform_triplet.c @@ -246,7 +390,7 @@ index 1bb6a05dc11..49febd56a37 100755 none--*) # None (no kernel, i.e. freestanding / bare metal), diff --git a/configure b/configure -index d0ae103014a..47952522387 100755 +index d0ae103014a..bafb0977d1a 100755 --- a/configure +++ b/configure @@ -974,6 +974,10 @@ LDFLAGS @@ -875,6 +1019,15 @@ index d0ae103014a..47952522387 100755 then for ac_func in clock_settime +@@ -24130,7 +24362,7 @@ else case e in #( + e) if test "$cross_compiling" = yes + then : + +-if test "$ac_sys_system" = "Linux-android" || test "$ac_sys_system" = "iOS"; then ++if test "$ac_sys_system" = "Linux-android" || test "$ac_sys_system" = "iOS" || test "$ac_sys_system" = "tvOS" || test "$ac_sys_system" = "watchOS" || test "$ac_sys_system" = "visionOS"; then + ac_cv_buggy_getaddrinfo="no" + elif test "${enable_ipv6+set}" = set; then + ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6" @@ -26152,8 +26384,8 @@ if test "$PY_ENABLE_SHARED" = "1" && ( test -n "$ANDROID_API_LEVEL" || test "$MA LIBPYTHON="\$(BLDLIBRARY)" fi @@ -924,7 +1077,7 @@ index d0ae103014a..47952522387 100755 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;; "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;; diff --git a/configure.ac b/configure.ac -index 8bb0f1c6ef4..0c1c2ca50cc 100644 +index 8bb0f1c6ef4..d548f148c31 100644 --- a/configure.ac +++ b/configure.ac @@ -330,6 +330,15 @@ then @@ -1455,6 +1608,15 @@ index 8bb0f1c6ef4..0c1c2ca50cc 100644 then AC_CHECK_FUNCS([clock_settime], [], [ AC_CHECK_LIB([rt], [clock_settime], [ +@@ -5640,7 +5849,7 @@ int main(void) + [ac_cv_buggy_getaddrinfo=no], + [ac_cv_buggy_getaddrinfo=yes], + [ +-if test "$ac_sys_system" = "Linux-android" || test "$ac_sys_system" = "iOS"; then ++if test "$ac_sys_system" = "Linux-android" || test "$ac_sys_system" = "iOS" || test "$ac_sys_system" = "tvOS" || test "$ac_sys_system" = "watchOS" || test "$ac_sys_system" = "visionOS"; then + ac_cv_buggy_getaddrinfo="no" + elif test "${enable_ipv6+set}" = set; then + ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6" @@ -6233,8 +6442,8 @@ if test "$PY_ENABLE_SHARED" = "1" && ( test -n "$ANDROID_API_LEVEL" || test "$MA LIBPYTHON="\$(BLDLIBRARY)" fi @@ -1944,6 +2106,1596 @@ index 00000000000..97431a903c1 + 1 + + +diff --git a/visionOS/testbed/Python.xcframework/Info.plist b/visionOS/testbed/Python.xcframework/Info.plist +new file mode 100644 +index 00000000000..e75f76c8d94 +--- /dev/null ++++ b/visionOS/testbed/Python.xcframework/Info.plist +@@ -0,0 +1,43 @@ ++ ++ ++ ++ ++ AvailableLibraries ++ ++ ++ BinaryPath ++ Python.framework/Python ++ LibraryIdentifier ++ xros-arm64-simulator ++ LibraryPath ++ Python.framework ++ SupportedArchitectures ++ ++ arm64 ++ ++ SupportedPlatform ++ xros ++ SupportedPlatformVariant ++ simulator ++ ++ ++ BinaryPath ++ Python.framework/Python ++ LibraryIdentifier ++ xros-arm64 ++ LibraryPath ++ Python.framework ++ SupportedArchitectures ++ ++ arm64 ++ ++ SupportedPlatform ++ xros ++ ++ ++ CFBundlePackageType ++ XFWK ++ XCFrameworkFormatVersion ++ 1.0 ++ ++ +diff --git a/visionOS/testbed/__main__.py b/visionOS/testbed/__main__.py +new file mode 100644 +index 00000000000..8a7bebf368d +--- /dev/null ++++ b/visionOS/testbed/__main__.py +@@ -0,0 +1,512 @@ ++import argparse ++import asyncio ++import fcntl ++import json ++import os ++import plistlib ++import re ++import shutil ++import subprocess ++import sys ++import tempfile ++from contextlib import asynccontextmanager ++from datetime import datetime ++from pathlib import Path ++ ++ ++DECODE_ARGS = ("UTF-8", "backslashreplace") ++ ++# The system log prefixes each line: ++# 2025-01-17 16:14:29.090 Df visionOSTestbed[23987:1fd393b4] (Python) ... ++# 2025-01-17 16:14:29.090 E visionOSTestbed[23987:1fd393b4] (Python) ... ++ ++LOG_PREFIX_REGEX = re.compile( ++ r"^\d{4}-\d{2}-\d{2}" # YYYY-MM-DD ++ r"\s+\d+:\d{2}:\d{2}\.\d+" # HH:MM:SS.sss ++ r"\s+\w+" # Df/E ++ r"\s+visionOSTestbed\[\d+:\w+\]" # Process/thread ID ++ r"\s+\(Python\)\s" # Logger name ++) ++ ++ ++# Work around a bug involving sys.exit and TaskGroups ++# (https://github.com/python/cpython/issues/101515). ++def exit(*args): ++ raise MySystemExit(*args) ++ ++ ++class MySystemExit(Exception): ++ pass ++ ++ ++class SimulatorLock: ++ # An fcntl-based filesystem lock that can be used to ensure that ++ def __init__(self, timeout): ++ self.filename = Path(tempfile.gettempdir()) / "python-visionos-testbed" ++ self.timeout = timeout ++ ++ self.fd = None ++ ++ async def acquire(self): ++ # Ensure the lockfile exists ++ self.filename.touch(exist_ok=True) ++ ++ # Try `timeout` times to acquire the lock file, with a 1 second pause ++ # between each attempt. Report status every 10 seconds. ++ for i in range(0, self.timeout): ++ try: ++ fd = os.open(self.filename, os.O_RDWR | os.O_TRUNC, 0o644) ++ fcntl.flock(fd, fcntl.LOCK_EX | fcntl.LOCK_NB) ++ except OSError: ++ os.close(fd) ++ if i % 10 == 0: ++ print("... waiting", flush=True) ++ await asyncio.sleep(1) ++ else: ++ self.fd = fd ++ return ++ ++ # If we reach the end of the loop, we've exceeded the allowed number of ++ # attempts. ++ raise ValueError("Unable to obtain lock on visionOS simulator creation") ++ ++ def release(self): ++ # If a lock is held, release it. ++ if self.fd is not None: ++ # Release the lock. ++ fcntl.flock(self.fd, fcntl.LOCK_UN) ++ os.close(self.fd) ++ self.fd = None ++ ++ ++# All subprocesses are executed through this context manager so that no matter ++# what happens, they can always be cancelled from another task, and they will ++# always be cleaned up on exit. ++@asynccontextmanager ++async def async_process(*args, **kwargs): ++ process = await asyncio.create_subprocess_exec(*args, **kwargs) ++ try: ++ yield process ++ finally: ++ if process.returncode is None: ++ # Allow a reasonably long time for Xcode to clean itself up, ++ # because we don't want stale emulators left behind. ++ timeout = 10 ++ process.terminate() ++ try: ++ await asyncio.wait_for(process.wait(), timeout) ++ except TimeoutError: ++ print( ++ f"Command {args} did not terminate after {timeout} seconds " ++ f" - sending SIGKILL" ++ ) ++ process.kill() ++ ++ # Even after killing the process we must still wait for it, ++ # otherwise we'll get the warning "Exception ignored in __del__". ++ await asyncio.wait_for(process.wait(), timeout=1) ++ ++ ++async def async_check_output(*args, **kwargs): ++ async with async_process( ++ *args, stdout=subprocess.PIPE, stderr=subprocess.PIPE, **kwargs ++ ) as process: ++ stdout, stderr = await process.communicate() ++ if process.returncode == 0: ++ return stdout.decode(*DECODE_ARGS) ++ else: ++ raise subprocess.CalledProcessError( ++ process.returncode, ++ args, ++ stdout.decode(*DECODE_ARGS), ++ stderr.decode(*DECODE_ARGS), ++ ) ++ ++ ++# Return a list of UDIDs associated with booted simulators ++async def list_devices(): ++ try: ++ # List the testing simulators, in JSON format ++ raw_json = await async_check_output( ++ "xcrun", "simctl", "--set", "testing", "list", "-j" ++ ) ++ json_data = json.loads(raw_json) ++ ++ # Filter out the booted visionOS simulators ++ return [ ++ simulator["udid"] ++ for runtime, simulators in json_data["devices"].items() ++ for simulator in simulators ++ if runtime.split(".")[-1].startswith("visionOS") and simulator["state"] == "Booted" ++ ] ++ except subprocess.CalledProcessError as e: ++ # If there's no ~/Library/Developer/XCTestDevices folder (which is the ++ # case on fresh installs, and in some CI environments), `simctl list` ++ # returns error code 1, rather than an empty list. Handle that case, ++ # but raise all other errors. ++ if e.returncode == 1: ++ return [] ++ else: ++ raise ++ ++ ++async def find_device(initial_devices, lock): ++ while True: ++ new_devices = set(await list_devices()).difference(initial_devices) ++ if len(new_devices) == 0: ++ await asyncio.sleep(1) ++ elif len(new_devices) == 1: ++ udid = new_devices.pop() ++ print(f"{datetime.now():%Y-%m-%d %H:%M:%S}: New test simulator detected") ++ print(f"UDID: {udid}", flush=True) ++ lock.release() ++ return udid ++ else: ++ exit(f"Found more than one new device: {new_devices}") ++ ++ ++async def log_stream_task(initial_devices, lock): ++ # Wait up to 5 minutes for the build to complete and the simulator to boot. ++ udid = await asyncio.wait_for(find_device(initial_devices, lock), 5 * 60) ++ ++ # Stream the visionOS device's logs, filtering out messages that come from the ++ # XCTest test suite (catching NSLog messages from the test method), or ++ # Python itself (catching stdout/stderr content routed to the system log ++ # with config->use_system_logger). ++ args = [ ++ "xcrun", ++ "simctl", ++ "--set", ++ "testing", ++ "spawn", ++ udid, ++ "log", ++ "stream", ++ "--style", ++ "compact", ++ "--predicate", ++ ( ++ 'senderImagePath ENDSWITH "/visionOSTestbedTests.xctest/visionOSTestbedTests"' ++ ' OR senderImagePath ENDSWITH "/Python.framework/Python"' ++ ), ++ ] ++ ++ async with async_process( ++ *args, ++ stdout=subprocess.PIPE, ++ stderr=subprocess.STDOUT, ++ ) as process: ++ suppress_dupes = False ++ while line := (await process.stdout.readline()).decode(*DECODE_ARGS): ++ # Strip the prefix from each log line ++ line = LOG_PREFIX_REGEX.sub("", line) ++ # The visionOS log streamer can sometimes lag; when it does, it outputs ++ # a warning about messages being dropped... often multiple times. ++ # Only print the first of these duplicated warnings. ++ if line.startswith("=== Messages dropped "): ++ if not suppress_dupes: ++ suppress_dupes = True ++ sys.stdout.write(line) ++ else: ++ suppress_dupes = False ++ sys.stdout.write(line) ++ sys.stdout.flush() ++ ++ ++async def xcode_test(location, simulator, verbose): ++ # Run the test suite on the named simulator ++ print("Starting xcodebuild...", flush=True) ++ args = [ ++ "xcodebuild", ++ "test", ++ "-project", ++ str(location / "visionOSTestbed.xcodeproj"), ++ "-scheme", ++ "visionOSTestbed", ++ "-destination", ++ f"platform=visionOS Simulator,name={simulator}", ++ "-resultBundlePath", ++ str(location / f"{datetime.now():%Y%m%d-%H%M%S}.xcresult"), ++ "-derivedDataPath", ++ str(location / "DerivedData"), ++ ] ++ if not verbose: ++ args += ["-quiet"] ++ ++ async with async_process( ++ *args, ++ stdout=subprocess.PIPE, ++ stderr=subprocess.STDOUT, ++ ) as process: ++ while line := (await process.stdout.readline()).decode(*DECODE_ARGS): ++ sys.stdout.write(line) ++ sys.stdout.flush() ++ ++ status = await asyncio.wait_for(process.wait(), timeout=1) ++ exit(status) ++ ++ ++def clone_testbed( ++ source: Path, ++ target: Path, ++ framework: Path, ++ apps: list[Path], ++) -> None: ++ if target.exists(): ++ print(f"{target} already exists; aborting without creating project.") ++ sys.exit(10) ++ ++ if framework is None: ++ if not ( ++ source / "Python.xcframework/xros-arm64-simulator/bin" ++ ).is_dir(): ++ print( ++ f"The testbed being cloned ({source}) does not contain " ++ f"a simulator framework. Re-run with --framework" ++ ) ++ sys.exit(11) ++ else: ++ if not framework.is_dir(): ++ print(f"{framework} does not exist.") ++ sys.exit(12) ++ elif not ( ++ framework.suffix == ".xcframework" ++ or (framework / "Python.framework").is_dir() ++ ): ++ print( ++ f"{framework} is not an XCframework, " ++ f"or a simulator slice of a framework build." ++ ) ++ sys.exit(13) ++ ++ print("Cloning testbed project:") ++ print(f" Cloning {source}...", end="", flush=True) ++ shutil.copytree(source, target, symlinks=True) ++ print(" done") ++ ++ xc_framework_path = target / "Python.xcframework" ++ sim_framework_path = xc_framework_path / "xros-arm64_x86_64-simulator" ++ if framework is not None: ++ if framework.suffix == ".xcframework": ++ print(" Installing XCFramework...", end="", flush=True) ++ if xc_framework_path.is_dir(): ++ shutil.rmtree(xc_framework_path) ++ else: ++ xc_framework_path.unlink(missing_ok=True) ++ xc_framework_path.symlink_to( ++ framework.relative_to(xc_framework_path.parent, walk_up=True) ++ ) ++ print(" done") ++ else: ++ print(" Installing simulator framework...", end="", flush=True) ++ if sim_framework_path.is_dir(): ++ shutil.rmtree(sim_framework_path) ++ else: ++ sim_framework_path.unlink(missing_ok=True) ++ sim_framework_path.symlink_to( ++ framework.relative_to(sim_framework_path.parent, walk_up=True) ++ ) ++ print(" done") ++ else: ++ if ( ++ xc_framework_path.is_symlink() ++ and not xc_framework_path.readlink().is_absolute() ++ ): ++ # XCFramework is a relative symlink. Rewrite the symlink relative ++ # to the new location. ++ print(" Rewriting symlink to XCframework...", end="", flush=True) ++ orig_xc_framework_path = ( ++ source ++ / xc_framework_path.readlink() ++ ).resolve() ++ xc_framework_path.unlink() ++ xc_framework_path.symlink_to( ++ orig_xc_framework_path.relative_to( ++ xc_framework_path.parent, walk_up=True ++ ) ++ ) ++ print(" done") ++ elif ( ++ sim_framework_path.is_symlink() ++ and not sim_framework_path.readlink().is_absolute() ++ ): ++ print(" Rewriting symlink to simulator framework...", end="", flush=True) ++ # Simulator framework is a relative symlink. Rewrite the symlink ++ # relative to the new location. ++ orig_sim_framework_path = ( ++ source ++ / "Python.XCframework" ++ / sim_framework_path.readlink() ++ ).resolve() ++ sim_framework_path.unlink() ++ sim_framework_path.symlink_to( ++ orig_sim_framework_path.relative_to( ++ sim_framework_path.parent, walk_up=True ++ ) ++ ) ++ print(" done") ++ else: ++ print(" Using pre-existing visionOS framework.") ++ ++ for app_src in apps: ++ print(f" Installing app {app_src.name!r}...", end="", flush=True) ++ app_target = target / f"visionOSTestbed/app/{app_src.name}" ++ if app_target.is_dir(): ++ shutil.rmtree(app_target) ++ shutil.copytree(app_src, app_target) ++ print(" done") ++ ++ print(f"Successfully cloned testbed: {target.resolve()}") ++ ++ ++def update_plist(testbed_path, args): ++ # Add the test runner arguments to the testbed's Info.plist file. ++ info_plist = testbed_path / "visionOSTestbed" / "visionOSTestbed-Info.plist" ++ with info_plist.open("rb") as f: ++ info = plistlib.load(f) ++ ++ info["TestArgs"] = args ++ ++ with info_plist.open("wb") as f: ++ plistlib.dump(info, f) ++ ++ ++async def run_testbed(simulator: str, args: list[str], verbose: bool=False): ++ location = Path(__file__).parent ++ print("Updating plist...", end="", flush=True) ++ update_plist(location, args) ++ print(" done.", flush=True) ++ ++ # We need to get an exclusive lock on simulator creation, to avoid issues ++ # with multiple simulators starting and being unable to tell which ++ # simulator is due to which testbed instance. See ++ # https://github.com/python/cpython/issues/130294 for details. Wait up to ++ # 10 minutes for a simulator to boot. ++ print("Obtaining lock on simulator creation...", flush=True) ++ simulator_lock = SimulatorLock(timeout=10*60) ++ await simulator_lock.acquire() ++ print("Simulator lock acquired.", flush=True) ++ ++ # Get the list of devices that are booted at the start of the test run. ++ # The simulator started by the test suite will be detected as the new ++ # entry that appears on the device list. ++ initial_devices = await list_devices() ++ ++ try: ++ async with asyncio.TaskGroup() as tg: ++ tg.create_task(log_stream_task(initial_devices, simulator_lock)) ++ tg.create_task(xcode_test(location, simulator=simulator, verbose=verbose)) ++ except* MySystemExit as e: ++ raise SystemExit(*e.exceptions[0].args) from None ++ except* subprocess.CalledProcessError as e: ++ # Extract it from the ExceptionGroup so it can be handled by `main`. ++ raise e.exceptions[0] ++ finally: ++ simulator_lock.release() ++ ++ ++def main(): ++ parser = argparse.ArgumentParser( ++ description=( ++ "Manages the process of testing a Python project in the visionOS simulator." ++ ), ++ ) ++ ++ subcommands = parser.add_subparsers(dest="subcommand") ++ ++ clone = subcommands.add_parser( ++ "clone", ++ description=( ++ "Clone the testbed project, copying in an visionOS Python framework and" ++ "any specified application code." ++ ), ++ help="Clone a testbed project to a new location.", ++ ) ++ clone.add_argument( ++ "--framework", ++ help=( ++ "The location of the XCFramework (or simulator-only slice of an " ++ "XCFramework) to use when running the testbed" ++ ), ++ ) ++ clone.add_argument( ++ "--app", ++ dest="apps", ++ action="append", ++ default=[], ++ help="The location of any code to include in the testbed project", ++ ) ++ clone.add_argument( ++ "location", ++ help="The path where the testbed will be cloned.", ++ ) ++ ++ run = subcommands.add_parser( ++ "run", ++ usage="%(prog)s [-h] [--simulator SIMULATOR] -- [ ...]", ++ description=( ++ "Run a testbed project. The arguments provided after `--` will be " ++ "passed to the running visionOS process as if they were arguments to " ++ "`python -m`." ++ ), ++ help="Run a testbed project", ++ ) ++ run.add_argument( ++ "--simulator", ++ default="Apple Vision Pro", ++ help="The name of the simulator to use (default: 'Apple Vision Pro')", ++ ) ++ run.add_argument( ++ "-v", "--verbose", ++ action="store_true", ++ help="Enable verbose output", ++ ) ++ ++ try: ++ pos = sys.argv.index("--") ++ testbed_args = sys.argv[1:pos] ++ test_args = sys.argv[pos + 1 :] ++ except ValueError: ++ testbed_args = sys.argv[1:] ++ test_args = [] ++ ++ context = parser.parse_args(testbed_args) ++ ++ if context.subcommand == "clone": ++ clone_testbed( ++ source=Path(__file__).parent.resolve(), ++ target=Path(context.location).resolve(), ++ framework=Path(context.framework).resolve() if context.framework else None, ++ apps=[Path(app) for app in context.apps], ++ ) ++ elif context.subcommand == "run": ++ if test_args: ++ if not ( ++ Path(__file__).parent / "Python.xcframework/xros-arm64-simulator/bin" ++ ).is_dir(): ++ print( ++ f"Testbed does not contain a compiled visionOS framework. Use " ++ f"`python {sys.argv[0]} clone ...` to create a runnable " ++ f"clone of this testbed." ++ ) ++ sys.exit(20) ++ ++ asyncio.run( ++ run_testbed( ++ simulator=context.simulator, ++ verbose=context.verbose, ++ args=test_args, ++ ) ++ ) ++ else: ++ print(f"Must specify test arguments (e.g., {sys.argv[0]} run -- test)") ++ print() ++ parser.print_help(sys.stderr) ++ sys.exit(21) ++ else: ++ parser.print_help(sys.stderr) ++ sys.exit(1) ++ ++ ++if __name__ == "__main__": ++ main() +diff --git a/visionOS/testbed/visionOSTestbed.xcodeproj/project.pbxproj b/visionOS/testbed/visionOSTestbed.xcodeproj/project.pbxproj +new file mode 100644 +index 00000000000..1723a699d49 +--- /dev/null ++++ b/visionOS/testbed/visionOSTestbed.xcodeproj/project.pbxproj +@@ -0,0 +1,596 @@ ++// !$*UTF8*$! ++{ ++ archiveVersion = 1; ++ classes = { ++ }; ++ objectVersion = 56; ++ objects = { ++ ++/* Begin PBXBuildFile section */ ++ 607A66172B0EFA380010BFC8 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 607A66162B0EFA380010BFC8 /* AppDelegate.m */; }; ++ 607A66222B0EFA390010BFC8 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607A66212B0EFA390010BFC8 /* Assets.xcassets */; }; ++ 607A66252B0EFA390010BFC8 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 607A66232B0EFA390010BFC8 /* LaunchScreen.storyboard */; }; ++ 607A66282B0EFA390010BFC8 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 607A66272B0EFA390010BFC8 /* main.m */; }; ++ 607A66322B0EFA3A0010BFC8 /* visionOSTestbedTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 607A66312B0EFA3A0010BFC8 /* visionOSTestbedTests.m */; }; ++ 607A66582B0F079F0010BFC8 /* dylib-Info-template.plist in Resources */ = {isa = PBXBuildFile; fileRef = 607A66572B0F079F0010BFC8 /* dylib-Info-template.plist */; }; ++ 608619542CB77BA900F46182 /* app_packages in Resources */ = {isa = PBXBuildFile; fileRef = 608619532CB77BA900F46182 /* app_packages */; }; ++ 608619562CB7819B00F46182 /* app in Resources */ = {isa = PBXBuildFile; fileRef = 608619552CB7819B00F46182 /* app */; }; ++ EEB367CE2DADF5C900B9A1D7 /* Python.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = EEE9C80C2DAB5ECA0056F8C6 /* Python.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; ++ EEB367CF2DADF5D300B9A1D7 /* Python.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = EEE9C80C2DAB5ECA0056F8C6 /* Python.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; ++ EEE9C80D2DAB5ECA0056F8C6 /* Python.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = EEE9C80C2DAB5ECA0056F8C6 /* Python.xcframework */; }; ++ EEE9C80E2DAB5ECA0056F8C6 /* Python.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = EEE9C80C2DAB5ECA0056F8C6 /* Python.xcframework */; }; ++/* End PBXBuildFile section */ ++ ++/* Begin PBXContainerItemProxy section */ ++ 607A662E2B0EFA3A0010BFC8 /* PBXContainerItemProxy */ = { ++ isa = PBXContainerItemProxy; ++ containerPortal = 607A660A2B0EFA380010BFC8 /* Project object */; ++ proxyType = 1; ++ remoteGlobalIDString = 607A66112B0EFA380010BFC8; ++ remoteInfo = iOSTestbed; ++ }; ++/* End PBXContainerItemProxy section */ ++ ++/* Begin PBXCopyFilesBuildPhase section */ ++ 607A664E2B0EFC080010BFC8 /* Embed Frameworks */ = { ++ isa = PBXCopyFilesBuildPhase; ++ buildActionMask = 2147483647; ++ dstPath = ""; ++ dstSubfolderSpec = 10; ++ files = ( ++ EEB367CF2DADF5D300B9A1D7 /* Python.xcframework in Embed Frameworks */, ++ ); ++ name = "Embed Frameworks"; ++ runOnlyForDeploymentPostprocessing = 0; ++ }; ++ 607A66522B0EFFE00010BFC8 /* Embed Frameworks */ = { ++ isa = PBXCopyFilesBuildPhase; ++ buildActionMask = 2147483647; ++ dstPath = ""; ++ dstSubfolderSpec = 10; ++ files = ( ++ EEB367CE2DADF5C900B9A1D7 /* Python.xcframework in Embed Frameworks */, ++ ); ++ name = "Embed Frameworks"; ++ runOnlyForDeploymentPostprocessing = 0; ++ }; ++/* End PBXCopyFilesBuildPhase section */ ++ ++/* Begin PBXFileReference section */ ++ 607A66122B0EFA380010BFC8 /* visionOSTestbed.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = visionOSTestbed.app; sourceTree = BUILT_PRODUCTS_DIR; }; ++ 607A66152B0EFA380010BFC8 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; ++ 607A66162B0EFA380010BFC8 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; ++ 607A66212B0EFA390010BFC8 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; ++ 607A66242B0EFA390010BFC8 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; ++ 607A66272B0EFA390010BFC8 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; ++ 607A662D2B0EFA3A0010BFC8 /* visionOSTestbedTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = visionOSTestbedTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; ++ 607A66312B0EFA3A0010BFC8 /* visionOSTestbedTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = visionOSTestbedTests.m; sourceTree = ""; }; ++ 607A66572B0F079F0010BFC8 /* dylib-Info-template.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "dylib-Info-template.plist"; sourceTree = ""; }; ++ 607A66592B0F08600010BFC8 /* visionOStestbed-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "visionOStestbed-Info.plist"; sourceTree = ""; }; ++ 608619532CB77BA900F46182 /* app_packages */ = {isa = PBXFileReference; lastKnownFileType = folder; path = app_packages; sourceTree = ""; }; ++ 608619552CB7819B00F46182 /* app */ = {isa = PBXFileReference; lastKnownFileType = folder; path = app; sourceTree = ""; }; ++ EEE9C80C2DAB5ECA0056F8C6 /* Python.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = Python.xcframework; sourceTree = ""; }; ++/* End PBXFileReference section */ ++ ++/* Begin PBXFrameworksBuildPhase section */ ++ 607A660F2B0EFA380010BFC8 /* Frameworks */ = { ++ isa = PBXFrameworksBuildPhase; ++ buildActionMask = 2147483647; ++ files = ( ++ EEE9C80D2DAB5ECA0056F8C6 /* Python.xcframework in Frameworks */, ++ ); ++ runOnlyForDeploymentPostprocessing = 0; ++ }; ++ 607A662A2B0EFA3A0010BFC8 /* Frameworks */ = { ++ isa = PBXFrameworksBuildPhase; ++ buildActionMask = 2147483647; ++ files = ( ++ EEE9C80E2DAB5ECA0056F8C6 /* Python.xcframework in Frameworks */, ++ ); ++ runOnlyForDeploymentPostprocessing = 0; ++ }; ++/* End PBXFrameworksBuildPhase section */ ++ ++/* Begin PBXGroup section */ ++ 607A66092B0EFA380010BFC8 = { ++ isa = PBXGroup; ++ children = ( ++ EEE9C80C2DAB5ECA0056F8C6 /* Python.xcframework */, ++ 607A66142B0EFA380010BFC8 /* visionOSTestbed */, ++ 607A66302B0EFA3A0010BFC8 /* visionOSTestbedTests */, ++ 607A66132B0EFA380010BFC8 /* Products */, ++ 607A664F2B0EFFE00010BFC8 /* Frameworks */, ++ ); ++ sourceTree = ""; ++ }; ++ 607A66132B0EFA380010BFC8 /* Products */ = { ++ isa = PBXGroup; ++ children = ( ++ 607A66122B0EFA380010BFC8 /* visionOSTestbed.app */, ++ 607A662D2B0EFA3A0010BFC8 /* visionOSTestbedTests.xctest */, ++ ); ++ name = Products; ++ sourceTree = ""; ++ }; ++ 607A66142B0EFA380010BFC8 /* visionOSTestbed */ = { ++ isa = PBXGroup; ++ children = ( ++ 608619552CB7819B00F46182 /* app */, ++ 608619532CB77BA900F46182 /* app_packages */, ++ 607A66592B0F08600010BFC8 /* visionOStestbed-Info.plist */, ++ 607A66572B0F079F0010BFC8 /* dylib-Info-template.plist */, ++ 607A66152B0EFA380010BFC8 /* AppDelegate.h */, ++ 607A66162B0EFA380010BFC8 /* AppDelegate.m */, ++ 607A66212B0EFA390010BFC8 /* Assets.xcassets */, ++ 607A66232B0EFA390010BFC8 /* LaunchScreen.storyboard */, ++ 607A66272B0EFA390010BFC8 /* main.m */, ++ ); ++ path = visionOSTestbed; ++ sourceTree = ""; ++ }; ++ 607A66302B0EFA3A0010BFC8 /* visionOSTestbedTests */ = { ++ isa = PBXGroup; ++ children = ( ++ 607A66312B0EFA3A0010BFC8 /* visionOSTestbedTests.m */, ++ ); ++ path = visionOSTestbedTests; ++ sourceTree = ""; ++ }; ++ 607A664F2B0EFFE00010BFC8 /* Frameworks */ = { ++ isa = PBXGroup; ++ children = ( ++ ); ++ name = Frameworks; ++ sourceTree = ""; ++ }; ++/* End PBXGroup section */ ++ ++/* Begin PBXNativeTarget section */ ++ 607A66112B0EFA380010BFC8 /* visionOSTestbed */ = { ++ isa = PBXNativeTarget; ++ buildConfigurationList = 607A66412B0EFA3A0010BFC8 /* Build configuration list for PBXNativeTarget "visionOSTestbed" */; ++ buildPhases = ( ++ 607A660E2B0EFA380010BFC8 /* Sources */, ++ 607A660F2B0EFA380010BFC8 /* Frameworks */, ++ 607A66102B0EFA380010BFC8 /* Resources */, ++ 607A66552B0F061D0010BFC8 /* Install Target Specific Python Standard Library */, ++ 607A66562B0F06200010BFC8 /* Prepare Python Binary Modules */, ++ 607A664E2B0EFC080010BFC8 /* Embed Frameworks */, ++ ); ++ buildRules = ( ++ ); ++ dependencies = ( ++ ); ++ name = visionOSTestbed; ++ productName = iOSTestbed; ++ productReference = 607A66122B0EFA380010BFC8 /* visionOSTestbed.app */; ++ productType = "com.apple.product-type.application"; ++ }; ++ 607A662C2B0EFA3A0010BFC8 /* visionOSTestbedTests */ = { ++ isa = PBXNativeTarget; ++ buildConfigurationList = 607A66442B0EFA3A0010BFC8 /* Build configuration list for PBXNativeTarget "visionOSTestbedTests" */; ++ buildPhases = ( ++ 607A66292B0EFA3A0010BFC8 /* Sources */, ++ 607A662A2B0EFA3A0010BFC8 /* Frameworks */, ++ 607A662B2B0EFA3A0010BFC8 /* Resources */, ++ 607A66522B0EFFE00010BFC8 /* Embed Frameworks */, ++ ); ++ buildRules = ( ++ ); ++ dependencies = ( ++ 607A662F2B0EFA3A0010BFC8 /* PBXTargetDependency */, ++ ); ++ name = visionOSTestbedTests; ++ productName = iOSTestbedTests; ++ productReference = 607A662D2B0EFA3A0010BFC8 /* visionOSTestbedTests.xctest */; ++ productType = "com.apple.product-type.bundle.unit-test"; ++ }; ++/* End PBXNativeTarget section */ ++ ++/* Begin PBXProject section */ ++ 607A660A2B0EFA380010BFC8 /* Project object */ = { ++ isa = PBXProject; ++ attributes = { ++ BuildIndependentTargetsInParallel = 1; ++ LastUpgradeCheck = 1500; ++ TargetAttributes = { ++ 607A66112B0EFA380010BFC8 = { ++ CreatedOnToolsVersion = 15.0.1; ++ }; ++ 607A662C2B0EFA3A0010BFC8 = { ++ CreatedOnToolsVersion = 15.0.1; ++ TestTargetID = 607A66112B0EFA380010BFC8; ++ }; ++ }; ++ }; ++ buildConfigurationList = 607A660D2B0EFA380010BFC8 /* Build configuration list for PBXProject "visionOSTestbed" */; ++ compatibilityVersion = "Xcode 14.0"; ++ developmentRegion = en; ++ hasScannedForEncodings = 0; ++ knownRegions = ( ++ en, ++ Base, ++ ); ++ mainGroup = 607A66092B0EFA380010BFC8; ++ productRefGroup = 607A66132B0EFA380010BFC8 /* Products */; ++ projectDirPath = ""; ++ projectRoot = ""; ++ targets = ( ++ 607A66112B0EFA380010BFC8 /* visionOSTestbed */, ++ 607A662C2B0EFA3A0010BFC8 /* visionOSTestbedTests */, ++ ); ++ }; ++/* End PBXProject section */ ++ ++/* Begin PBXResourcesBuildPhase section */ ++ 607A66102B0EFA380010BFC8 /* Resources */ = { ++ isa = PBXResourcesBuildPhase; ++ buildActionMask = 2147483647; ++ files = ( ++ 607A66252B0EFA390010BFC8 /* LaunchScreen.storyboard in Resources */, ++ 607A66582B0F079F0010BFC8 /* dylib-Info-template.plist in Resources */, ++ 608619562CB7819B00F46182 /* app in Resources */, ++ 607A66222B0EFA390010BFC8 /* Assets.xcassets in Resources */, ++ 608619542CB77BA900F46182 /* app_packages in Resources */, ++ ); ++ runOnlyForDeploymentPostprocessing = 0; ++ }; ++ 607A662B2B0EFA3A0010BFC8 /* Resources */ = { ++ isa = PBXResourcesBuildPhase; ++ buildActionMask = 2147483647; ++ files = ( ++ ); ++ runOnlyForDeploymentPostprocessing = 0; ++ }; ++/* End PBXResourcesBuildPhase section */ ++ ++/* Begin PBXShellScriptBuildPhase section */ ++ 607A66552B0F061D0010BFC8 /* Install Target Specific Python Standard Library */ = { ++ isa = PBXShellScriptBuildPhase; ++ alwaysOutOfDate = 1; ++ buildActionMask = 2147483647; ++ files = ( ++ ); ++ inputFileListPaths = ( ++ ); ++ inputPaths = ( ++ ); ++ name = "Install Target Specific Python Standard Library"; ++ outputFileListPaths = ( ++ ); ++ outputPaths = ( ++ ); ++ runOnlyForDeploymentPostprocessing = 0; ++ shellPath = /bin/sh; ++ shellScript = "set -e\n\nmkdir -p \"$CODESIGNING_FOLDER_PATH/python/lib\"\nif [ \"$EFFECTIVE_PLATFORM_NAME\" = \"-xrsimulator\" ]; then\n echo \"Installing Python modules for xrOS Simulator\"\n rsync -au --delete \"$PROJECT_DIR/Python.xcframework/xros-arm64-simulator/lib/\" \"$CODESIGNING_FOLDER_PATH/python/lib/\" \nelse\n echo \"Installing Python modules for xrOS Device\"\n rsync -au --delete \"$PROJECT_DIR/Python.xcframework/xros-arm64/lib/\" \"$CODESIGNING_FOLDER_PATH/python/lib/\" \nfi\n"; ++ showEnvVarsInLog = 0; ++ }; ++ 607A66562B0F06200010BFC8 /* Prepare Python Binary Modules */ = { ++ isa = PBXShellScriptBuildPhase; ++ alwaysOutOfDate = 1; ++ buildActionMask = 2147483647; ++ files = ( ++ ); ++ inputFileListPaths = ( ++ ); ++ inputPaths = ( ++ ); ++ name = "Prepare Python Binary Modules"; ++ outputFileListPaths = ( ++ ); ++ outputPaths = ( ++ ); ++ runOnlyForDeploymentPostprocessing = 0; ++ shellPath = /bin/sh; ++ shellScript = "set -e\n\ninstall_dylib () {\n INSTALL_BASE=$1\n FULL_EXT=$2\n\n # The name of the extension file\n EXT=$(basename \"$FULL_EXT\")\n # The location of the extension file, relative to the bundle\n RELATIVE_EXT=${FULL_EXT#$CODESIGNING_FOLDER_PATH/} \n # The path to the extension file, relative to the install base\n PYTHON_EXT=${RELATIVE_EXT/$INSTALL_BASE/}\n # The full dotted name of the extension module, constructed from the file path.\n FULL_MODULE_NAME=$(echo $PYTHON_EXT | cut -d \".\" -f 1 | tr \"/\" \".\"); \n # A bundle identifier; not actually used, but required by Xcode framework packaging\n FRAMEWORK_BUNDLE_ID=$(echo $PRODUCT_BUNDLE_IDENTIFIER.$FULL_MODULE_NAME | tr \"_\" \"-\")\n # The name of the framework folder.\n FRAMEWORK_FOLDER=\"Frameworks/$FULL_MODULE_NAME.framework\"\n\n # If the framework folder doesn't exist, create it.\n if [ ! -d \"$CODESIGNING_FOLDER_PATH/$FRAMEWORK_FOLDER\" ]; then\n echo \"Creating framework for $RELATIVE_EXT\" \n mkdir -p \"$CODESIGNING_FOLDER_PATH/$FRAMEWORK_FOLDER\"\n cp \"$CODESIGNING_FOLDER_PATH/dylib-Info-template.plist\" \"$CODESIGNING_FOLDER_PATH/$FRAMEWORK_FOLDER/Info.plist\"\n plutil -replace CFBundleExecutable -string \"$FULL_MODULE_NAME\" \"$CODESIGNING_FOLDER_PATH/$FRAMEWORK_FOLDER/Info.plist\"\n plutil -replace CFBundleIdentifier -string \"$FRAMEWORK_BUNDLE_ID\" \"$CODESIGNING_FOLDER_PATH/$FRAMEWORK_FOLDER/Info.plist\"\n fi\n \n echo \"Installing binary for $FRAMEWORK_FOLDER/$FULL_MODULE_NAME\" \n mv \"$FULL_EXT\" \"$CODESIGNING_FOLDER_PATH/$FRAMEWORK_FOLDER/$FULL_MODULE_NAME\"\n # Create a placeholder .fwork file where the .so was\n echo \"$FRAMEWORK_FOLDER/$FULL_MODULE_NAME\" > ${FULL_EXT%.so}.fwork\n # Create a back reference to the .so file location in the framework\n echo \"${RELATIVE_EXT%.so}.fwork\" > \"$CODESIGNING_FOLDER_PATH/$FRAMEWORK_FOLDER/$FULL_MODULE_NAME.origin\" \n}\n\nPYTHON_VER=$(ls -1 \"$CODESIGNING_FOLDER_PATH/python/lib\")\necho \"Install Python $PYTHON_VER standard library extension modules...\"\nfind \"$CODESIGNING_FOLDER_PATH/python/lib/$PYTHON_VER/lib-dynload\" -name \"*.so\" | while read FULL_EXT; do\n install_dylib python/lib/$PYTHON_VER/lib-dynload/ \"$FULL_EXT\"\ndone\necho \"Install app package extension modules...\"\nfind \"$CODESIGNING_FOLDER_PATH/app_packages\" -name \"*.so\" | while read FULL_EXT; do\n install_dylib app_packages/ \"$FULL_EXT\"\ndone\necho \"Install app extension modules...\"\nfind \"$CODESIGNING_FOLDER_PATH/app\" -name \"*.so\" | while read FULL_EXT; do\n install_dylib app/ \"$FULL_EXT\"\ndone\n\n# Clean up dylib template \nrm -f \"$CODESIGNING_FOLDER_PATH/dylib-Info-template.plist\"\necho \"Signing frameworks as $EXPANDED_CODE_SIGN_IDENTITY_NAME ($EXPANDED_CODE_SIGN_IDENTITY)...\"\nfind \"$CODESIGNING_FOLDER_PATH/Frameworks\" -name \"*.framework\" -exec /usr/bin/codesign --force --sign \"$EXPANDED_CODE_SIGN_IDENTITY\" ${OTHER_CODE_SIGN_FLAGS:-} -o runtime --timestamp=none --preserve-metadata=identifier,entitlements,flags --generate-entitlement-der \"{}\" \\; \n"; ++ showEnvVarsInLog = 0; ++ }; ++/* End PBXShellScriptBuildPhase section */ ++ ++/* Begin PBXSourcesBuildPhase section */ ++ 607A660E2B0EFA380010BFC8 /* Sources */ = { ++ isa = PBXSourcesBuildPhase; ++ buildActionMask = 2147483647; ++ files = ( ++ 607A66172B0EFA380010BFC8 /* AppDelegate.m in Sources */, ++ 607A66282B0EFA390010BFC8 /* main.m in Sources */, ++ ); ++ runOnlyForDeploymentPostprocessing = 0; ++ }; ++ 607A66292B0EFA3A0010BFC8 /* Sources */ = { ++ isa = PBXSourcesBuildPhase; ++ buildActionMask = 2147483647; ++ files = ( ++ 607A66322B0EFA3A0010BFC8 /* visionOSTestbedTests.m in Sources */, ++ ); ++ runOnlyForDeploymentPostprocessing = 0; ++ }; ++/* End PBXSourcesBuildPhase section */ ++ ++/* Begin PBXTargetDependency section */ ++ 607A662F2B0EFA3A0010BFC8 /* PBXTargetDependency */ = { ++ isa = PBXTargetDependency; ++ target = 607A66112B0EFA380010BFC8 /* visionOSTestbed */; ++ targetProxy = 607A662E2B0EFA3A0010BFC8 /* PBXContainerItemProxy */; ++ }; ++/* End PBXTargetDependency section */ ++ ++/* Begin PBXVariantGroup section */ ++ 607A66232B0EFA390010BFC8 /* LaunchScreen.storyboard */ = { ++ isa = PBXVariantGroup; ++ children = ( ++ 607A66242B0EFA390010BFC8 /* Base */, ++ ); ++ name = LaunchScreen.storyboard; ++ sourceTree = ""; ++ }; ++/* End PBXVariantGroup section */ ++ ++/* Begin XCBuildConfiguration section */ ++ 607A663F2B0EFA3A0010BFC8 /* Debug */ = { ++ isa = XCBuildConfiguration; ++ buildSettings = { ++ ALWAYS_SEARCH_USER_PATHS = NO; ++ ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; ++ CLANG_ANALYZER_NONNULL = YES; ++ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; ++ CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; ++ CLANG_ENABLE_MODULES = YES; ++ CLANG_ENABLE_OBJC_ARC = YES; ++ CLANG_ENABLE_OBJC_WEAK = YES; ++ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; ++ CLANG_WARN_BOOL_CONVERSION = YES; ++ CLANG_WARN_COMMA = YES; ++ CLANG_WARN_CONSTANT_CONVERSION = YES; ++ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; ++ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; ++ CLANG_WARN_DOCUMENTATION_COMMENTS = YES; ++ CLANG_WARN_EMPTY_BODY = YES; ++ CLANG_WARN_ENUM_CONVERSION = YES; ++ CLANG_WARN_INFINITE_RECURSION = YES; ++ CLANG_WARN_INT_CONVERSION = YES; ++ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; ++ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; ++ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; ++ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; ++ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; ++ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; ++ CLANG_WARN_STRICT_PROTOTYPES = YES; ++ CLANG_WARN_SUSPICIOUS_MOVE = YES; ++ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; ++ CLANG_WARN_UNREACHABLE_CODE = YES; ++ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; ++ COPY_PHASE_STRIP = NO; ++ DEBUG_INFORMATION_FORMAT = dwarf; ++ ENABLE_STRICT_OBJC_MSGSEND = YES; ++ ENABLE_TESTABILITY = YES; ++ ENABLE_USER_SCRIPT_SANDBOXING = YES; ++ GCC_C_LANGUAGE_STANDARD = gnu17; ++ GCC_DYNAMIC_NO_PIC = NO; ++ GCC_NO_COMMON_BLOCKS = YES; ++ GCC_OPTIMIZATION_LEVEL = 0; ++ GCC_PREPROCESSOR_DEFINITIONS = ( ++ "DEBUG=1", ++ "$(inherited)", ++ ); ++ GCC_WARN_64_TO_32_BIT_CONVERSION = YES; ++ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; ++ GCC_WARN_UNDECLARED_SELECTOR = YES; ++ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; ++ GCC_WARN_UNUSED_FUNCTION = YES; ++ GCC_WARN_UNUSED_VARIABLE = YES; ++ IPHONEOS_DEPLOYMENT_TARGET = 12.0; ++ LOCALIZATION_PREFERS_STRING_CATALOGS = YES; ++ MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; ++ MTL_FAST_MATH = YES; ++ ONLY_ACTIVE_ARCH = YES; ++ SDKROOT = xros; ++ }; ++ name = Debug; ++ }; ++ 607A66402B0EFA3A0010BFC8 /* Release */ = { ++ isa = XCBuildConfiguration; ++ buildSettings = { ++ ALWAYS_SEARCH_USER_PATHS = NO; ++ ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; ++ CLANG_ANALYZER_NONNULL = YES; ++ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; ++ CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; ++ CLANG_ENABLE_MODULES = YES; ++ CLANG_ENABLE_OBJC_ARC = YES; ++ CLANG_ENABLE_OBJC_WEAK = YES; ++ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; ++ CLANG_WARN_BOOL_CONVERSION = YES; ++ CLANG_WARN_COMMA = YES; ++ CLANG_WARN_CONSTANT_CONVERSION = YES; ++ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; ++ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; ++ CLANG_WARN_DOCUMENTATION_COMMENTS = YES; ++ CLANG_WARN_EMPTY_BODY = YES; ++ CLANG_WARN_ENUM_CONVERSION = YES; ++ CLANG_WARN_INFINITE_RECURSION = YES; ++ CLANG_WARN_INT_CONVERSION = YES; ++ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; ++ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; ++ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; ++ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; ++ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; ++ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; ++ CLANG_WARN_STRICT_PROTOTYPES = YES; ++ CLANG_WARN_SUSPICIOUS_MOVE = YES; ++ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; ++ CLANG_WARN_UNREACHABLE_CODE = YES; ++ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; ++ COPY_PHASE_STRIP = NO; ++ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ++ ENABLE_NS_ASSERTIONS = NO; ++ ENABLE_STRICT_OBJC_MSGSEND = YES; ++ ENABLE_USER_SCRIPT_SANDBOXING = YES; ++ GCC_C_LANGUAGE_STANDARD = gnu17; ++ GCC_NO_COMMON_BLOCKS = YES; ++ GCC_WARN_64_TO_32_BIT_CONVERSION = YES; ++ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; ++ GCC_WARN_UNDECLARED_SELECTOR = YES; ++ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; ++ GCC_WARN_UNUSED_FUNCTION = YES; ++ GCC_WARN_UNUSED_VARIABLE = YES; ++ IPHONEOS_DEPLOYMENT_TARGET = 12.0; ++ LOCALIZATION_PREFERS_STRING_CATALOGS = YES; ++ MTL_ENABLE_DEBUG_INFO = NO; ++ MTL_FAST_MATH = YES; ++ SDKROOT = xros; ++ VALIDATE_PRODUCT = YES; ++ }; ++ name = Release; ++ }; ++ 607A66422B0EFA3A0010BFC8 /* Debug */ = { ++ isa = XCBuildConfiguration; ++ buildSettings = { ++ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ++ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; ++ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO; ++ CODE_SIGN_STYLE = Automatic; ++ CURRENT_PROJECT_VERSION = 1; ++ DEVELOPMENT_TEAM = ""; ++ ENABLE_USER_SCRIPT_SANDBOXING = NO; ++ HEADER_SEARCH_PATHS = "\"$(BUILT_PRODUCTS_DIR)/Python.framework/Headers\""; ++ INFOPLIST_FILE = "visionOSTestbed/visionOStestbed-Info.plist"; ++ INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; ++ INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; ++ INFOPLIST_KEY_UIMainStoryboardFile = Main; ++ INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; ++ INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; ++ LD_RUNPATH_SEARCH_PATHS = ( ++ "$(inherited)", ++ "@executable_path/Frameworks", ++ ); ++ MARKETING_VERSION = 3.13.0a1; ++ PRODUCT_BUNDLE_IDENTIFIER = org.python.visionOSTestbed; ++ PRODUCT_NAME = "$(TARGET_NAME)"; ++ SUPPORTED_PLATFORMS = "xros xrsimulator"; ++ SUPPORTS_MACCATALYST = NO; ++ SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; ++ SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; ++ SWIFT_EMIT_LOC_STRINGS = YES; ++ TARGETED_DEVICE_FAMILY = 7; ++ XROS_DEPLOYMENT_TARGET = 2.0; ++ }; ++ name = Debug; ++ }; ++ 607A66432B0EFA3A0010BFC8 /* Release */ = { ++ isa = XCBuildConfiguration; ++ buildSettings = { ++ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ++ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; ++ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO; ++ CODE_SIGN_STYLE = Automatic; ++ CURRENT_PROJECT_VERSION = 1; ++ DEVELOPMENT_TEAM = ""; ++ ENABLE_TESTABILITY = YES; ++ ENABLE_USER_SCRIPT_SANDBOXING = NO; ++ HEADER_SEARCH_PATHS = "\"$(BUILT_PRODUCTS_DIR)/Python.framework/Headers\""; ++ INFOPLIST_FILE = "visionOSTestbed/visionOStestbed-Info.plist"; ++ INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; ++ INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; ++ INFOPLIST_KEY_UIMainStoryboardFile = Main; ++ INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; ++ INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; ++ LD_RUNPATH_SEARCH_PATHS = ( ++ "$(inherited)", ++ "@executable_path/Frameworks", ++ ); ++ MARKETING_VERSION = 3.13.0a1; ++ PRODUCT_BUNDLE_IDENTIFIER = org.python.visionOSTestbed; ++ PRODUCT_NAME = "$(TARGET_NAME)"; ++ SUPPORTED_PLATFORMS = "xros xrsimulator"; ++ SUPPORTS_MACCATALYST = NO; ++ SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; ++ SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; ++ SWIFT_EMIT_LOC_STRINGS = YES; ++ TARGETED_DEVICE_FAMILY = 7; ++ XROS_DEPLOYMENT_TARGET = 2.0; ++ }; ++ name = Release; ++ }; ++ 607A66452B0EFA3A0010BFC8 /* Debug */ = { ++ isa = XCBuildConfiguration; ++ buildSettings = { ++ BUNDLE_LOADER = "$(TEST_HOST)"; ++ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO; ++ CODE_SIGN_STYLE = Automatic; ++ CURRENT_PROJECT_VERSION = 1; ++ DEVELOPMENT_TEAM = 3HEZE76D99; ++ GENERATE_INFOPLIST_FILE = YES; ++ HEADER_SEARCH_PATHS = "\"$(BUILT_PRODUCTS_DIR)/Python.framework/Headers\""; ++ IPHONEOS_DEPLOYMENT_TARGET = 12.0; ++ MARKETING_VERSION = 1.0; ++ PRODUCT_BUNDLE_IDENTIFIER = org.python.visionOSTestbedTests; ++ PRODUCT_NAME = "$(TARGET_NAME)"; ++ SUPPORTED_PLATFORMS = "xros xrsimulator"; ++ SUPPORTS_MACCATALYST = NO; ++ SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; ++ SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; ++ SWIFT_EMIT_LOC_STRINGS = NO; ++ TARGETED_DEVICE_FAMILY = 7; ++ TEST_HOST = "$(BUILT_PRODUCTS_DIR)/visionOSTestbed.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/visionOSTestbed"; ++ }; ++ name = Debug; ++ }; ++ 607A66462B0EFA3A0010BFC8 /* Release */ = { ++ isa = XCBuildConfiguration; ++ buildSettings = { ++ BUNDLE_LOADER = "$(TEST_HOST)"; ++ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO; ++ CODE_SIGN_STYLE = Automatic; ++ CURRENT_PROJECT_VERSION = 1; ++ DEVELOPMENT_TEAM = 3HEZE76D99; ++ GENERATE_INFOPLIST_FILE = YES; ++ HEADER_SEARCH_PATHS = "\"$(BUILT_PRODUCTS_DIR)/Python.framework/Headers\""; ++ IPHONEOS_DEPLOYMENT_TARGET = 12.0; ++ MARKETING_VERSION = 1.0; ++ PRODUCT_BUNDLE_IDENTIFIER = org.python.visionOSTestbedTests; ++ PRODUCT_NAME = "$(TARGET_NAME)"; ++ SUPPORTED_PLATFORMS = "xros xrsimulator"; ++ SUPPORTS_MACCATALYST = NO; ++ SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; ++ SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; ++ SWIFT_EMIT_LOC_STRINGS = NO; ++ TARGETED_DEVICE_FAMILY = 7; ++ TEST_HOST = "$(BUILT_PRODUCTS_DIR)/visionOSTestbed.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/visionOSTestbed"; ++ }; ++ name = Release; ++ }; ++/* End XCBuildConfiguration section */ ++ ++/* Begin XCConfigurationList section */ ++ 607A660D2B0EFA380010BFC8 /* Build configuration list for PBXProject "visionOSTestbed" */ = { ++ isa = XCConfigurationList; ++ buildConfigurations = ( ++ 607A663F2B0EFA3A0010BFC8 /* Debug */, ++ 607A66402B0EFA3A0010BFC8 /* Release */, ++ ); ++ defaultConfigurationIsVisible = 0; ++ defaultConfigurationName = Release; ++ }; ++ 607A66412B0EFA3A0010BFC8 /* Build configuration list for PBXNativeTarget "visionOSTestbed" */ = { ++ isa = XCConfigurationList; ++ buildConfigurations = ( ++ 607A66422B0EFA3A0010BFC8 /* Debug */, ++ 607A66432B0EFA3A0010BFC8 /* Release */, ++ ); ++ defaultConfigurationIsVisible = 0; ++ defaultConfigurationName = Release; ++ }; ++ 607A66442B0EFA3A0010BFC8 /* Build configuration list for PBXNativeTarget "visionOSTestbedTests" */ = { ++ isa = XCConfigurationList; ++ buildConfigurations = ( ++ 607A66452B0EFA3A0010BFC8 /* Debug */, ++ 607A66462B0EFA3A0010BFC8 /* Release */, ++ ); ++ defaultConfigurationIsVisible = 0; ++ defaultConfigurationName = Release; ++ }; ++/* End XCConfigurationList section */ ++ }; ++ rootObject = 607A660A2B0EFA380010BFC8 /* Project object */; ++} +diff --git a/visionOS/testbed/visionOSTestbed/AppDelegate.h b/visionOS/testbed/visionOSTestbed/AppDelegate.h +new file mode 100644 +index 00000000000..8fe7ec8e64e +--- /dev/null ++++ b/visionOS/testbed/visionOSTestbed/AppDelegate.h +@@ -0,0 +1,11 @@ ++// ++// AppDelegate.h ++// visionOSTestbed ++// ++ ++#import ++ ++@interface AppDelegate : UIResponder ++ ++ ++@end +diff --git a/visionOS/testbed/visionOSTestbed/AppDelegate.m b/visionOS/testbed/visionOSTestbed/AppDelegate.m +new file mode 100644 +index 00000000000..b3ff14f7255 +--- /dev/null ++++ b/visionOS/testbed/visionOSTestbed/AppDelegate.m +@@ -0,0 +1,19 @@ ++// ++// AppDelegate.m ++// visionOSTestbed ++// ++ ++#import "AppDelegate.h" ++ ++@interface AppDelegate () ++ ++@end ++ ++@implementation AppDelegate ++ ++ ++- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { ++ return YES; ++} ++ ++@end +diff --git a/visionOS/testbed/visionOSTestbed/Assets.xcassets/AccentColor.colorset/Contents.json b/visionOS/testbed/visionOSTestbed/Assets.xcassets/AccentColor.colorset/Contents.json +new file mode 100644 +index 00000000000..eb878970081 +--- /dev/null ++++ b/visionOS/testbed/visionOSTestbed/Assets.xcassets/AccentColor.colorset/Contents.json +@@ -0,0 +1,11 @@ ++{ ++ "colors" : [ ++ { ++ "idiom" : "universal" ++ } ++ ], ++ "info" : { ++ "author" : "xcode", ++ "version" : 1 ++ } ++} +diff --git a/visionOS/testbed/visionOSTestbed/Assets.xcassets/AppIcon.appiconset/Contents.json b/visionOS/testbed/visionOSTestbed/Assets.xcassets/AppIcon.appiconset/Contents.json +new file mode 100644 +index 00000000000..13613e3ee1a +--- /dev/null ++++ b/visionOS/testbed/visionOSTestbed/Assets.xcassets/AppIcon.appiconset/Contents.json +@@ -0,0 +1,13 @@ ++{ ++ "images" : [ ++ { ++ "idiom" : "universal", ++ "platform" : "ios", ++ "size" : "1024x1024" ++ } ++ ], ++ "info" : { ++ "author" : "xcode", ++ "version" : 1 ++ } ++} +diff --git a/visionOS/testbed/visionOSTestbed/Assets.xcassets/Contents.json b/visionOS/testbed/visionOSTestbed/Assets.xcassets/Contents.json +new file mode 100644 +index 00000000000..73c00596a7f +--- /dev/null ++++ b/visionOS/testbed/visionOSTestbed/Assets.xcassets/Contents.json +@@ -0,0 +1,6 @@ ++{ ++ "info" : { ++ "author" : "xcode", ++ "version" : 1 ++ } ++} +diff --git a/visionOS/testbed/visionOSTestbed/Base.lproj/LaunchScreen.storyboard b/visionOS/testbed/visionOSTestbed/Base.lproj/LaunchScreen.storyboard +new file mode 100644 +index 00000000000..5daafe73a86 +--- /dev/null ++++ b/visionOS/testbed/visionOSTestbed/Base.lproj/LaunchScreen.storyboard +@@ -0,0 +1,9 @@ ++ ++ ++ ++ ++ ++ ++ ++ ++ +diff --git a/visionOS/testbed/visionOSTestbed/app/README b/visionOS/testbed/visionOSTestbed/app/README +new file mode 100644 +index 00000000000..af22c685f87 +--- /dev/null ++++ b/visionOS/testbed/visionOSTestbed/app/README +@@ -0,0 +1,7 @@ ++This folder can contain any Python application code. ++ ++During the build, any binary modules found in this folder will be processed into ++iOS Framework form. ++ ++When the test suite runs, this folder will be on the PYTHONPATH, and will be the ++working directory for the test suite. +diff --git a/visionOS/testbed/visionOSTestbed/app_packages/README b/visionOS/testbed/visionOSTestbed/app_packages/README +new file mode 100644 +index 00000000000..42d7fdeb813 +--- /dev/null ++++ b/visionOS/testbed/visionOSTestbed/app_packages/README +@@ -0,0 +1,7 @@ ++This folder can be a target for installing any Python dependencies needed by the ++test suite. ++ ++During the build, any binary modules found in this folder will be processed into ++iOS Framework form. ++ ++When the test suite runs, this folder will be on the PYTHONPATH. +diff --git a/visionOS/testbed/visionOSTestbed/dylib-Info-template.plist b/visionOS/testbed/visionOSTestbed/dylib-Info-template.plist +new file mode 100644 +index 00000000000..f652e272f71 +--- /dev/null ++++ b/visionOS/testbed/visionOSTestbed/dylib-Info-template.plist +@@ -0,0 +1,26 @@ ++ ++ ++ ++ ++ CFBundleDevelopmentRegion ++ en ++ CFBundleExecutable ++ ++ CFBundleIdentifier ++ ++ CFBundleInfoDictionaryVersion ++ 6.0 ++ CFBundlePackageType ++ APPL ++ CFBundleShortVersionString ++ 1.0 ++ CFBundleSupportedPlatforms ++ ++ iPhoneOS ++ ++ MinimumOSVersion ++ 12.0 ++ CFBundleVersion ++ 1 ++ ++ +diff --git a/visionOS/testbed/visionOSTestbed/main.m b/visionOS/testbed/visionOSTestbed/main.m +new file mode 100644 +index 00000000000..2bb491f25c8 +--- /dev/null ++++ b/visionOS/testbed/visionOSTestbed/main.m +@@ -0,0 +1,16 @@ ++// ++// main.m ++// visionOSTestbed ++// ++ ++#import ++#import "AppDelegate.h" ++ ++int main(int argc, char * argv[]) { ++ NSString * appDelegateClassName; ++ @autoreleasepool { ++ appDelegateClassName = NSStringFromClass([AppDelegate class]); ++ ++ return UIApplicationMain(argc, argv, nil, appDelegateClassName); ++ } ++} +diff --git a/visionOS/testbed/visionOSTestbed/visionOStestbed-Info.plist b/visionOS/testbed/visionOSTestbed/visionOStestbed-Info.plist +new file mode 100644 +index 00000000000..47d59effe4e +--- /dev/null ++++ b/visionOS/testbed/visionOSTestbed/visionOStestbed-Info.plist +@@ -0,0 +1,60 @@ ++ ++ ++ ++ ++ CFBundleDevelopmentRegion ++ en ++ CFBundleDisplayName ++ ${PRODUCT_NAME} ++ CFBundleExecutable ++ ${EXECUTABLE_NAME} ++ CFBundleIdentifier ++ org.python.visionOSTestbed ++ CFBundleInfoDictionaryVersion ++ 6.0 ++ CFBundleName ++ ${PRODUCT_NAME} ++ CFBundlePackageType ++ APPL ++ CFBundleShortVersionString ++ 1.0 ++ CFBundleSignature ++ ???? ++ CFBundleVersion ++ 1 ++ LSRequiresIPhoneOS ++ ++ TestArgs ++ ++ test ++ -uall ++ --single-process ++ --rerun ++ -W ++ ++ UIApplicationSceneManifest ++ ++ UIApplicationSupportsMultipleScenes ++ ++ UISceneConfigurations ++ ++ ++ UILaunchStoryboardName ++ Launch Screen ++ UIRequiresFullScreen ++ ++ UISupportedInterfaceOrientations ++ ++ UIInterfaceOrientationPortrait ++ UIInterfaceOrientationLandscapeLeft ++ UIInterfaceOrientationLandscapeRight ++ ++ UISupportedInterfaceOrientations~ipad ++ ++ UIInterfaceOrientationPortrait ++ UIInterfaceOrientationPortraitUpsideDown ++ UIInterfaceOrientationLandscapeLeft ++ UIInterfaceOrientationLandscapeRight ++ ++ ++ +diff --git a/visionOS/testbed/visionOSTestbedTests/visionOSTestbedTests.m b/visionOS/testbed/visionOSTestbedTests/visionOSTestbedTests.m +new file mode 100644 +index 00000000000..197b709aa10 +--- /dev/null ++++ b/visionOS/testbed/visionOSTestbedTests/visionOSTestbedTests.m +@@ -0,0 +1,164 @@ ++#import ++#import ++ ++@interface visionOSTestbedTests : XCTestCase ++ ++@end ++ ++@implementation visionOSTestbedTests ++ ++ ++- (void)testPython { ++ const char **argv; ++ int exit_code; ++ int failed; ++ PyStatus status; ++ PyPreConfig preconfig; ++ PyConfig config; ++ PyObject *sys_module; ++ PyObject *sys_path_attr; ++ NSArray *test_args; ++ NSString *python_home; ++ NSString *path; ++ wchar_t *wtmp_str; ++ ++ NSString *resourcePath = [[NSBundle mainBundle] resourcePath]; ++ ++ // Set some other common environment indicators to disable color, as the ++ // Xcode log can't display color. Stdout will report that it is *not* a ++ // TTY. ++ setenv("NO_COLOR", "1", true); ++ setenv("PYTHON_COLORS", "0", true); ++ setenv("PYTHONVERBOSE", "1", true); ++ ++ // Arguments to pass into the test suite runner. ++ // argv[0] must identify the process; any subsequent arg ++ // will be handled as if it were an argument to `python -m test` ++ test_args = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"TestArgs"]; ++ if (test_args == NULL) { ++ NSLog(@"Unable to identify test arguments."); ++ } ++ argv = malloc(sizeof(char *) * ([test_args count] + 1)); ++ argv[0] = "visionOSTestbed"; ++ for (int i = 1; i < [test_args count]; i++) { ++ argv[i] = [[test_args objectAtIndex:i] UTF8String]; ++ } ++ NSLog(@"Test command: %@", test_args); ++ ++ // Generate an isolated Python configuration. ++ NSLog(@"Configuring isolated Python..."); ++ PyPreConfig_InitIsolatedConfig(&preconfig); ++ PyConfig_InitIsolatedConfig(&config); ++ ++ // Configure the Python interpreter: ++ // Enforce UTF-8 encoding for stderr, stdout, file-system encoding and locale. ++ // See https://docs.python.org/3/library/os.html#python-utf-8-mode. ++ preconfig.utf8_mode = 1; ++ // Use the system logger for stdout/err ++ config.use_system_logger = 1; ++ // Don't buffer stdio. We want output to appears in the log immediately ++ config.buffered_stdio = 0; ++ // Don't write bytecode; we can't modify the app bundle ++ // after it has been signed. ++ config.write_bytecode = 0; ++ // Ensure that signal handlers are installed ++ config.install_signal_handlers = 1; ++ // Run the test module. ++ config.run_module = Py_DecodeLocale([[test_args objectAtIndex:0] UTF8String], NULL); ++ // For debugging - enable verbose mode. ++ // config.verbose = 1; ++ ++ NSLog(@"Pre-initializing Python runtime..."); ++ status = Py_PreInitialize(&preconfig); ++ if (PyStatus_Exception(status)) { ++ XCTFail(@"Unable to pre-initialize Python interpreter: %s", status.err_msg); ++ PyConfig_Clear(&config); ++ return; ++ } ++ ++ // Set the home for the Python interpreter ++ python_home = [NSString stringWithFormat:@"%@/python", resourcePath, nil]; ++ NSLog(@"PythonHome: %@", python_home); ++ wtmp_str = Py_DecodeLocale([python_home UTF8String], NULL); ++ status = PyConfig_SetString(&config, &config.home, wtmp_str); ++ if (PyStatus_Exception(status)) { ++ XCTFail(@"Unable to set PYTHONHOME: %s", status.err_msg); ++ PyConfig_Clear(&config); ++ return; ++ } ++ PyMem_RawFree(wtmp_str); ++ ++ // Read the site config ++ status = PyConfig_Read(&config); ++ if (PyStatus_Exception(status)) { ++ XCTFail(@"Unable to read site config: %s", status.err_msg); ++ PyConfig_Clear(&config); ++ return; ++ } ++ ++ NSLog(@"Configure argc/argv..."); ++ status = PyConfig_SetBytesArgv(&config, [test_args count], (char**) argv); ++ if (PyStatus_Exception(status)) { ++ XCTFail(@"Unable to configure argc/argv: %s", status.err_msg); ++ PyConfig_Clear(&config); ++ return; ++ } ++ ++ NSLog(@"Initializing Python runtime..."); ++ status = Py_InitializeFromConfig(&config); ++ PyErr_Print(); ++ if (PyStatus_Exception(status)) { ++ XCTFail(@"Unable to initialize Python interpreter: %s", status.err_msg); ++ PyConfig_Clear(&config); ++ return; ++ } ++ ++ sys_module = PyImport_ImportModule("sys"); ++ if (sys_module == NULL) { ++ XCTFail(@"Could not import sys module"); ++ return; ++ } ++ ++ sys_path_attr = PyObject_GetAttrString(sys_module, "path"); ++ if (sys_path_attr == NULL) { ++ XCTFail(@"Could not access sys.path"); ++ return; ++ } ++ ++ // Add the app packages path ++ path = [NSString stringWithFormat:@"%@/app_packages", resourcePath, nil]; ++ NSLog(@"App packages path: %@", path); ++ wtmp_str = Py_DecodeLocale([path UTF8String], NULL); ++ failed = PyList_Insert(sys_path_attr, 0, PyUnicode_FromString([path UTF8String])); ++ if (failed) { ++ XCTFail(@"Unable to add app packages to sys.path"); ++ return; ++ } ++ PyMem_RawFree(wtmp_str); ++ ++ path = [NSString stringWithFormat:@"%@/app", resourcePath, nil]; ++ NSLog(@"App path: %@", path); ++ wtmp_str = Py_DecodeLocale([path UTF8String], NULL); ++ failed = PyList_Insert(sys_path_attr, 0, PyUnicode_FromString([path UTF8String])); ++ if (failed) { ++ XCTFail(@"Unable to add app to sys.path"); ++ return; ++ } ++ PyMem_RawFree(wtmp_str); ++ ++ // Ensure the working directory is the app folder. ++ chdir([path UTF8String]); ++ ++ // Start the test suite. Print a separator to differentiate Python startup logs from app logs ++ NSLog(@"---------------------------------------------------------------------------"); ++ ++ exit_code = Py_RunMain(); ++ XCTAssertEqual(exit_code, 0, @"Test suite did not pass"); ++ ++ NSLog(@"---------------------------------------------------------------------------"); ++ ++ Py_Finalize(); ++} ++ ++ ++@end diff --git a/watchOS/README.rst b/watchOS/README.rst new file mode 100644 index 00000000000..35221478452 From 1ae35123d1409ccfa1cefb838e3c134e48e3c6c3 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Wed, 23 Apr 2025 14:37:30 +0800 Subject: [PATCH 22/22] Update patch. --- Makefile | 12 +- patch/Python/Python.patch | 629 ++++++++++++++++++-------------------- 2 files changed, 305 insertions(+), 336 deletions(-) diff --git a/Makefile b/Makefile index b1a21d09..72994c0b 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ BUILD_NUMBER=custom # of a release cycle, as official binaries won't be published. # PYTHON_MICRO_VERSION is the full version number, without any alpha/beta/rc suffix. (e.g., 3.10.0) # PYTHON_VER is the major/minor version (e.g., 3.10) -PYTHON_VERSION=3.14.0a6 +PYTHON_VERSION=3.14.0a7 PYTHON_PKG_VERSION=$(PYTHON_VERSION) PYTHON_MICRO_VERSION=$(shell echo $(PYTHON_VERSION) | grep -Eo "\d+\.\d+\.\d+") PYTHON_PKG_MICRO_VERSION=$(shell echo $(PYTHON_PKG_VERSION) | grep -Eo "\d+\.\d+\.\d+") @@ -27,11 +27,11 @@ PYTHON_VER=$(basename $(PYTHON_VERSION)) # The binary releases of dependencies, published at: # https://github.com/beeware/cpython-apple-source-deps/releases -BZIP2_VERSION=1.0.8-1 -LIBFFI_VERSION=3.4.7-1 -MPDECIMAL_VERSION=4.0.0-1 -OPENSSL_VERSION=3.0.16-1 -XZ_VERSION=5.6.4-1 +BZIP2_VERSION=1.0.8-2 +LIBFFI_VERSION=3.4.7-2 +MPDECIMAL_VERSION=4.0.0-2 +OPENSSL_VERSION=3.0.16-2 +XZ_VERSION=5.6.4-2 # Supported OS OS_LIST=macOS iOS tvOS watchOS visionOS diff --git a/patch/Python/Python.patch b/patch/Python/Python.patch index fec4a3aa..4c59f844 100644 --- a/patch/Python/Python.patch +++ b/patch/Python/Python.patch @@ -1,8 +1,8 @@ diff --git a/Lib/ctypes/__init__.py b/Lib/ctypes/__init__.py -index 8e2a2926f7a..a0384634a49 100644 +index bba08b99b95..8d03017c223 100644 --- a/Lib/ctypes/__init__.py +++ b/Lib/ctypes/__init__.py -@@ -359,7 +359,7 @@ def __init__(self, name, mode=DEFAULT_MODE, handle=None, +@@ -361,7 +361,7 @@ if name: name = _os.fspath(name) @@ -12,10 +12,19 @@ index 8e2a2926f7a..a0384634a49 100644 # binary. if name.endswith(".fwork"): diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py -index 99504911a3d..6f6d1a4e837 100644 +index 99504911a3d..527c2f36dd0 100644 --- a/Lib/ctypes/util.py +++ b/Lib/ctypes/util.py -@@ -425,7 +425,7 @@ def find_library(name): +@@ -126,7 +126,7 @@ + if (name := _get_module_filename(h)) is not None] + return libraries + +-elif os.name == "posix" and sys.platform in {"darwin", "ios", "tvos", "watchos"}: ++elif os.name == "posix" and sys.platform in {"darwin", "ios", "tvos", "watchos", "visionos"}: + from ctypes.macholib.dyld import dyld_find as _dyld_find + def find_library(name): + possible = ['lib%s.dylib' % name, +@@ -425,7 +425,7 @@ # https://man.openbsd.org/dl_iterate_phdr # https://docs.oracle.com/cd/E88353_01/html/E37843/dl-iterate-phdr-3c.html if (os.name == "posix" and @@ -37,7 +46,7 @@ index 8bcd741c446..d8a6f28edba 100644 _CASE_INSENSITIVE_PLATFORMS = (_CASE_INSENSITIVE_PLATFORMS_BYTES_KEY + _CASE_INSENSITIVE_PLATFORMS_STR_KEY) -@@ -1535,7 +1535,7 @@ def _get_supported_file_loaders(): +@@ -1535,7 +1535,7 @@ """ extension_loaders = [] if hasattr(_imp, 'create_dynamic'): @@ -47,10 +56,10 @@ index 8bcd741c446..d8a6f28edba 100644 suffix.replace(".so", ".fwork") for suffix in _imp.extension_suffixes() diff --git a/Lib/platform.py b/Lib/platform.py -index 1f6baed66d3..6276d0dbdd3 100644 +index a62192589af..31f18b026b7 100644 --- a/Lib/platform.py +++ b/Lib/platform.py -@@ -521,6 +521,78 @@ def ios_ver(system="", release="", model="", is_simulator=False): +@@ -528,6 +528,78 @@ return IOSVersionInfo(system, release, model, is_simulator) @@ -129,7 +138,7 @@ index 1f6baed66d3..6276d0dbdd3 100644 def _java_getprop(name, default): """This private helper is deprecated in 3.13 and will be removed in 3.15""" from java.lang import System -@@ -720,7 +792,7 @@ def _syscmd_file(target, default=''): +@@ -727,7 +799,7 @@ default in case the command should fail. """ @@ -138,7 +147,7 @@ index 1f6baed66d3..6276d0dbdd3 100644 # XXX Others too ? return default -@@ -884,14 +956,30 @@ def get_OpenVMS(): +@@ -891,14 +963,30 @@ csid, cpu_number = vms_lib.getsyi('SYI$_CPU', 0) return 'Alpha' if cpu_number >= 128 else 'VAX' @@ -172,7 +181,7 @@ index 1f6baed66d3..6276d0dbdd3 100644 def from_subprocess(): """ Fall back to `uname -p` -@@ -1051,9 +1139,15 @@ def uname(): +@@ -1058,9 +1146,15 @@ system = 'Android' release = android_ver().release @@ -189,7 +198,7 @@ index 1f6baed66d3..6276d0dbdd3 100644 vals = system, node, release, version, machine # Replace 'unknown' values with the more portable '' -@@ -1343,6 +1437,12 @@ def platform(aliased=False, terse=False): +@@ -1350,6 +1444,12 @@ # macOS and iOS both report as a "Darwin" kernel if sys.platform == "ios": system, release, _, _ = ios_ver() @@ -206,7 +215,7 @@ diff --git a/Lib/site.py b/Lib/site.py index 9da8b6724e1..345f55a5bde 100644 --- a/Lib/site.py +++ b/Lib/site.py -@@ -297,8 +297,8 @@ def _getuserbase(): +@@ -297,8 +297,8 @@ if env_base: return env_base @@ -217,6 +226,19 @@ index 9da8b6724e1..345f55a5bde 100644 return None def joinuser(*args): +diff --git a/Lib/subprocess.py b/Lib/subprocess.py +index da5f5729e09..7401ffbc987 100644 +--- a/Lib/subprocess.py ++++ b/Lib/subprocess.py +@@ -75,7 +75,7 @@ + _mswindows = True + + # some platforms do not support subprocesses +-_can_fork_exec = sys.platform not in {"emscripten", "wasi", "ios", "tvos", "watchos"} ++_can_fork_exec = sys.platform not in {"emscripten", "wasi", "ios", "tvos", "watchos", "visionos"} + + if _mswindows: + import _winapi diff --git a/Lib/sysconfig/__init__.py b/Lib/sysconfig/__init__.py index 18e6b8d25e5..64603fb1bb1 100644 --- a/Lib/sysconfig/__init__.py @@ -231,7 +253,7 @@ index 18e6b8d25e5..64603fb1bb1 100644 } _INSTALL_SCHEMES = { -@@ -119,7 +122,7 @@ def _getuserbase(): +@@ -119,7 +122,7 @@ # Emscripten, iOS, tvOS, VxWorks, WASI, and watchOS have no home directories. # Use _PYTHON_HOST_PLATFORM to get the correct platform when cross-compiling. system_name = os.environ.get('_PYTHON_HOST_PLATFORM', sys.platform).split('-')[0] @@ -240,7 +262,7 @@ index 18e6b8d25e5..64603fb1bb1 100644 return None def joinuser(*args): -@@ -719,6 +722,18 @@ def get_platform(): +@@ -719,6 +722,18 @@ release = get_config_vars().get("IPHONEOS_DEPLOYMENT_TARGET", "13.0") osname = sys.platform machine = sys.implementation._multiarch @@ -259,11 +281,145 @@ index 18e6b8d25e5..64603fb1bb1 100644 else: import _osx_support osname, release, machine = _osx_support.get_platform_osx( +diff --git a/Lib/test/datetimetester.py b/Lib/test/datetimetester.py +index ecb37250ceb..67d04491072 100644 +--- a/Lib/test/datetimetester.py ++++ b/Lib/test/datetimetester.py +@@ -7155,9 +7155,9 @@ + self.assertEqual(dt_orig, dt_rt) + + def test_type_check_in_subinterp(self): +- # iOS requires the use of the custom framework loader, ++ # Apple mobile platforms require the use of the custom framework loader, + # not the ExtensionFileLoader. +- if sys.platform == "ios": ++ if support.is_apple_mobile: + extension_loader = "AppleFrameworkLoader" + else: + extension_loader = "ExtensionFileLoader" +diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py +index 6d670a575b0..8d7d68d1ee1 100644 +--- a/Lib/test/support/__init__.py ++++ b/Lib/test/support/__init__.py +@@ -551,7 +551,7 @@ + sys.platform == "android", f"Android blocks {name} with SELinux" + ) + +-if sys.platform not in {"win32", "vxworks", "ios", "tvos", "watchos"}: ++if sys.platform not in {"win32", "vxworks", "ios", "tvos", "watchos", "visionos"}: + unix_shell = '/system/bin/sh' if is_android else '/bin/sh' + else: + unix_shell = None +@@ -567,7 +567,7 @@ + def skip_wasi_stack_overflow(): + return unittest.skipIf(is_wasi, "Exhausts stack on WASI") + +-is_apple_mobile = sys.platform in {"ios", "tvos", "watchos"} ++is_apple_mobile = sys.platform in {"ios", "tvos", "watchos", "visionos"} + is_apple = is_apple_mobile or sys.platform == "darwin" + + has_fork_support = hasattr(os, "fork") and not ( +diff --git a/Lib/test/support/os_helper.py b/Lib/test/support/os_helper.py +index d82093e375c..2c45fe2369e 100644 +--- a/Lib/test/support/os_helper.py ++++ b/Lib/test/support/os_helper.py +@@ -657,7 +657,7 @@ + """ + if sys.platform.startswith(('linux', 'android', 'freebsd', 'emscripten')): + fd_path = "/proc/self/fd" +- elif sys.platform == "darwin": ++ elif support.is_apple: + fd_path = "/dev/fd" + else: + fd_path = None +diff --git a/Lib/test/test_ctypes/test_dllist.py b/Lib/test/test_ctypes/test_dllist.py +index 15603dc3d77..bff6c0fb95f 100644 +--- a/Lib/test/test_ctypes/test_dllist.py ++++ b/Lib/test/test_ctypes/test_dllist.py +@@ -7,7 +7,7 @@ + + + WINDOWS = os.name == "nt" +-APPLE = sys.platform in {"darwin", "ios", "tvos", "watchos"} ++APPLE = sys.platform in {"darwin", "ios", "tvos", "watchos", "visionos"} + + if WINDOWS: + KNOWN_LIBRARIES = ["KERNEL32.DLL"] +diff --git a/Lib/test/test_platform.py b/Lib/test/test_platform.py +index 6ba630ad527..7b447744d12 100644 +--- a/Lib/test/test_platform.py ++++ b/Lib/test/test_platform.py +@@ -268,13 +268,21 @@ + if sys.platform == "android": + self.assertEqual(res.system, "Android") + self.assertEqual(res.release, platform.android_ver().release) +- elif sys.platform == "ios": ++ elif support.is_apple_mobile: + # Platform module needs ctypes for full operation. If ctypes + # isn't available, there's no ObjC module, and dummy values are + # returned. + if _ctypes: +- self.assertIn(res.system, {"iOS", "iPadOS"}) +- self.assertEqual(res.release, platform.ios_ver().release) ++ if sys.platform == "ios": ++ # iPads also identify as iOS ++ self.assertIn(res.system, {"iOS", "iPadOS"}) ++ else: ++ # All other platforms - sys.platform is the lower case ++ # form of system (e.g., visionOS->visionos) ++ self.assertEqual(res.system.lower(), sys.platform) ++ # Use the platform-specific version method ++ platform_ver = getattr(platform, f"{sys.platform}_ver") ++ self.assertEqual(res.release, platform_ver().release) + else: + self.assertEqual(res.system, "") + self.assertEqual(res.release, "") +diff --git a/Lib/test/test_webbrowser.py b/Lib/test/test_webbrowser.py +index 4c3ea1cd8df..04a210e5c86 100644 +--- a/Lib/test/test_webbrowser.py ++++ b/Lib/test/test_webbrowser.py +@@ -236,7 +236,8 @@ + arguments=[f'openURL({URL},new-tab)']) + + +-@unittest.skipUnless(sys.platform == "ios", "Test only applicable to iOS") ++@unittest.skipUnless(sys.platform in {"ios", "visionOS"}, ++ "Test only applicable to iOS and visionOS") + class IOSBrowserTest(unittest.TestCase): + def _obj_ref(self, *args): + # Construct a string representation of the arguments that can be used +diff --git a/Lib/webbrowser.py b/Lib/webbrowser.py +index 232d3c3a9c5..e042c20ea54 100644 +--- a/Lib/webbrowser.py ++++ b/Lib/webbrowser.py +@@ -488,7 +488,8 @@ + # OS X can use below Unix support (but we prefer using the OS X + # specific stuff) + +- if sys.platform == "ios": ++ if sys.platform in {"ios", "visionos"}: ++ # iOS and visionOS provide a browser; tvOS and watchOS don't. + register("iosbrowser", None, IOSBrowser(), preferred=True) + + if sys.platform == "serenityos": +@@ -640,9 +641,10 @@ + return not rc + + # +-# Platform support for iOS ++# Platform support for Apple Mobile platforms that provide a browser ++# (i.e., iOS and visionOS) + # +-if sys.platform == "ios": ++if sys.platform in {"ios", "visionos"}: + from _ios_support import objc + if objc: + # If objc exists, we know ctypes is also importable. diff --git a/Makefile.pre.in b/Makefile.pre.in -index 5fdbfa1053c..cc3f9d4cdbe 100644 +index e10c78d6403..920e707ab26 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -209,6 +209,12 @@ MACOSX_DEPLOYMENT_TARGET=@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@ +@@ -209,6 +209,12 @@ # the build, and is only listed here so it will be included in sysconfigdata. IPHONEOS_DEPLOYMENT_TARGET=@IPHONEOS_DEPLOYMENT_TARGET@ @@ -276,7 +432,7 @@ index 5fdbfa1053c..cc3f9d4cdbe 100644 # Option to install to strip binaries STRIPFLAG=-s -@@ -2149,7 +2155,7 @@ testuniversal: all +@@ -2243,7 +2249,7 @@ # a full Xcode install that has an iPhone SE (3rd edition) simulator available. # This must be run *after* a `make install` has completed the build. The # `--with-framework-name` argument *cannot* be used when configuring the build. @@ -285,7 +441,7 @@ index 5fdbfa1053c..cc3f9d4cdbe 100644 .PHONY: testios testios: @if test "$(MACHDEP)" != "ios"; then \ -@@ -2169,11 +2175,41 @@ testios: +@@ -2263,11 +2269,41 @@ exit 1;\ fi @@ -334,7 +490,7 @@ diff --git a/Misc/platform_triplet.c b/Misc/platform_triplet.c index ec0857a4a99..e52f486cdb3 100644 --- a/Misc/platform_triplet.c +++ b/Misc/platform_triplet.c -@@ -257,6 +257,32 @@ PLATFORM_TRIPLET=arm64-iphonesimulator +@@ -257,6 +257,32 @@ # else PLATFORM_TRIPLET=arm64-iphoneos # endif @@ -371,7 +527,7 @@ diff --git a/config.sub b/config.sub index 1bb6a05dc11..49febd56a37 100755 --- a/config.sub +++ b/config.sub -@@ -1743,7 +1743,7 @@ case $os in +@@ -1743,7 +1743,7 @@ | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \ | hiux* | abug | nacl* | netware* | windows* \ @@ -380,7 +536,7 @@ index 1bb6a05dc11..49febd56a37 100755 | mpw* | magic* | mmixware* | mon960* | lnews* \ | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ | aos* | aros* | cloudabi* | sortix* | twizzler* \ -@@ -1867,7 +1867,7 @@ case $kernel-$os-$obj in +@@ -1867,7 +1867,7 @@ ;; *-eabi*- | *-gnueabi*-) ;; @@ -390,10 +546,10 @@ index 1bb6a05dc11..49febd56a37 100755 none--*) # None (no kernel, i.e. freestanding / bare metal), diff --git a/configure b/configure -index d0ae103014a..bafb0977d1a 100755 +index 1b75ddfa26d..7b79dfc424c 100755 --- a/configure +++ b/configure -@@ -974,6 +974,10 @@ LDFLAGS +@@ -978,6 +978,10 @@ CFLAGS CC HAS_XCRUN @@ -404,7 +560,7 @@ index d0ae103014a..bafb0977d1a 100755 IPHONEOS_DEPLOYMENT_TARGET EXPORT_MACOSX_DEPLOYMENT_TARGET CONFIGURE_MACOSX_DEPLOYMENT_TARGET -@@ -4100,6 +4104,15 @@ then +@@ -4106,6 +4110,15 @@ *-apple-ios*) ac_sys_system=iOS ;; @@ -420,7 +576,7 @@ index d0ae103014a..bafb0977d1a 100755 *-*-darwin*) ac_sys_system=Darwin ;; -@@ -4181,7 +4194,7 @@ fi +@@ -4187,7 +4200,7 @@ # On cross-compile builds, configure will look for a host-specific compiler by # prepending the user-provided host triple to the required binary name. # @@ -429,7 +585,7 @@ index d0ae103014a..bafb0977d1a 100755 # which isn't a binary that exists, and isn't very convenient, as it contains the # iOS version. As the default cross-compiler name won't exist, configure falls # back to gcc, which *definitely* won't work. We're providing wrapper scripts for -@@ -4196,6 +4209,17 @@ if test -z "$AR"; then +@@ -4202,6 +4215,17 @@ aarch64-apple-ios*-simulator) AR=arm64-apple-ios-simulator-ar ;; aarch64-apple-ios*) AR=arm64-apple-ios-ar ;; x86_64-apple-ios*-simulator) AR=x86_64-apple-ios-simulator-ar ;; @@ -447,7 +603,7 @@ index d0ae103014a..bafb0977d1a 100755 *) esac fi -@@ -4204,6 +4228,17 @@ if test -z "$CC"; then +@@ -4210,6 +4234,17 @@ aarch64-apple-ios*-simulator) CC=arm64-apple-ios-simulator-clang ;; aarch64-apple-ios*) CC=arm64-apple-ios-clang ;; x86_64-apple-ios*-simulator) CC=x86_64-apple-ios-simulator-clang ;; @@ -465,7 +621,7 @@ index d0ae103014a..bafb0977d1a 100755 *) esac fi -@@ -4212,6 +4247,17 @@ if test -z "$CPP"; then +@@ -4218,6 +4253,17 @@ aarch64-apple-ios*-simulator) CPP=arm64-apple-ios-simulator-cpp ;; aarch64-apple-ios*) CPP=arm64-apple-ios-cpp ;; x86_64-apple-ios*-simulator) CPP=x86_64-apple-ios-simulator-cpp ;; @@ -483,7 +639,7 @@ index d0ae103014a..bafb0977d1a 100755 *) esac fi -@@ -4220,6 +4266,17 @@ if test -z "$CXX"; then +@@ -4226,6 +4272,17 @@ aarch64-apple-ios*-simulator) CXX=arm64-apple-ios-simulator-clang++ ;; aarch64-apple-ios*) CXX=arm64-apple-ios-clang++ ;; x86_64-apple-ios*-simulator) CXX=x86_64-apple-ios-simulator-clang++ ;; @@ -501,7 +657,7 @@ index d0ae103014a..bafb0977d1a 100755 *) esac fi -@@ -4342,8 +4399,11 @@ then : +@@ -4348,8 +4405,11 @@ case $enableval in yes) case $ac_sys_system in @@ -515,7 +671,7 @@ index d0ae103014a..bafb0977d1a 100755 *) as_fn_error $? "Unknown platform for framework build" "$LINENO" 5 esac esac -@@ -4352,6 +4412,9 @@ then : +@@ -4358,6 +4418,9 @@ no) case $ac_sys_system in iOS) as_fn_error $? "iOS builds must use --enable-framework" "$LINENO" 5 ;; @@ -525,7 +681,7 @@ index d0ae103014a..bafb0977d1a 100755 *) PYTHONFRAMEWORK= PYTHONFRAMEWORKDIR=no-framework -@@ -4458,6 +4521,51 @@ then : +@@ -4464,6 +4527,51 @@ ac_config_files="$ac_config_files iOS/Resources/Info.plist" @@ -577,7 +733,7 @@ index d0ae103014a..bafb0977d1a 100755 ;; *) as_fn_error $? "Unknown platform for framework build" "$LINENO" 5 -@@ -4469,6 +4577,9 @@ else case e in #( +@@ -4475,6 +4583,9 @@ e) case $ac_sys_system in iOS) as_fn_error $? "iOS builds must use --enable-framework" "$LINENO" 5 ;; @@ -587,7 +743,7 @@ index d0ae103014a..bafb0977d1a 100755 *) PYTHONFRAMEWORK= PYTHONFRAMEWORKDIR=no-framework -@@ -4523,8 +4634,8 @@ then : +@@ -4529,8 +4640,8 @@ case "$withval" in yes) case $ac_sys_system in @@ -598,7 +754,7 @@ index d0ae103014a..bafb0977d1a 100755 APP_STORE_COMPLIANCE_PATCH="Mac/Resources/app-store-compliance.patch" ;; *) as_fn_error $? "no default app store compliance patch available for $ac_sys_system" "$LINENO" 5 ;; -@@ -4542,8 +4653,8 @@ printf "%s\n" "applying custom app store compliance patch" >&6; } +@@ -4548,8 +4659,8 @@ else case e in #( e) case $ac_sys_system in @@ -609,7 +765,7 @@ index d0ae103014a..bafb0977d1a 100755 APP_STORE_COMPLIANCE_PATCH="Mac/Resources/app-store-compliance.patch" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: applying default app store compliance patch" >&5 printf "%s\n" "applying default app store compliance patch" >&6; } -@@ -4561,6 +4672,8 @@ fi +@@ -4567,6 +4678,8 @@ @@ -618,7 +774,7 @@ index d0ae103014a..bafb0977d1a 100755 if test "$cross_compiling" = yes; then case "$host" in -@@ -4598,6 +4711,78 @@ printf "%s\n" "$IPHONEOS_DEPLOYMENT_TARGET" >&6; } +@@ -4604,6 +4717,78 @@ ;; esac ;; @@ -687,17 +843,17 @@ index d0ae103014a..bafb0977d1a 100755 + + case "$host_cpu" in + aarch64) -+ _host_ident=${XROS_DEPLOYMENT_TARGET}-arm64-vision${_host_device} ++ _host_ident=${XROS_DEPLOYMENT_TARGET}-arm64-xr${_host_device} + ;; + *) -+ _host_ident=${XROS_DEPLOYMENT_TARGET}-$host_cpu-vision${_host_device} ++ _host_ident=${XROS_DEPLOYMENT_TARGET}-$host_cpu-xr${_host_device} + ;; + esac + ;; *-*-darwin*) case "$host_cpu" in arm*) -@@ -4688,9 +4873,15 @@ printf "%s\n" "#define _BSD_SOURCE 1" >>confdefs.h +@@ -4694,9 +4879,15 @@ define_xopen_source=no;; Darwin/[12][0-9].*) define_xopen_source=no;; @@ -714,7 +870,7 @@ index d0ae103014a..bafb0977d1a 100755 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from # defining NI_NUMERICHOST. QNX/6.3.2) -@@ -4753,7 +4944,13 @@ fi +@@ -4759,7 +4950,13 @@ CONFIGURE_MACOSX_DEPLOYMENT_TARGET= EXPORT_MACOSX_DEPLOYMENT_TARGET='#' @@ -729,7 +885,7 @@ index d0ae103014a..bafb0977d1a 100755 # checks for alternative programs -@@ -4794,6 +4991,16 @@ case $ac_sys_system in #( +@@ -4800,6 +4997,16 @@ as_fn_append CFLAGS " -mios-version-min=${IPHONEOS_DEPLOYMENT_TARGET}" as_fn_append LDFLAGS " -mios-version-min=${IPHONEOS_DEPLOYMENT_TARGET}" ;; #( @@ -746,7 +902,7 @@ index d0ae103014a..bafb0977d1a 100755 *) : ;; esac -@@ -7163,6 +7370,12 @@ case $ac_sys_system in #( +@@ -7169,6 +7376,12 @@ MULTIARCH="" ;; #( iOS) : MULTIARCH="" ;; #( @@ -759,7 +915,7 @@ index d0ae103014a..bafb0977d1a 100755 FreeBSD*) : MULTIARCH="" ;; #( *) : -@@ -7183,7 +7396,7 @@ fi +@@ -7189,7 +7402,7 @@ printf "%s\n" "$MULTIARCH" >&6; } case $ac_sys_system in #( @@ -768,7 +924,7 @@ index d0ae103014a..bafb0977d1a 100755 SOABI_PLATFORM=`echo "$PLATFORM_TRIPLET" | cut -d '-' -f2` ;; #( *) : SOABI_PLATFORM=$PLATFORM_TRIPLET -@@ -7234,6 +7447,18 @@ case $host/$ac_cv_cc_name in #( +@@ -7240,6 +7453,18 @@ PY_SUPPORT_TIER=3 ;; #( aarch64-apple-ios*/clang) : PY_SUPPORT_TIER=3 ;; #( @@ -787,7 +943,7 @@ index d0ae103014a..bafb0977d1a 100755 aarch64-*-linux-android/clang) : PY_SUPPORT_TIER=3 ;; #( x86_64-*-linux-android/clang) : -@@ -7670,7 +7895,7 @@ then +@@ -7676,7 +7901,7 @@ case $ac_sys_system in Darwin) LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)';; @@ -796,7 +952,7 @@ index d0ae103014a..bafb0977d1a 100755 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK)';; *) as_fn_error $? "Unknown platform for framework build" "$LINENO" 5;; -@@ -7736,7 +7961,7 @@ printf "%s\n" "#define Py_ENABLE_SHARED 1" >>confdefs.h +@@ -7742,7 +7967,7 @@ BLDLIBRARY='-L. -lpython$(LDVERSION)' RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}} ;; @@ -805,7 +961,7 @@ index d0ae103014a..bafb0977d1a 100755 LDLIBRARY='libpython$(LDVERSION).dylib' ;; AIX*) -@@ -13544,7 +13769,7 @@ then +@@ -13550,7 +13775,7 @@ BLDSHARED="$LDSHARED" fi ;; @@ -814,7 +970,7 @@ index d0ae103014a..bafb0977d1a 100755 LDSHARED='$(CC) -dynamiclib -F . -framework $(PYTHONFRAMEWORK)' LDCXXSHARED='$(CXX) -dynamiclib -F . -framework $(PYTHONFRAMEWORK)' BLDSHARED="$LDSHARED" -@@ -13677,7 +13902,7 @@ then +@@ -13683,7 +13908,7 @@ Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";; Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";; # -u libsys_s pulls in all symbols in libsys @@ -823,7 +979,7 @@ index d0ae103014a..bafb0977d1a 100755 LINKFORSHARED="$extra_undefs -framework CoreFoundation" # Issue #18075: the default maximum stack size (8MBytes) is too -@@ -13701,7 +13926,7 @@ printf "%s\n" "#define THREAD_STACK_SIZE 0x$stack_size" >>confdefs.h +@@ -13707,7 +13932,7 @@ LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' fi LINKFORSHARED="$LINKFORSHARED" @@ -832,7 +988,7 @@ index d0ae103014a..bafb0977d1a 100755 LINKFORSHARED="-Wl,-stack_size,$stack_size $LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK)' fi ;; -@@ -15286,7 +15511,7 @@ then : +@@ -15292,7 +15517,7 @@ ctypes_malloc_closure=yes ;; #( @@ -841,7 +997,7 @@ index d0ae103014a..bafb0977d1a 100755 ctypes_malloc_closure=yes ;; #( -@@ -19038,12 +19263,6 @@ if test "x$ac_cv_func_dup3" = xyes +@@ -19044,12 +19269,6 @@ then : printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h @@ -854,7 +1010,7 @@ index d0ae103014a..bafb0977d1a 100755 fi ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero" if test "x$ac_cv_func_explicit_bzero" = xyes -@@ -19104,18 +19323,6 @@ if test "x$ac_cv_func_fexecve" = xyes +@@ -19110,18 +19329,6 @@ then : printf "%s\n" "#define HAVE_FEXECVE 1" >>confdefs.h @@ -873,7 +1029,7 @@ index d0ae103014a..bafb0977d1a 100755 fi ac_fn_c_check_func "$LINENO" "fpathconf" "ac_cv_func_fpathconf" if test "x$ac_cv_func_fpathconf" = xyes -@@ -19542,24 +19749,6 @@ if test "x$ac_cv_func_posix_openpt" = xyes +@@ -19548,24 +19755,6 @@ then : printf "%s\n" "#define HAVE_POSIX_OPENPT 1" >>confdefs.h @@ -898,7 +1054,7 @@ index d0ae103014a..bafb0977d1a 100755 fi ac_fn_c_check_func "$LINENO" "pread" "ac_cv_func_pread" if test "x$ac_cv_func_pread" = xyes -@@ -19866,12 +20055,6 @@ if test "x$ac_cv_func_sigaction" = xyes +@@ -19884,12 +20073,6 @@ then : printf "%s\n" "#define HAVE_SIGACTION 1" >>confdefs.h @@ -911,7 +1067,7 @@ index d0ae103014a..bafb0977d1a 100755 fi ac_fn_c_check_func "$LINENO" "sigfillset" "ac_cv_func_sigfillset" if test "x$ac_cv_func_sigfillset" = xyes -@@ -20140,11 +20323,11 @@ fi +@@ -20158,11 +20341,11 @@ fi @@ -925,12 +1081,12 @@ index d0ae103014a..bafb0977d1a 100755 ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy" if test "x$ac_cv_func_getentropy" = xyes then : -@@ -20166,6 +20349,53 @@ fi +@@ -20184,6 +20367,53 @@ fi +# tvOS/watchOS have some additional methods that can be found, but not used. -+if test "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "watchOS"; then ++if test "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "watchOS" ; then + ac_fn_c_check_func "$LINENO" "execv" "ac_cv_func_execv" +if test "x$ac_cv_func_execv" = xyes +then : @@ -979,17 +1135,17 @@ index d0ae103014a..bafb0977d1a 100755 { 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} -@@ -23248,7 +23478,8 @@ fi +@@ -23266,7 +23496,8 @@ # check for openpty, login_tty, and forkpty - +# tvOS/watchOS have functions for tty, but can't use them -+if test "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "watchOS"; then ++if test "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "watchOS" ; then for ac_func in openpty do : -@@ -23362,7 +23593,7 @@ esac +@@ -23380,7 +23611,7 @@ fi done @@ -998,7 +1154,7 @@ index d0ae103014a..bafb0977d1a 100755 printf %s "checking for library containing login_tty... " >&6; } if test ${ac_cv_search_login_tty+y} then : -@@ -23545,6 +23776,7 @@ esac +@@ -23563,6 +23794,7 @@ fi done @@ -1006,7 +1162,7 @@ index d0ae103014a..bafb0977d1a 100755 # check for long file support functions ac_fn_c_check_func "$LINENO" "fseek64" "ac_cv_func_fseek64" -@@ -23810,10 +24042,10 @@ fi +@@ -23828,10 +24060,10 @@ done @@ -1019,7 +1175,7 @@ index d0ae103014a..bafb0977d1a 100755 then for ac_func in clock_settime -@@ -24130,7 +24362,7 @@ else case e in #( +@@ -24148,7 +24380,7 @@ e) if test "$cross_compiling" = yes then : @@ -1028,7 +1184,7 @@ index d0ae103014a..bafb0977d1a 100755 ac_cv_buggy_getaddrinfo="no" elif test "${enable_ipv6+set}" = set; then ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6" -@@ -26152,8 +26384,8 @@ if test "$PY_ENABLE_SHARED" = "1" && ( test -n "$ANDROID_API_LEVEL" || test "$MA +@@ -26170,8 +26402,8 @@ LIBPYTHON="\$(BLDLIBRARY)" fi @@ -1039,16 +1195,16 @@ index d0ae103014a..bafb0977d1a 100755 MODULE_DEPS_SHARED="$MODULE_DEPS_SHARED \$(PYTHONFRAMEWORKDIR)/\$(PYTHONFRAMEWORK)" fi -@@ -29023,7 +29255,7 @@ LIBS=$save_LIBS +@@ -29041,7 +29273,7 @@ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for device files" >&5 printf "%s\n" "$as_me: checking for device files" >&6;} -if test "$ac_sys_system" = "Linux-android" || test "$ac_sys_system" = "iOS"; then -+if test "$ac_sys_system" = "Linux-android" -o "$ac_sys_system" = "iOS" -o "$ac_sys_system" = "tvOS" -o "$ac_sys_system" = "watchOS" -o "$ac_sys_system" = "visionOS"; then ++if test "$ac_sys_system" = "Linux-android" -o "$ac_sys_system" = "iOS" -o "$ac_sys_system" = "tvOS" -o "$ac_sys_system" = "watchOS" -o "$ac_sys_system" = "visionOS" ; then ac_cv_file__dev_ptmx=no ac_cv_file__dev_ptc=no else -@@ -29504,7 +29736,7 @@ else case e in #( +@@ -29550,7 +29782,7 @@ with_ensurepip=no ;; #( WASI) : with_ensurepip=no ;; #( @@ -1057,7 +1213,16 @@ index d0ae103014a..bafb0977d1a 100755 with_ensurepip=no ;; #( *) : with_ensurepip=upgrade -@@ -30484,7 +30716,7 @@ case $ac_sys_system in #( +@@ -30499,7 +30731,7 @@ + SunOS*) _PYTHREAD_NAME_MAXLEN=31;; + NetBSD*) _PYTHREAD_NAME_MAXLEN=15;; # gh-131268 + Darwin) _PYTHREAD_NAME_MAXLEN=63;; +- iOS) _PYTHREAD_NAME_MAXLEN=63;; ++ iOS|tvOS|watchOS|visionOS) _PYTHREAD_NAME_MAXLEN=63;; + FreeBSD*) _PYTHREAD_NAME_MAXLEN=19;; # gh-131268 + OpenBSD*) _PYTHREAD_NAME_MAXLEN=23;; # gh-131268 + *) _PYTHREAD_NAME_MAXLEN=;; +@@ -30531,7 +30763,7 @@ ;; #( Darwin) : ;; #( @@ -1066,7 +1231,7 @@ index d0ae103014a..bafb0977d1a 100755 -@@ -34487,6 +34719,9 @@ do +@@ -34605,6 +34837,9 @@ "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;; "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;; "iOS/Resources/Info.plist") CONFIG_FILES="$CONFIG_FILES iOS/Resources/Info.plist" ;; @@ -1077,10 +1242,10 @@ index d0ae103014a..bafb0977d1a 100755 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;; "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;; diff --git a/configure.ac b/configure.ac -index 8bb0f1c6ef4..d548f148c31 100644 +index c449bb5ebb3..29b9a82374b 100644 --- a/configure.ac +++ b/configure.ac -@@ -330,6 +330,15 @@ then +@@ -330,6 +330,15 @@ *-apple-ios*) ac_sys_system=iOS ;; @@ -1096,7 +1261,7 @@ index 8bb0f1c6ef4..d548f148c31 100644 *-*-darwin*) ac_sys_system=Darwin ;; -@@ -405,7 +414,7 @@ AC_SUBST([host_exec_prefix]) +@@ -405,7 +414,7 @@ # On cross-compile builds, configure will look for a host-specific compiler by # prepending the user-provided host triple to the required binary name. # @@ -1105,7 +1270,7 @@ index 8bb0f1c6ef4..d548f148c31 100644 # which isn't a binary that exists, and isn't very convenient, as it contains the # iOS version. As the default cross-compiler name won't exist, configure falls # back to gcc, which *definitely* won't work. We're providing wrapper scripts for -@@ -420,6 +429,17 @@ if test -z "$AR"; then +@@ -420,6 +429,17 @@ aarch64-apple-ios*-simulator) AR=arm64-apple-ios-simulator-ar ;; aarch64-apple-ios*) AR=arm64-apple-ios-ar ;; x86_64-apple-ios*-simulator) AR=x86_64-apple-ios-simulator-ar ;; @@ -1123,7 +1288,7 @@ index 8bb0f1c6ef4..d548f148c31 100644 *) esac fi -@@ -428,6 +448,17 @@ if test -z "$CC"; then +@@ -428,6 +448,17 @@ aarch64-apple-ios*-simulator) CC=arm64-apple-ios-simulator-clang ;; aarch64-apple-ios*) CC=arm64-apple-ios-clang ;; x86_64-apple-ios*-simulator) CC=x86_64-apple-ios-simulator-clang ;; @@ -1141,7 +1306,7 @@ index 8bb0f1c6ef4..d548f148c31 100644 *) esac fi -@@ -436,6 +467,17 @@ if test -z "$CPP"; then +@@ -436,6 +467,17 @@ aarch64-apple-ios*-simulator) CPP=arm64-apple-ios-simulator-cpp ;; aarch64-apple-ios*) CPP=arm64-apple-ios-cpp ;; x86_64-apple-ios*-simulator) CPP=x86_64-apple-ios-simulator-cpp ;; @@ -1159,7 +1324,7 @@ index 8bb0f1c6ef4..d548f148c31 100644 *) esac fi -@@ -444,6 +486,17 @@ if test -z "$CXX"; then +@@ -444,6 +486,17 @@ aarch64-apple-ios*-simulator) CXX=arm64-apple-ios-simulator-clang++ ;; aarch64-apple-ios*) CXX=arm64-apple-ios-clang++ ;; x86_64-apple-ios*-simulator) CXX=x86_64-apple-ios-simulator-clang++ ;; @@ -1177,7 +1342,7 @@ index 8bb0f1c6ef4..d548f148c31 100644 *) esac fi -@@ -558,8 +611,11 @@ AC_ARG_ENABLE([framework], +@@ -558,8 +611,11 @@ case $enableval in yes) case $ac_sys_system in @@ -1191,7 +1356,7 @@ index 8bb0f1c6ef4..d548f148c31 100644 *) AC_MSG_ERROR([Unknown platform for framework build]) esac esac -@@ -568,6 +624,9 @@ AC_ARG_ENABLE([framework], +@@ -568,6 +624,9 @@ no) case $ac_sys_system in iOS) AC_MSG_ERROR([iOS builds must use --enable-framework]) ;; @@ -1201,7 +1366,7 @@ index 8bb0f1c6ef4..d548f148c31 100644 *) PYTHONFRAMEWORK= PYTHONFRAMEWORKDIR=no-framework -@@ -670,6 +729,48 @@ AC_ARG_ENABLE([framework], +@@ -670,6 +729,48 @@ AC_CONFIG_FILES([iOS/Resources/Info.plist]) ;; @@ -1250,7 +1415,7 @@ index 8bb0f1c6ef4..d548f148c31 100644 *) AC_MSG_ERROR([Unknown platform for framework build]) ;; -@@ -678,6 +779,9 @@ AC_ARG_ENABLE([framework], +@@ -678,6 +779,9 @@ ],[ case $ac_sys_system in iOS) AC_MSG_ERROR([iOS builds must use --enable-framework]) ;; @@ -1260,7 +1425,7 @@ index 8bb0f1c6ef4..d548f148c31 100644 *) PYTHONFRAMEWORK= PYTHONFRAMEWORKDIR=no-framework -@@ -730,8 +834,8 @@ AC_ARG_WITH( +@@ -730,8 +834,8 @@ case "$withval" in yes) case $ac_sys_system in @@ -1271,7 +1436,7 @@ index 8bb0f1c6ef4..d548f148c31 100644 APP_STORE_COMPLIANCE_PATCH="Mac/Resources/app-store-compliance.patch" ;; *) AC_MSG_ERROR([no default app store compliance patch available for $ac_sys_system]) ;; -@@ -745,8 +849,8 @@ AC_ARG_WITH( +@@ -745,8 +849,8 @@ esac ],[ case $ac_sys_system in @@ -1282,7 +1447,7 @@ index 8bb0f1c6ef4..d548f148c31 100644 APP_STORE_COMPLIANCE_PATCH="Mac/Resources/app-store-compliance.patch" AC_MSG_RESULT([applying default app store compliance patch]) ;; -@@ -759,6 +863,8 @@ AC_ARG_WITH( +@@ -759,6 +863,8 @@ ]) AC_SUBST([APP_STORE_COMPLIANCE_PATCH]) @@ -1291,7 +1456,7 @@ index 8bb0f1c6ef4..d548f148c31 100644 AC_SUBST([_PYTHON_HOST_PLATFORM]) if test "$cross_compiling" = yes; then case "$host" in -@@ -794,6 +900,70 @@ if test "$cross_compiling" = yes; then +@@ -794,6 +900,70 @@ ;; esac ;; @@ -1352,17 +1517,17 @@ index 8bb0f1c6ef4..d548f148c31 100644 + + case "$host_cpu" in + aarch64) -+ _host_ident=${XROS_DEPLOYMENT_TARGET}-arm64-vision${_host_device} ++ _host_ident=${XROS_DEPLOYMENT_TARGET}-arm64-xr${_host_device} + ;; + *) -+ _host_ident=${XROS_DEPLOYMENT_TARGET}-$host_cpu-vision${_host_device} ++ _host_ident=${XROS_DEPLOYMENT_TARGET}-$host_cpu-xr${_host_device} + ;; + esac + ;; *-*-darwin*) case "$host_cpu" in arm*) -@@ -883,9 +1053,15 @@ case $ac_sys_system/$ac_sys_release in +@@ -883,9 +1053,15 @@ define_xopen_source=no;; Darwin/@<:@[12]@:>@@<:@0-9@:>@.*) define_xopen_source=no;; @@ -1379,7 +1544,7 @@ index 8bb0f1c6ef4..d548f148c31 100644 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from # defining NI_NUMERICHOST. QNX/6.3.2) -@@ -944,8 +1120,14 @@ AC_SUBST([EXPORT_MACOSX_DEPLOYMENT_TARGET]) +@@ -944,8 +1120,14 @@ CONFIGURE_MACOSX_DEPLOYMENT_TARGET= EXPORT_MACOSX_DEPLOYMENT_TARGET='#' @@ -1395,7 +1560,7 @@ index 8bb0f1c6ef4..d548f148c31 100644 # checks for alternative programs -@@ -979,11 +1161,19 @@ AS_CASE([$host], +@@ -979,11 +1161,19 @@ ], ) @@ -1416,7 +1581,7 @@ index 8bb0f1c6ef4..d548f148c31 100644 ], ) -@@ -1172,6 +1362,9 @@ AC_MSG_CHECKING([for multiarch]) +@@ -1172,6 +1362,9 @@ AS_CASE([$ac_sys_system], [Darwin*], [MULTIARCH=""], [iOS], [MULTIARCH=""], @@ -1426,7 +1591,7 @@ index 8bb0f1c6ef4..d548f148c31 100644 [FreeBSD*], [MULTIARCH=""], [MULTIARCH=$($CC --print-multiarch 2>/dev/null)] ) -@@ -1193,7 +1386,7 @@ dnl will have multiple sysconfig modules (one for each CPU architecture), but +@@ -1193,7 +1386,7 @@ dnl use a single "fat" binary at runtime. SOABI_PLATFORM is the component of dnl the PLATFORM_TRIPLET that will be used in binary module extensions. AS_CASE([$ac_sys_system], @@ -1435,7 +1600,7 @@ index 8bb0f1c6ef4..d548f148c31 100644 [SOABI_PLATFORM=$PLATFORM_TRIPLET] ) -@@ -1227,6 +1420,12 @@ AS_CASE([$host/$ac_cv_cc_name], +@@ -1227,6 +1420,12 @@ [x86_64-*-freebsd*/clang], [PY_SUPPORT_TIER=3], dnl FreeBSD on AMD64 [aarch64-apple-ios*-simulator/clang], [PY_SUPPORT_TIER=3], dnl iOS Simulator on arm64 [aarch64-apple-ios*/clang], [PY_SUPPORT_TIER=3], dnl iOS on ARM64 @@ -1448,7 +1613,7 @@ index 8bb0f1c6ef4..d548f148c31 100644 [aarch64-*-linux-android/clang], [PY_SUPPORT_TIER=3], dnl Android on ARM64 [x86_64-*-linux-android/clang], [PY_SUPPORT_TIER=3], dnl Android on AMD64 -@@ -1536,7 +1735,7 @@ then +@@ -1536,7 +1735,7 @@ case $ac_sys_system in Darwin) LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)';; @@ -1457,7 +1622,7 @@ index 8bb0f1c6ef4..d548f148c31 100644 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK)';; *) AC_MSG_ERROR([Unknown platform for framework build]);; -@@ -1601,7 +1800,7 @@ if test $enable_shared = "yes"; then +@@ -1601,7 +1800,7 @@ BLDLIBRARY='-L. -lpython$(LDVERSION)' RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}} ;; @@ -1466,7 +1631,7 @@ index 8bb0f1c6ef4..d548f148c31 100644 LDLIBRARY='libpython$(LDVERSION).dylib' ;; AIX*) -@@ -3456,7 +3655,7 @@ then +@@ -3456,7 +3655,7 @@ BLDSHARED="$LDSHARED" fi ;; @@ -1475,7 +1640,7 @@ index 8bb0f1c6ef4..d548f148c31 100644 LDSHARED='$(CC) -dynamiclib -F . -framework $(PYTHONFRAMEWORK)' LDCXXSHARED='$(CXX) -dynamiclib -F . -framework $(PYTHONFRAMEWORK)' BLDSHARED="$LDSHARED" -@@ -3580,7 +3779,7 @@ then +@@ -3580,7 +3779,7 @@ Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";; Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";; # -u libsys_s pulls in all symbols in libsys @@ -1484,7 +1649,7 @@ index 8bb0f1c6ef4..d548f148c31 100644 LINKFORSHARED="$extra_undefs -framework CoreFoundation" # Issue #18075: the default maximum stack size (8MBytes) is too -@@ -3604,7 +3803,7 @@ then +@@ -3604,7 +3803,7 @@ LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' fi LINKFORSHARED="$LINKFORSHARED" @@ -1493,7 +1658,7 @@ index 8bb0f1c6ef4..d548f148c31 100644 LINKFORSHARED="-Wl,-stack_size,$stack_size $LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK)' fi ;; -@@ -4024,7 +4223,7 @@ AS_VAR_IF([have_libffi], [yes], [ +@@ -4024,7 +4223,7 @@ dnl when do we need USING_APPLE_OS_LIBFFI? ctypes_malloc_closure=yes ], @@ -1502,7 +1667,7 @@ index 8bb0f1c6ef4..d548f148c31 100644 ctypes_malloc_closure=yes ], [sunos5], [AS_VAR_APPEND([LIBFFI_LIBS], [" -mimpure-text"])] -@@ -5133,9 +5332,9 @@ fi +@@ -5133,9 +5332,9 @@ # checks for library functions AC_CHECK_FUNCS([ \ accept4 alarm bind_textdomain_codeset chmod chown clock closefrom close_range confstr \ @@ -1514,7 +1679,7 @@ index 8bb0f1c6ef4..d548f148c31 100644 gai_strerror getegid geteuid getgid getgrent getgrgid getgrgid_r \ getgrnam_r getgrouplist gethostname getitimer getloadavg getlogin \ getpeername getpgid getpid getppid getpriority _getpty \ -@@ -5143,8 +5342,7 @@ AC_CHECK_FUNCS([ \ +@@ -5143,8 +5342,7 @@ getspnam getuid getwd grantpt 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 \ @@ -1523,8 +1688,8 @@ index 8bb0f1c6ef4..d548f148c31 100644 + pipe2 plock poll posix_fadvise posix_fallocate posix_openpt \ pread preadv preadv2 process_vm_readv \ pthread_cond_timedwait_relative_np pthread_condattr_setclock pthread_init \ - pthread_kill pthread_getname_np pthread_setname_np pthread_getattr_np \ -@@ -5153,7 +5351,7 @@ AC_CHECK_FUNCS([ \ + pthread_kill pthread_get_name_np pthread_getname_np pthread_set_name_np +@@ -5154,7 +5352,7 @@ sched_setparam sched_setscheduler sem_clockwait sem_getvalue sem_open \ sem_timedwait sem_unlink sendfile setegid seteuid setgid sethostname \ setitimer setlocale setpgid setpgrp setpriority setregid setresgid \ @@ -1533,7 +1698,7 @@ index 8bb0f1c6ef4..d548f148c31 100644 sigfillset siginterrupt sigpending sigrelse sigtimedwait sigwait \ sigwaitinfo snprintf splice strftime strlcpy strsignal symlinkat sync \ sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile \ -@@ -5168,12 +5366,20 @@ if test "$MACHDEP" != linux; then +@@ -5169,12 +5367,20 @@ AC_CHECK_FUNCS([lchmod]) fi @@ -1549,7 +1714,7 @@ index 8bb0f1c6ef4..d548f148c31 100644 +fi + +# tvOS/watchOS have some additional methods that can be found, but not used. -+if test "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "watchOS"; then ++if test "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "watchOS" ; then + AC_CHECK_FUNCS([ \ + execv fork fork1 posix_spawn posix_spawnp posix_spawn_file_actions_addclosefrom_np \ + sigaltstack \ @@ -1557,7 +1722,7 @@ index 8bb0f1c6ef4..d548f148c31 100644 fi AC_CHECK_DECL([dirfd], -@@ -5427,20 +5633,23 @@ PY_CHECK_FUNC([setgroups], [ +@@ -5428,20 +5634,22 @@ ]) # check for openpty, login_tty, and forkpty @@ -1576,8 +1741,7 @@ index 8bb0f1c6ef4..d548f148c31 100644 - [AC_CHECK_LIB([bsd], [forkpty], - [AC_DEFINE([HAVE_FORKPTY]) LIBS="$LIBS -lbsd"])])]) +# tvOS/watchOS have functions for tty, but can't use them -+dnl is the same applies for visionOS -+if test "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "watchOS"; then ++if test "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "watchOS" ; then + AC_CHECK_FUNCS([openpty], [], + [AC_CHECK_LIB([util], [openpty], + [AC_DEFINE([HAVE_OPENPTY]) LIBS="$LIBS -lutil"], @@ -1595,7 +1759,7 @@ index 8bb0f1c6ef4..d548f148c31 100644 # check for long file support functions AC_CHECK_FUNCS([fseek64 fseeko fstatvfs ftell64 ftello statvfs]) -@@ -5479,10 +5688,10 @@ AC_CHECK_FUNCS([clock_getres], [], [ +@@ -5480,10 +5688,10 @@ ]) ]) @@ -1608,7 +1772,7 @@ index 8bb0f1c6ef4..d548f148c31 100644 then AC_CHECK_FUNCS([clock_settime], [], [ AC_CHECK_LIB([rt], [clock_settime], [ -@@ -5640,7 +5849,7 @@ int main(void) +@@ -5641,7 +5849,7 @@ [ac_cv_buggy_getaddrinfo=no], [ac_cv_buggy_getaddrinfo=yes], [ @@ -1617,7 +1781,7 @@ index 8bb0f1c6ef4..d548f148c31 100644 ac_cv_buggy_getaddrinfo="no" elif test "${enable_ipv6+set}" = set; then ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6" -@@ -6233,8 +6442,8 @@ if test "$PY_ENABLE_SHARED" = "1" && ( test -n "$ANDROID_API_LEVEL" || test "$MA +@@ -6234,8 +6442,8 @@ LIBPYTHON="\$(BLDLIBRARY)" fi @@ -1628,16 +1792,16 @@ index 8bb0f1c6ef4..d548f148c31 100644 MODULE_DEPS_SHARED="$MODULE_DEPS_SHARED \$(PYTHONFRAMEWORKDIR)/\$(PYTHONFRAMEWORK)" fi -@@ -6893,7 +7102,7 @@ AC_MSG_NOTICE([checking for device files]) +@@ -6894,7 +7102,7 @@ dnl NOTE: Inform user how to proceed with files when cross compiling. dnl Some cross-compile builds are predictable; they won't ever dnl have /dev/ptmx or /dev/ptc, so we can set them explicitly. -if test "$ac_sys_system" = "Linux-android" || test "$ac_sys_system" = "iOS"; then -+if test "$ac_sys_system" = "Linux-android" -o "$ac_sys_system" = "iOS" -o "$ac_sys_system" = "tvOS" -o "$ac_sys_system" = "watchOS" -o "$ac_sys_system" = "visionOS"; then ++if test "$ac_sys_system" = "Linux-android" -o "$ac_sys_system" = "iOS" -o "$ac_sys_system" = "tvOS" -o "$ac_sys_system" = "watchOS" -o "$ac_sys_system" = "visionOS" ; then ac_cv_file__dev_ptmx=no ac_cv_file__dev_ptc=no else -@@ -7174,7 +7383,7 @@ AC_ARG_WITH([ensurepip], +@@ -7195,7 +7403,7 @@ AS_CASE([$ac_sys_system], [Emscripten], [with_ensurepip=no], [WASI], [with_ensurepip=no], @@ -1646,7 +1810,16 @@ index 8bb0f1c6ef4..d548f148c31 100644 [with_ensurepip=upgrade] ) ]) -@@ -7585,7 +7794,7 @@ AS_CASE([$ac_sys_system], +@@ -7582,7 +7790,7 @@ + SunOS*) _PYTHREAD_NAME_MAXLEN=31;; + NetBSD*) _PYTHREAD_NAME_MAXLEN=15;; # gh-131268 + Darwin) _PYTHREAD_NAME_MAXLEN=63;; +- iOS) _PYTHREAD_NAME_MAXLEN=63;; ++ iOS|tvOS|watchOS|visionOS) _PYTHREAD_NAME_MAXLEN=63;; + FreeBSD*) _PYTHREAD_NAME_MAXLEN=19;; # gh-131268 + OpenBSD*) _PYTHREAD_NAME_MAXLEN=23;; # gh-131268 + *) _PYTHREAD_NAME_MAXLEN=;; +@@ -7607,7 +7815,7 @@ [VxWorks*], [PY_STDLIB_MOD_SET_NA([_scproxy], [termios], [grp])], dnl The _scproxy module is available on macOS [Darwin], [], @@ -1675,9 +1848,6 @@ index c3e261ecd9e..26ef7a95de4 100644 CFBundleSupportedPlatforms iPhoneOS -diff --git a/tvOS/README.rst b/tvOS/README.rst -new file mode 100644 -index 00000000000..1f793252caf --- /dev/null +++ b/tvOS/README.rst @@ -0,0 +1,108 @@ @@ -1789,9 +1959,6 @@ index 00000000000..1f793252caf + +Using a framework-based Python on tvOS +====================================== -diff --git a/tvOS/Resources/Info.plist.in b/tvOS/Resources/Info.plist.in -new file mode 100644 -index 00000000000..ab3050804b8 --- /dev/null +++ b/tvOS/Resources/Info.plist.in @@ -0,0 +1,34 @@ @@ -1829,105 +1996,66 @@ index 00000000000..ab3050804b8 + @TVOS_DEPLOYMENT_TARGET@ + + -diff --git a/tvOS/Resources/bin/arm64-apple-tvos-ar b/tvOS/Resources/bin/arm64-apple-tvos-ar -new file mode 100755 -index 00000000000..e302748a13c --- /dev/null +++ b/tvOS/Resources/bin/arm64-apple-tvos-ar @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk appletvos${TVOS_SDK_VERSION} ar "$@" -diff --git a/tvOS/Resources/bin/arm64-apple-tvos-clang b/tvOS/Resources/bin/arm64-apple-tvos-clang -new file mode 100755 -index 00000000000..bef66ed852e --- /dev/null +++ b/tvOS/Resources/bin/arm64-apple-tvos-clang @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk appletvos${TVOS_SDK_VERSION} clang -target arm64-apple-tvos "$@" -diff --git a/tvOS/Resources/bin/arm64-apple-tvos-clang++ b/tvOS/Resources/bin/arm64-apple-tvos-clang++ -new file mode 100755 -index 00000000000..04ca4df9ff0 --- /dev/null +++ b/tvOS/Resources/bin/arm64-apple-tvos-clang++ @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk appletvos${TVOS_SDK_VERSION} clang++ -target arm64-apple-tvos "$@" -diff --git a/tvOS/Resources/bin/arm64-apple-tvos-cpp b/tvOS/Resources/bin/arm64-apple-tvos-cpp -new file mode 100755 -index 00000000000..cb797b5a530 --- /dev/null +++ b/tvOS/Resources/bin/arm64-apple-tvos-cpp @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk appletvos${TVOS_SDK_VERSION} clang -target arm64-apple-tvos -E "$@" -diff --git a/tvOS/Resources/bin/arm64-apple-tvos-simulator-ar b/tvOS/Resources/bin/arm64-apple-tvos-simulator-ar -new file mode 100755 -index 00000000000..87ef5015aae --- /dev/null +++ b/tvOS/Resources/bin/arm64-apple-tvos-simulator-ar @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk appletvsimulator${TVOS_SDK_VERSION} ar "$@" -diff --git a/tvOS/Resources/bin/arm64-apple-tvos-simulator-clang b/tvOS/Resources/bin/arm64-apple-tvos-simulator-clang -new file mode 100755 -index 00000000000..729f3756fbc --- /dev/null +++ b/tvOS/Resources/bin/arm64-apple-tvos-simulator-clang @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk appletvsimulator${TVOS_SDK_VERSION} clang -target arm64-apple-tvos-simulator "$@" -diff --git a/tvOS/Resources/bin/arm64-apple-tvos-simulator-clang++ b/tvOS/Resources/bin/arm64-apple-tvos-simulator-clang++ -new file mode 100755 -index 00000000000..f98b36a6c8f --- /dev/null +++ b/tvOS/Resources/bin/arm64-apple-tvos-simulator-clang++ @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk appletvsimulator${TVOS_SDK_VERSION} clang++ -target arm64-apple-tvos-simulator "$@" -diff --git a/tvOS/Resources/bin/arm64-apple-tvos-simulator-cpp b/tvOS/Resources/bin/arm64-apple-tvos-simulator-cpp -new file mode 100755 -index 00000000000..40555262ec2 --- /dev/null +++ b/tvOS/Resources/bin/arm64-apple-tvos-simulator-cpp @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk appletvsimulator${TVOS_SDK_VERSION} clang -target arm64-apple-tvos-simulator -E "$@" -diff --git a/tvOS/Resources/bin/x86_64-apple-tvos-simulator-ar b/tvOS/Resources/bin/x86_64-apple-tvos-simulator-ar -new file mode 100755 -index 00000000000..87ef5015aae --- /dev/null +++ b/tvOS/Resources/bin/x86_64-apple-tvos-simulator-ar @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk appletvsimulator${TVOS_SDK_VERSION} ar "$@" -diff --git a/tvOS/Resources/bin/x86_64-apple-tvos-simulator-clang b/tvOS/Resources/bin/x86_64-apple-tvos-simulator-clang -new file mode 100755 -index 00000000000..27b93b55bd8 --- /dev/null +++ b/tvOS/Resources/bin/x86_64-apple-tvos-simulator-clang @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk appletvsimulator${TVOS_SDK_VERSION} clang -target x86_64-apple-tvos-simulator "$@" -diff --git a/tvOS/Resources/bin/x86_64-apple-tvos-simulator-clang++ b/tvOS/Resources/bin/x86_64-apple-tvos-simulator-clang++ -new file mode 100755 -index 00000000000..df083314351 --- /dev/null +++ b/tvOS/Resources/bin/x86_64-apple-tvos-simulator-clang++ @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk appletvsimulator${TVOS_SDK_VERSION} clang++ -target x86_64-apple-tvos-simulator "$@" -diff --git a/tvOS/Resources/bin/x86_64-apple-tvos-simulator-cpp b/tvOS/Resources/bin/x86_64-apple-tvos-simulator-cpp -new file mode 100755 -index 00000000000..ad0c98ac52c --- /dev/null +++ b/tvOS/Resources/bin/x86_64-apple-tvos-simulator-cpp @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk appletvsimulator${TVOS_SDK_VERSION} clang -target x86_64-apple-tvos-simulator -E "$@" -diff --git a/tvOS/Resources/dylib-Info-template.plist b/tvOS/Resources/dylib-Info-template.plist -new file mode 100644 -index 00000000000..a20d476fa7b --- /dev/null +++ b/tvOS/Resources/dylib-Info-template.plist @@ -0,0 +1,26 @@ @@ -1957,9 +2085,6 @@ index 00000000000..a20d476fa7b + 1 + + -diff --git a/tvOS/Resources/pyconfig.h b/tvOS/Resources/pyconfig.h -new file mode 100644 -index 00000000000..4acff2c6051 --- /dev/null +++ b/tvOS/Resources/pyconfig.h @@ -0,0 +1,7 @@ @@ -1970,9 +2095,6 @@ index 00000000000..4acff2c6051 +#ifdef __x86_64__ +#include "pyconfig-x86_64.h" +#endif -diff --git a/visionOS/Resources/Info.plist.in b/visionOS/Resources/Info.plist.in -new file mode 100644 -index 00000000000..d62cb35b1c4 --- /dev/null +++ b/visionOS/Resources/Info.plist.in @@ -0,0 +1,34 @@ @@ -2010,73 +2132,46 @@ index 00000000000..d62cb35b1c4 + @XROS_DEPLOYMENT_TARGET@ + + -diff --git a/visionOS/Resources/bin/arm64-apple-xros-ar b/visionOS/Resources/bin/arm64-apple-xros-ar -new file mode 100755 -index 00000000000..9fd78a205f3 --- /dev/null +++ b/visionOS/Resources/bin/arm64-apple-xros-ar @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk xros${XROS_SDK_VERSION} ar "$@" -diff --git a/visionOS/Resources/bin/arm64-apple-xros-clang b/visionOS/Resources/bin/arm64-apple-xros-clang -new file mode 100755 -index 00000000000..9a1a757cbd0 --- /dev/null +++ b/visionOS/Resources/bin/arm64-apple-xros-clang @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk xros${XROS_SDK_VERSION} clang -target arm64-apple-xros${XROS_DEPLOYMENT_TARGET} "$@" -diff --git a/visionOS/Resources/bin/arm64-apple-xros-clang++ b/visionOS/Resources/bin/arm64-apple-xros-clang++ -new file mode 100755 -index 00000000000..f64fcfc11cd --- /dev/null +++ b/visionOS/Resources/bin/arm64-apple-xros-clang++ @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk xros${XROS_SDK_VERSION} clang++ -target arm64-apple-xros${XROS_DEPLOYMENT_TARGET} "$@" -diff --git a/visionOS/Resources/bin/arm64-apple-xros-cpp b/visionOS/Resources/bin/arm64-apple-xros-cpp -new file mode 100755 -index 00000000000..d6492eff052 --- /dev/null +++ b/visionOS/Resources/bin/arm64-apple-xros-cpp @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk xros${XROS_SDK_VERSION} clang -target arm64-apple-xros${XROS_DEPLOYMENT_TARGET} -E "$@" -diff --git a/visionOS/Resources/bin/arm64-apple-xros-simulator-ar b/visionOS/Resources/bin/arm64-apple-xros-simulator-ar -new file mode 100755 -index 00000000000..b202330fb5d --- /dev/null +++ b/visionOS/Resources/bin/arm64-apple-xros-simulator-ar @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk xrsimulator${XROS_SDK_VERSION} ar "$@" -diff --git a/visionOS/Resources/bin/arm64-apple-xros-simulator-clang b/visionOS/Resources/bin/arm64-apple-xros-simulator-clang -new file mode 100755 -index 00000000000..87b0aba0751 --- /dev/null +++ b/visionOS/Resources/bin/arm64-apple-xros-simulator-clang @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk xrsimulator${XROS_SDK_VERSION} clang -target arm64-apple-xros${XROS_DEPLOYMENT_TARGET}-simulator "$@" -diff --git a/visionOS/Resources/bin/arm64-apple-xros-simulator-clang++ b/visionOS/Resources/bin/arm64-apple-xros-simulator-clang++ -new file mode 100755 -index 00000000000..c89d48f1cb8 --- /dev/null +++ b/visionOS/Resources/bin/arm64-apple-xros-simulator-clang++ @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk xrsimulator${XROS_SDK_VERSION} clang++ -target arm64-apple-xros${XROS_DEPLOYMENT_TARGET}-simulator "$@" -diff --git a/visionOS/Resources/bin/arm64-apple-xros-simulator-cpp b/visionOS/Resources/bin/arm64-apple-xros-simulator-cpp -new file mode 100755 -index 00000000000..91b2d626432 --- /dev/null +++ b/visionOS/Resources/bin/arm64-apple-xros-simulator-cpp @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk xrsimulator clang -target arm64-apple-xros${XROS_DEPLOYMENT_TARGET}-simulator -E "$@" -diff --git a/visionOS/Resources/dylib-Info-template.plist b/visionOS/Resources/dylib-Info-template.plist -new file mode 100644 -index 00000000000..97431a903c1 --- /dev/null +++ b/visionOS/Resources/dylib-Info-template.plist @@ -0,0 +1,26 @@ @@ -2106,9 +2201,6 @@ index 00000000000..97431a903c1 + 1 + + -diff --git a/visionOS/testbed/Python.xcframework/Info.plist b/visionOS/testbed/Python.xcframework/Info.plist -new file mode 100644 -index 00000000000..e75f76c8d94 --- /dev/null +++ b/visionOS/testbed/Python.xcframework/Info.plist @@ -0,0 +1,43 @@ @@ -2155,9 +2247,6 @@ index 00000000000..e75f76c8d94 + 1.0 + + -diff --git a/visionOS/testbed/__main__.py b/visionOS/testbed/__main__.py -new file mode 100644 -index 00000000000..8a7bebf368d --- /dev/null +++ b/visionOS/testbed/__main__.py @@ -0,0 +1,512 @@ @@ -2300,7 +2389,7 @@ index 00000000000..8a7bebf368d + simulator["udid"] + for runtime, simulators in json_data["devices"].items() + for simulator in simulators -+ if runtime.split(".")[-1].startswith("visionOS") and simulator["state"] == "Booted" ++ if runtime.split(".")[-1].startswith("xrOS") and simulator["state"] == "Booted" + ] + except subprocess.CalledProcessError as e: + # If there's no ~/Library/Developer/XCTestDevices folder (which is the @@ -2448,7 +2537,7 @@ index 00000000000..8a7bebf368d + print(" done") + + xc_framework_path = target / "Python.xcframework" -+ sim_framework_path = xc_framework_path / "xros-arm64_x86_64-simulator" ++ sim_framework_path = xc_framework_path / "xros-arm64-simulator" + if framework is not None: + if framework.suffix == ".xcframework": + print(" Installing XCFramework...", end="", flush=True) @@ -2673,12 +2762,9 @@ index 00000000000..8a7bebf368d + +if __name__ == "__main__": + main() -diff --git a/visionOS/testbed/visionOSTestbed.xcodeproj/project.pbxproj b/visionOS/testbed/visionOSTestbed.xcodeproj/project.pbxproj -new file mode 100644 -index 00000000000..1723a699d49 --- /dev/null +++ b/visionOS/testbed/visionOSTestbed.xcodeproj/project.pbxproj -@@ -0,0 +1,596 @@ +@@ -0,0 +1,581 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; @@ -2690,7 +2776,6 @@ index 00000000000..1723a699d49 +/* Begin PBXBuildFile section */ + 607A66172B0EFA380010BFC8 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 607A66162B0EFA380010BFC8 /* AppDelegate.m */; }; + 607A66222B0EFA390010BFC8 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607A66212B0EFA390010BFC8 /* Assets.xcassets */; }; -+ 607A66252B0EFA390010BFC8 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 607A66232B0EFA390010BFC8 /* LaunchScreen.storyboard */; }; + 607A66282B0EFA390010BFC8 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 607A66272B0EFA390010BFC8 /* main.m */; }; + 607A66322B0EFA3A0010BFC8 /* visionOSTestbedTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 607A66312B0EFA3A0010BFC8 /* visionOSTestbedTests.m */; }; + 607A66582B0F079F0010BFC8 /* dylib-Info-template.plist in Resources */ = {isa = PBXBuildFile; fileRef = 607A66572B0F079F0010BFC8 /* dylib-Info-template.plist */; }; @@ -2742,12 +2827,11 @@ index 00000000000..1723a699d49 + 607A66152B0EFA380010BFC8 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 607A66162B0EFA380010BFC8 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 607A66212B0EFA390010BFC8 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; -+ 607A66242B0EFA390010BFC8 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 607A66272B0EFA390010BFC8 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 607A662D2B0EFA3A0010BFC8 /* visionOSTestbedTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = visionOSTestbedTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 607A66312B0EFA3A0010BFC8 /* visionOSTestbedTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = visionOSTestbedTests.m; sourceTree = ""; }; + 607A66572B0F079F0010BFC8 /* dylib-Info-template.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "dylib-Info-template.plist"; sourceTree = ""; }; -+ 607A66592B0F08600010BFC8 /* visionOStestbed-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "visionOStestbed-Info.plist"; sourceTree = ""; }; ++ 607A66592B0F08600010BFC8 /* visionOSTestbed-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "visionOSTestbed-Info.plist"; sourceTree = ""; }; + 608619532CB77BA900F46182 /* app_packages */ = {isa = PBXFileReference; lastKnownFileType = folder; path = app_packages; sourceTree = ""; }; + 608619552CB7819B00F46182 /* app */ = {isa = PBXFileReference; lastKnownFileType = folder; path = app; sourceTree = ""; }; + EEE9C80C2DAB5ECA0056F8C6 /* Python.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = Python.xcframework; sourceTree = ""; }; @@ -2798,12 +2882,11 @@ index 00000000000..1723a699d49 + children = ( + 608619552CB7819B00F46182 /* app */, + 608619532CB77BA900F46182 /* app_packages */, -+ 607A66592B0F08600010BFC8 /* visionOStestbed-Info.plist */, ++ 607A66592B0F08600010BFC8 /* visionOSTestbed-Info.plist */, + 607A66572B0F079F0010BFC8 /* dylib-Info-template.plist */, + 607A66152B0EFA380010BFC8 /* AppDelegate.h */, + 607A66162B0EFA380010BFC8 /* AppDelegate.m */, + 607A66212B0EFA390010BFC8 /* Assets.xcassets */, -+ 607A66232B0EFA390010BFC8 /* LaunchScreen.storyboard */, + 607A66272B0EFA390010BFC8 /* main.m */, + ); + path = visionOSTestbed; @@ -2908,7 +2991,6 @@ index 00000000000..1723a699d49 + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( -+ 607A66252B0EFA390010BFC8 /* LaunchScreen.storyboard in Resources */, + 607A66582B0F079F0010BFC8 /* dylib-Info-template.plist in Resources */, + 608619562CB7819B00F46182 /* app in Resources */, + 607A66222B0EFA390010BFC8 /* Assets.xcassets in Resources */, @@ -2996,17 +3078,6 @@ index 00000000000..1723a699d49 + }; +/* End PBXTargetDependency section */ + -+/* Begin PBXVariantGroup section */ -+ 607A66232B0EFA390010BFC8 /* LaunchScreen.storyboard */ = { -+ isa = PBXVariantGroup; -+ children = ( -+ 607A66242B0EFA390010BFC8 /* Base */, -+ ); -+ name = LaunchScreen.storyboard; -+ sourceTree = ""; -+ }; -+/* End PBXVariantGroup section */ -+ +/* Begin XCBuildConfiguration section */ + 607A663F2B0EFA3A0010BFC8 /* Debug */ = { + isa = XCBuildConfiguration; @@ -3135,7 +3206,7 @@ index 00000000000..1723a699d49 + DEVELOPMENT_TEAM = ""; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + HEADER_SEARCH_PATHS = "\"$(BUILT_PRODUCTS_DIR)/Python.framework/Headers\""; -+ INFOPLIST_FILE = "visionOSTestbed/visionOStestbed-Info.plist"; ++ INFOPLIST_FILE = "visionOSTestbed/visionOSTestbed-Info.plist"; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UIMainStoryboardFile = Main; @@ -3170,7 +3241,7 @@ index 00000000000..1723a699d49 + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + HEADER_SEARCH_PATHS = "\"$(BUILT_PRODUCTS_DIR)/Python.framework/Headers\""; -+ INFOPLIST_FILE = "visionOSTestbed/visionOStestbed-Info.plist"; ++ INFOPLIST_FILE = "visionOSTestbed/visionOSTestbed-Info.plist"; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UIMainStoryboardFile = Main; @@ -3275,9 +3346,6 @@ index 00000000000..1723a699d49 + }; + rootObject = 607A660A2B0EFA380010BFC8 /* Project object */; +} -diff --git a/visionOS/testbed/visionOSTestbed/AppDelegate.h b/visionOS/testbed/visionOSTestbed/AppDelegate.h -new file mode 100644 -index 00000000000..8fe7ec8e64e --- /dev/null +++ b/visionOS/testbed/visionOSTestbed/AppDelegate.h @@ -0,0 +1,11 @@ @@ -3292,9 +3360,6 @@ index 00000000000..8fe7ec8e64e + + +@end -diff --git a/visionOS/testbed/visionOSTestbed/AppDelegate.m b/visionOS/testbed/visionOSTestbed/AppDelegate.m -new file mode 100644 -index 00000000000..b3ff14f7255 --- /dev/null +++ b/visionOS/testbed/visionOSTestbed/AppDelegate.m @@ -0,0 +1,19 @@ @@ -3317,9 +3382,6 @@ index 00000000000..b3ff14f7255 +} + +@end -diff --git a/visionOS/testbed/visionOSTestbed/Assets.xcassets/AccentColor.colorset/Contents.json b/visionOS/testbed/visionOSTestbed/Assets.xcassets/AccentColor.colorset/Contents.json -new file mode 100644 -index 00000000000..eb878970081 --- /dev/null +++ b/visionOS/testbed/visionOSTestbed/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ @@ -3334,9 +3396,6 @@ index 00000000000..eb878970081 + "version" : 1 + } +} -diff --git a/visionOS/testbed/visionOSTestbed/Assets.xcassets/AppIcon.appiconset/Contents.json b/visionOS/testbed/visionOSTestbed/Assets.xcassets/AppIcon.appiconset/Contents.json -new file mode 100644 -index 00000000000..13613e3ee1a --- /dev/null +++ b/visionOS/testbed/visionOSTestbed/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ @@ -3353,9 +3412,6 @@ index 00000000000..13613e3ee1a + "version" : 1 + } +} -diff --git a/visionOS/testbed/visionOSTestbed/Assets.xcassets/Contents.json b/visionOS/testbed/visionOSTestbed/Assets.xcassets/Contents.json -new file mode 100644 -index 00000000000..73c00596a7f --- /dev/null +++ b/visionOS/testbed/visionOSTestbed/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ @@ -3365,24 +3421,6 @@ index 00000000000..73c00596a7f + "version" : 1 + } +} -diff --git a/visionOS/testbed/visionOSTestbed/Base.lproj/LaunchScreen.storyboard b/visionOS/testbed/visionOSTestbed/Base.lproj/LaunchScreen.storyboard -new file mode 100644 -index 00000000000..5daafe73a86 ---- /dev/null -+++ b/visionOS/testbed/visionOSTestbed/Base.lproj/LaunchScreen.storyboard -@@ -0,0 +1,9 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -diff --git a/visionOS/testbed/visionOSTestbed/app/README b/visionOS/testbed/visionOSTestbed/app/README -new file mode 100644 -index 00000000000..af22c685f87 --- /dev/null +++ b/visionOS/testbed/visionOSTestbed/app/README @@ -0,0 +1,7 @@ @@ -3393,9 +3431,6 @@ index 00000000000..af22c685f87 + +When the test suite runs, this folder will be on the PYTHONPATH, and will be the +working directory for the test suite. -diff --git a/visionOS/testbed/visionOSTestbed/app_packages/README b/visionOS/testbed/visionOSTestbed/app_packages/README -new file mode 100644 -index 00000000000..42d7fdeb813 --- /dev/null +++ b/visionOS/testbed/visionOSTestbed/app_packages/README @@ -0,0 +1,7 @@ @@ -3406,9 +3441,6 @@ index 00000000000..42d7fdeb813 +iOS Framework form. + +When the test suite runs, this folder will be on the PYTHONPATH. -diff --git a/visionOS/testbed/visionOSTestbed/dylib-Info-template.plist b/visionOS/testbed/visionOSTestbed/dylib-Info-template.plist -new file mode 100644 -index 00000000000..f652e272f71 --- /dev/null +++ b/visionOS/testbed/visionOSTestbed/dylib-Info-template.plist @@ -0,0 +1,26 @@ @@ -3430,7 +3462,7 @@ index 00000000000..f652e272f71 + 1.0 + CFBundleSupportedPlatforms + -+ iPhoneOS ++ VisionOS + + MinimumOSVersion + 12.0 @@ -3438,9 +3470,6 @@ index 00000000000..f652e272f71 + 1 + + -diff --git a/visionOS/testbed/visionOSTestbed/main.m b/visionOS/testbed/visionOSTestbed/main.m -new file mode 100644 -index 00000000000..2bb491f25c8 --- /dev/null +++ b/visionOS/testbed/visionOSTestbed/main.m @@ -0,0 +1,16 @@ @@ -3460,12 +3489,9 @@ index 00000000000..2bb491f25c8 + return UIApplicationMain(argc, argv, nil, appDelegateClassName); + } +} -diff --git a/visionOS/testbed/visionOSTestbed/visionOStestbed-Info.plist b/visionOS/testbed/visionOSTestbed/visionOStestbed-Info.plist -new file mode 100644 -index 00000000000..47d59effe4e --- /dev/null -+++ b/visionOS/testbed/visionOSTestbed/visionOStestbed-Info.plist -@@ -0,0 +1,60 @@ ++++ b/visionOS/testbed/visionOSTestbed/visionOSTestbed-Info.plist +@@ -0,0 +1,56 @@ + + + @@ -3490,8 +3516,6 @@ index 00000000000..47d59effe4e + ???? + CFBundleVersion + 1 -+ LSRequiresIPhoneOS -+ + TestArgs + + test @@ -3507,8 +3531,6 @@ index 00000000000..47d59effe4e + UISceneConfigurations + + -+ UILaunchStoryboardName -+ Launch Screen + UIRequiresFullScreen + + UISupportedInterfaceOrientations @@ -3526,12 +3548,9 @@ index 00000000000..47d59effe4e + + + -diff --git a/visionOS/testbed/visionOSTestbedTests/visionOSTestbedTests.m b/visionOS/testbed/visionOSTestbedTests/visionOSTestbedTests.m -new file mode 100644 -index 00000000000..197b709aa10 --- /dev/null +++ b/visionOS/testbed/visionOSTestbedTests/visionOSTestbedTests.m -@@ -0,0 +1,164 @@ +@@ -0,0 +1,162 @@ +#import +#import + @@ -3563,7 +3582,6 @@ index 00000000000..197b709aa10 + // TTY. + setenv("NO_COLOR", "1", true); + setenv("PYTHON_COLORS", "0", true); -+ setenv("PYTHONVERBOSE", "1", true); + + // Arguments to pass into the test suite runner. + // argv[0] must identify the process; any subsequent arg @@ -3640,7 +3658,6 @@ index 00000000000..197b709aa10 + + NSLog(@"Initializing Python runtime..."); + status = Py_InitializeFromConfig(&config); -+ PyErr_Print(); + if (PyStatus_Exception(status)) { + XCTFail(@"Unable to initialize Python interpreter: %s", status.err_msg); + PyConfig_Clear(&config); @@ -3696,9 +3713,6 @@ index 00000000000..197b709aa10 + + +@end -diff --git a/watchOS/README.rst b/watchOS/README.rst -new file mode 100644 -index 00000000000..35221478452 --- /dev/null +++ b/watchOS/README.rst @@ -0,0 +1,108 @@ @@ -3810,9 +3824,6 @@ index 00000000000..35221478452 + +Using a framework-based Python on watchOS +====================================== -diff --git a/watchOS/Resources/Info.plist.in b/watchOS/Resources/Info.plist.in -new file mode 100644 -index 00000000000..e83ddfd2a43 --- /dev/null +++ b/watchOS/Resources/Info.plist.in @@ -0,0 +1,34 @@ @@ -3850,105 +3861,66 @@ index 00000000000..e83ddfd2a43 + @WATCHOS_DEPLOYMENT_TARGET@ + + -diff --git a/watchOS/Resources/bin/arm64-apple-watchos-simulator-ar b/watchOS/Resources/bin/arm64-apple-watchos-simulator-ar -new file mode 100755 -index 00000000000..dda2b211bd5 --- /dev/null +++ b/watchOS/Resources/bin/arm64-apple-watchos-simulator-ar @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk watchsimulator${WATCHOS_SDK_VERSION} ar "$@" -diff --git a/watchOS/Resources/bin/arm64-apple-watchos-simulator-clang b/watchOS/Resources/bin/arm64-apple-watchos-simulator-clang -new file mode 100755 -index 00000000000..38c3de7f86b --- /dev/null +++ b/watchOS/Resources/bin/arm64-apple-watchos-simulator-clang @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk watchsimulator${WATCHOS_SDK_VERSION} clang -target arm64-apple-watchos-simulator "$@" -diff --git a/watchOS/Resources/bin/arm64-apple-watchos-simulator-clang++ b/watchOS/Resources/bin/arm64-apple-watchos-simulator-clang++ -new file mode 100755 -index 00000000000..e25acb1a52d --- /dev/null +++ b/watchOS/Resources/bin/arm64-apple-watchos-simulator-clang++ @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk watchsimulator${WATCHOS_SDK_VERSION} clang++ -target arm64-apple-watchos-simulator "$@" -diff --git a/watchOS/Resources/bin/arm64-apple-watchos-simulator-cpp b/watchOS/Resources/bin/arm64-apple-watchos-simulator-cpp -new file mode 100755 -index 00000000000..0503ed40f64 --- /dev/null +++ b/watchOS/Resources/bin/arm64-apple-watchos-simulator-cpp @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk watchsimulator clang -target arm64-apple-watchos-simulator -E "$@" -diff --git a/watchOS/Resources/bin/arm64_32-apple-watchos-ar b/watchOS/Resources/bin/arm64_32-apple-watchos-ar -new file mode 100755 -index 00000000000..029f9a32073 --- /dev/null +++ b/watchOS/Resources/bin/arm64_32-apple-watchos-ar @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk watchos${WATCHOS_SDK_VERSION} ar "$@" -diff --git a/watchOS/Resources/bin/arm64_32-apple-watchos-clang b/watchOS/Resources/bin/arm64_32-apple-watchos-clang -new file mode 100755 -index 00000000000..0c6a20795e9 --- /dev/null +++ b/watchOS/Resources/bin/arm64_32-apple-watchos-clang @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk watchos${WATCHOS_SDK_VERSION} clang -target arm64_32-apple-watchos "$@" -diff --git a/watchOS/Resources/bin/arm64_32-apple-watchos-clang++ b/watchOS/Resources/bin/arm64_32-apple-watchos-clang++ -new file mode 100755 -index 00000000000..89da49a1f78 --- /dev/null +++ b/watchOS/Resources/bin/arm64_32-apple-watchos-clang++ @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk watchos${WATCHOS_SDK_VERSION} clang++ -target arm64_32-apple-watchos "$@" -diff --git a/watchOS/Resources/bin/arm64_32-apple-watchos-cpp b/watchOS/Resources/bin/arm64_32-apple-watchos-cpp -new file mode 100755 -index 00000000000..1b911273f08 --- /dev/null +++ b/watchOS/Resources/bin/arm64_32-apple-watchos-cpp @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk watchos${WATCHOS_SDK_VERSION} clang -target arm64_32-apple-watchos -E "$@" -diff --git a/watchOS/Resources/bin/x86_64-apple-watchos-simulator-ar b/watchOS/Resources/bin/x86_64-apple-watchos-simulator-ar -new file mode 100755 -index 00000000000..dda2b211bd5 --- /dev/null +++ b/watchOS/Resources/bin/x86_64-apple-watchos-simulator-ar @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk watchsimulator${WATCHOS_SDK_VERSION} ar "$@" -diff --git a/watchOS/Resources/bin/x86_64-apple-watchos-simulator-clang b/watchOS/Resources/bin/x86_64-apple-watchos-simulator-clang -new file mode 100755 -index 00000000000..185a8fb22e0 --- /dev/null +++ b/watchOS/Resources/bin/x86_64-apple-watchos-simulator-clang @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk watchsimulator${WATCHOS_SDK_VERSION} clang -target x86_64-apple-watchos-simulator "$@" -diff --git a/watchOS/Resources/bin/x86_64-apple-watchos-simulator-clang++ b/watchOS/Resources/bin/x86_64-apple-watchos-simulator-clang++ -new file mode 100755 -index 00000000000..d1127720bb9 --- /dev/null +++ b/watchOS/Resources/bin/x86_64-apple-watchos-simulator-clang++ @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk watchsimulator${WATCHOS_SDK_VERSION} clang++ -target x86_64-apple-watchos-simulator "$@" -diff --git a/watchOS/Resources/bin/x86_64-apple-watchos-simulator-cpp b/watchOS/Resources/bin/x86_64-apple-watchos-simulator-cpp -new file mode 100755 -index 00000000000..bd436d8a6c3 --- /dev/null +++ b/watchOS/Resources/bin/x86_64-apple-watchos-simulator-cpp @@ -0,0 +1,2 @@ +#!/bin/bash +xcrun --sdk watchsimulator${WATCHOS_SDK_VERSION} clang -target x86_64-apple-watchos-simulator -E "$@" -diff --git a/watchOS/Resources/dylib-Info-template.plist b/watchOS/Resources/dylib-Info-template.plist -new file mode 100644 -index 00000000000..6f8c0bc2095 --- /dev/null +++ b/watchOS/Resources/dylib-Info-template.plist @@ -0,0 +1,26 @@ @@ -3978,9 +3950,6 @@ index 00000000000..6f8c0bc2095 + 1 + + -diff --git a/watchOS/Resources/pyconfig.h b/watchOS/Resources/pyconfig.h -new file mode 100644 -index 00000000000..f842b987b2e --- /dev/null +++ b/watchOS/Resources/pyconfig.h @@ -0,0 +1,11 @@