diff --git a/Lib/ctypes/__init__.py b/Lib/ctypes/__init__.py
index 0b84a27f8c6..937a0b6ad1c 100644
--- a/Lib/ctypes/__init__.py
+++ b/Lib/ctypes/__init__.py
@@ -441,9 +441,9 @@
else:
def _load_library(self, name, mode, handle, winmode):
- # If the filename that has been provided is an iOS/tvOS/watchOS
- # .fwork file, dereference the location to the true origin of the
- # binary.
+ # If the filename that has been provided is an iOS, tvOS, visionOS
+ # or watchOS .fwork file, dereference the location to the true
+ # origin of the binary.
if name and name.endswith(".fwork"):
with open(name) as f:
name = _os.path.join(
diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py
index 015c62b31a1..c893fc8375a 100644
--- a/Lib/ctypes/util.py
+++ b/Lib/ctypes/util.py
@@ -133,7 +133,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", "visionos", "watchos"}:
from ctypes.macholib.dyld import dyld_find as _dyld_find
def find_library(name):
possible = ['lib%s.dylib' % name,
diff --git a/Lib/importlib/_bootstrap_external.py b/Lib/importlib/_bootstrap_external.py
index a1cb729efb7..cb51488ce9a 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', 'visionos', 'watchos'
_CASE_INSENSITIVE_PLATFORMS = (_CASE_INSENSITIVE_PLATFORMS_BYTES_KEY
+ _CASE_INSENSITIVE_PLATFORMS_STR_KEY)
@@ -1563,7 +1563,7 @@
"""
extension_loaders = []
if hasattr(_imp, 'create_dynamic'):
- if sys.platform in {"ios", "tvos", "watchos"}:
+ if sys.platform in {"ios", "tvos", "visionos", "watchos"}:
extension_loaders = [(AppleFrameworkLoader, [
suffix.replace(".so", ".fwork")
for suffix in _imp.extension_suffixes()
diff --git a/Lib/platform.py b/Lib/platform.py
index 36489d4fdd9..8e52bf202ff 100644
--- a/Lib/platform.py
+++ b/Lib/platform.py
@@ -536,6 +536,78 @@
return IOSVersionInfo(system, release, model, is_simulator)
+# A namedtuple for tvOS version information.
+TVOSVersionInfo = collections.namedtuple(
+ "TVOSVersionInfo",
+ ["system", "release", "model", "is_simulator"]
+)
+
+
+def tvos_ver(system="", release="", model="", is_simulator=False):
+ """Get tvOS 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 == "tvos":
+ # TODO: Can the iOS implementation be used here?
+ import _ios_support
+ result = _ios_support.get_platform_ios()
+ if result is not None:
+ return TVOSVersionInfo(*result)
+
+ return TVOSVersionInfo(system, release, model, is_simulator)
+
+
+# A namedtuple for watchOS version information.
+WatchOSVersionInfo = collections.namedtuple(
+ "WatchOSVersionInfo",
+ ["system", "release", "model", "is_simulator"]
+)
+
+
+def watchos_ver(system="", release="", model="", is_simulator=False):
+ """Get watchOS 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 == "watchos":
+ # TODO: Can the iOS implementation be used here?
+ import _ios_support
+ result = _ios_support.get_platform_ios()
+ if result is not None:
+ return WatchOSVersionInfo(*result)
+
+ return WatchOSVersionInfo(system, release, model, is_simulator)
+
+
+# A namedtuple for visionOS version information.
+VisionOSVersionInfo = collections.namedtuple(
+ "VisionOSVersionInfo",
+ ["system", "release", "model", "is_simulator"]
+)
+
+
+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 == "visionos":
+ # TODO: Can the iOS implementation be used here?
+ import _ios_support
+ result = _ios_support.get_platform_ios()
+ if result is not None:
+ return VisionOSVersionInfo(*result)
+
+ return VisionOSVersionInfo(system, release, model, is_simulator)
+
+
AndroidVer = collections.namedtuple(
"AndroidVer", "release api_level manufacturer model device is_emulator")
@@ -676,7 +748,7 @@
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', 'visionos', 'watchos'}:
# XXX Others too ?
return default
@@ -840,14 +912,30 @@
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/visionOS/watchOS 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.
def get_ios():
if sys.implementation._multiarch.endswith("simulator"):
return os.uname().machine
return 'arm64'
+ def get_tvos():
+ if sys.implementation._multiarch.endswith("simulator"):
+ return os.uname().machine
+ return 'arm64'
+
+ def get_visionos():
+ if sys.implementation._multiarch.endswith("simulator"):
+ return os.uname().machine
+ return 'arm64'
+
+ def get_watchos():
+ if sys.implementation._multiarch.endswith("simulator"):
+ return os.uname().machine
+ return 'arm64_32'
+
def from_subprocess():
"""
Fall back to `uname -p`
@@ -1000,9 +1088,15 @@
system = 'Android'
release = android_ver().release
- # Normalize responses on iOS
+ # Normalize responses on Apple mobile platforms
if sys.platform == 'ios':
system, release, _, _ = ios_ver()
+ if sys.platform == 'tvos':
+ system, release, _, _ = tvos_ver()
+ if sys.platform == 'visionos':
+ system, release, _, _ = visionos_ver()
+ if sys.platform == 'watchos':
+ system, release, _, _ = watchos_ver()
vals = system, node, release, version, machine
# Replace 'unknown' values with the more portable ''
@@ -1292,6 +1386,12 @@
# macOS and iOS both report as a "Darwin" kernel
if sys.platform == "ios":
system, release, _, _ = ios_ver()
+ elif sys.platform == "tvos":
+ system, release, _, _ = tvos_ver()
+ elif sys.platform == "visionos":
+ system, release, _, _ = visionos_ver()
+ elif sys.platform == "watchos":
+ system, release, _, _ = watchos_ver()
else:
macos_release = mac_ver()[0]
if macos_release:
diff --git a/Lib/site.py b/Lib/site.py
index 89e136d7b10..8d2063607a6 100644
--- a/Lib/site.py
+++ b/Lib/site.py
@@ -653,8 +653,8 @@
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/subprocess.py b/Lib/subprocess.py
index 5948cd841bc..d92c8b57fd7 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", "visionos", "watchos"}
if _mswindows:
import _winapi
diff --git a/Lib/sysconfig/__init__.py b/Lib/sysconfig/__init__.py
index 4f8ebf15d36..86598a8b4b2 100644
--- a/Lib/sysconfig/__init__.py
+++ b/Lib/sysconfig/__init__.py
@@ -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 @@
# 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):
@@ -741,6 +744,18 @@
release = get_config_vars().get("IPHONEOS_DEPLOYMENT_TARGET", "13.0")
osname = sys.platform
machine = sys.implementation._multiarch
+ elif sys.platform == "tvos":
+ release = get_config_vars().get("TVOS_DEPLOYMENT_TARGET", "12.0")
+ osname = sys.platform
+ machine = sys.implementation._multiarch
+ elif sys.platform == "watchos":
+ release = get_config_vars().get("WATCHOS_DEPLOYMENT_TARGET", "4.0")
+ osname = sys.platform
+ machine = sys.implementation._multiarch
+ 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/Lib/test/datetimetester.py b/Lib/test/datetimetester.py
index c11e9c068be..13cc95a81cd 100644
--- a/Lib/test/datetimetester.py
+++ b/Lib/test/datetimetester.py
@@ -7406,9 +7406,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 8e13ab4b9bc..f20f9528085 100644
--- a/Lib/test/support/__init__.py
+++ b/Lib/test/support/__init__.py
@@ -587,7 +587,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", "visionos", "watchos"}:
unix_shell = '/system/bin/sh' if is_android else '/bin/sh'
else:
unix_shell = None
@@ -606,7 +606,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", "visionos", "watchos"}
is_apple = is_apple_mobile or sys.platform == "darwin"
has_fork_support = hasattr(os, "fork") and not (
diff --git a/Lib/test/test__interpreters.py b/Lib/test/test__interpreters.py
index ec5a26bc1c0..1b66f9c7646 100644
--- a/Lib/test/test__interpreters.py
+++ b/Lib/test/test__interpreters.py
@@ -612,6 +612,7 @@
f'assert(obj == {obj!r})',
)
+ @support.requires_subprocess()
def test_os_exec(self):
expected = 'spam spam spam spam spam'
subinterp = _interpreters.create()
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 63c130813ec..5baa6145f4a 100644
--- a/Lib/test/test_platform.py
+++ b/Lib/test/test_platform.py
@@ -287,13 +287,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 82f14ca968f..52e06832e6a 100644
--- a/Lib/test/test_webbrowser.py
+++ b/Lib/test/test_webbrowser.py
@@ -254,7 +254,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 ec8b544a6b0..26020844023 100644
--- a/Lib/webbrowser.py
+++ b/Lib/webbrowser.py
@@ -505,7 +505,8 @@
# macOS can use below Unix support (but we prefer using the macOS
# 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":
@@ -744,9 +745,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 8008a96c1c8..823896db921 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -215,6 +215,12 @@
# 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 f5cd73bdea8..6c1863c943b 100644
--- a/Misc/platform_triplet.c
+++ b/Misc/platform_triplet.c
@@ -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-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/Platforms/Apple/__main__.py b/Platforms/Apple/__main__.py
index 8be0d8719f5..001cb7057f8 100644
--- a/Platforms/Apple/__main__.py
+++ b/Platforms/Apple/__main__.py
@@ -5,17 +5,20 @@
# This script simplifies the process of configuring, compiling and packaging an
# XCframework for an Apple platform.
#
-# At present, it only supports iOS, but it has been constructed so that it
-# could be used on any Apple platform.
+# At present, it supports iOS, tvOS, visionOS and watchOS, but it has been
+# constructed so that it could be used on any Apple platform.
#
# The simplest entry point is:
#
# $ python Platforms/Apple ci iOS
#
+# (replace iOS with tvOS, visionOS or watchOS as required.)
+#
# which will:
# * Clean any pre-existing build artefacts
# * Configure and make a Python that can be used for the build
-# * Configure and make a Python for each supported iOS architecture and ABI
+# * Configure and make a Python for each supported iOS/tvOS/watchOS/visionOS
+# architecture and ABI
# * Combine the outputs of the builds from the previous step into a single
# XCframework, merging binaries into a "fat" binary if necessary
# * Clone a copy of the testbed, configured to use the XCframework
@@ -75,6 +78,32 @@
"x86_64-apple-ios-simulator": "x86_64-iphonesimulator",
},
},
+ "tvOS": {
+ "tvos-arm64": {
+ "arm64-apple-tvos": "arm64-appletvos",
+ },
+ "tvos-arm64_x86_64-simulator": {
+ "arm64-apple-tvos-simulator": "arm64-appletvsimulator",
+ "x86_64-apple-tvos-simulator": "x86_64-appletvsimulator",
+ },
+ },
+ "visionOS": {
+ "xros-arm64": {
+ "arm64-apple-xros": "arm64-xros",
+ },
+ "xros-arm64-simulator": {
+ "arm64-apple-xros-simulator": "arm64-xrsimulator",
+ },
+ },
+ "watchOS": {
+ "watchos-arm64_32": {
+ "arm64_32-apple-watchos": "arm64_32-watchos",
+ },
+ "watchos-arm64_x86_64-simulator": {
+ "arm64-apple-watchos-simulator": "arm64-watchsimulator",
+ "x86_64-apple-watchos-simulator": "x86_64-watchsimulator",
+ },
+ },
}
@@ -136,11 +165,24 @@
print(f"export {key}={shlex.quote(value)}")
+def platform_for_host(host):
+ """Determine the platform for a given host triple."""
+ for plat, slices in HOSTS.items():
+ for _, candidates in slices.items():
+ for candidate in candidates:
+ if candidate == host:
+ return plat
+ raise KeyError(host)
+
+
def apple_env(host: str) -> EnvironmentT:
"""Construct an Apple development environment for the given host."""
env = {
"PATH": ":".join([
- str(PYTHON_DIR / "Platforms/Apple/iOS/Resources/bin"),
+ str(
+ PYTHON_DIR
+ / f"Platforms/Apple/{platform_for_host(host)}/Resources/bin"
+ ),
str(subdir(host) / "prefix"),
"/usr/bin",
"/bin",
@@ -314,8 +356,8 @@
Downloads binaries if they aren't already present. Downloads will be stored
in provided cache directory.
- On iOS, as a safety mechanism, any dynamic libraries will be purged from
- the unpacked dependencies.
+ On non-macOS platforms, as a safety mechanism, any dynamic libraries will
+ be purged from the unpacked dependencies.
"""
# To create new builds of these dependencies, usually all that's necessary
# is to push a tag to the cpython-apple-source-deps repository, and GitHub
@@ -340,9 +382,9 @@
)
shutil.unpack_archive(archive_path, prefix_dir)
- # Dynamic libraries will be preferentially linked over static;
- # On iOS, ensure that no dylibs are available in the prefix folder.
- if platform == "iOS":
+ # Dynamic libraries will be preferentially linked over static; On non-macOS
+ # platforms, ensure that no dylibs are available in the prefix folder.
+ if platform != "macOS":
for dylib in prefix_dir.glob("**/*.dylib"):
dylib.unlink()
@@ -409,6 +451,7 @@
f"--build={sysconfig.get_config_var('BUILD_GNU_TYPE')}",
f"--with-build-python={build_python_path()}",
"--with-system-libmpdec",
+ "--enable-ipv6",
"--enable-framework",
# Dependent libraries.
f"--with-openssl={prefix_dir}",
@@ -451,7 +494,8 @@
"""
return (
CROSS_BUILD_DIR
- / f"{host_triple}/Platforms/Apple/iOS/Frameworks/{multiarch}"
+ / f"{host_triple}/Platforms/Apple/{platform_for_host(host_triple)}"
+ / f"Frameworks/{multiarch}"
)
@@ -673,7 +717,7 @@
host_path = (
CROSS_BUILD_DIR
/ host_triple
- / "Platforms/Apple/iOS/Frameworks"
+ / f"Platforms/Apple/{platform}/Frameworks"
/ multiarch
)
host_framework = host_path / "Python.framework"
@@ -719,18 +763,20 @@
# Create an XCframework
version = create_xcframework(context.platform)
- # Clone testbed
- print()
- run([
- sys.executable,
- "Platforms/Apple/testbed",
- "clone",
- "--platform",
- context.platform,
- "--framework",
- CROSS_BUILD_DIR / context.platform / "Python.xcframework",
- CROSS_BUILD_DIR / context.platform / "testbed",
- ])
+ # watchOS doesn't have a testbed (yet!)
+ if context.platform != "watchOS":
+ # Clone testbed
+ print()
+ run([
+ sys.executable,
+ "Platforms/Apple/testbed",
+ "clone",
+ "--platform",
+ context.platform,
+ "--framework",
+ CROSS_BUILD_DIR / context.platform / "Python.xcframework",
+ CROSS_BUILD_DIR / context.platform / "testbed",
+ ])
# Build the final archive
archive_name = (
diff --git a/Platforms/Apple/iOS/Resources/Info.plist.in b/Platforms/Apple/iOS/Resources/Info.plist.in
index c3e261ecd9e..26ef7a95de4 100644
--- a/Platforms/Apple/iOS/Resources/Info.plist.in
+++ b/Platforms/Apple/iOS/Resources/Info.plist.in
@@ -17,13 +17,13 @@
CFBundlePackageType
FMWK
CFBundleShortVersionString
- @VERSION@
+ %VERSION%
CFBundleLongVersionString
%VERSION%, (c) 2001-2024 Python Software Foundation.
CFBundleSignature
????
CFBundleVersion
- 1
+ %VERSION%
CFBundleSupportedPlatforms
iPhoneOS
diff --git a/Platforms/Apple/testbed/Python.xcframework/Info.plist b/Platforms/Apple/testbed/Python.xcframework/Info.plist
index c6418de6e74..0587f4735f7 100644
--- a/Platforms/Apple/testbed/Python.xcframework/Info.plist
+++ b/Platforms/Apple/testbed/Python.xcframework/Info.plist
@@ -35,6 +35,98 @@
SupportedPlatformVariant
simulator
+
+ BinaryPath
+ Python.framework/Python
+ LibraryIdentifier
+ tvos-arm64
+ LibraryPath
+ Python.framework
+ SupportedArchitectures
+
+ arm64
+
+ SupportedPlatform
+ tvos
+
+
+ BinaryPath
+ Python.framework/Python
+ LibraryIdentifier
+ tvos-arm64_x86_64-simulator
+ LibraryPath
+ Python.framework
+ SupportedArchitectures
+
+ arm64
+ x86_64
+
+ SupportedPlatform
+ tvos
+ SupportedPlatformVariant
+ simulator
+
+
+ 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
+
+
+ BinaryPath
+ Python.framework/Python
+ LibraryIdentifier
+ watchos-arm64_x86_64-simulator
+ LibraryPath
+ Python.framework
+ SupportedArchitectures
+
+ arm64
+ x86_64
+
+ SupportedPlatform
+ watchos
+ SupportedPlatformVariant
+ simulator
+
+
+ BinaryPath
+ Python.framework/Python
+ LibraryIdentifier
+ watchos-arm64_32
+ LibraryPath
+ Python.framework
+ SupportedArchitectures
+
+ arm64_32
+
+ SupportedPlatform
+ watchos
+
CFBundlePackageType
XFWK
diff --git a/Platforms/Apple/testbed/Python.xcframework/build/tvOS-dylib-Info-template.plist b/Platforms/Apple/testbed/Python.xcframework/build/tvOS-dylib-Info-template.plist
new file mode 100644
index 00000000000..a20d476fa7b
--- /dev/null
+++ b/Platforms/Apple/testbed/Python.xcframework/build/tvOS-dylib-Info-template.plist
@@ -0,0 +1,26 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ en
+ CFBundleExecutable
+
+ CFBundleIdentifier
+
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundlePackageType
+ APPL
+ CFBundleShortVersionString
+ 1.0
+ CFBundleSupportedPlatforms
+
+ tvOS
+
+ MinimumOSVersion
+ 9.0
+ CFBundleVersion
+ 1
+
+
diff --git a/Platforms/Apple/testbed/Python.xcframework/build/utils.sh b/Platforms/Apple/testbed/Python.xcframework/build/utils.sh
index e54471f68b7..2d3b9320b3c 100755
--- a/Platforms/Apple/testbed/Python.xcframework/build/utils.sh
+++ b/Platforms/Apple/testbed/Python.xcframework/build/utils.sh
@@ -34,9 +34,38 @@
else
SLICE_FOLDER="ios-arm64_x86_64-simulator"
fi
- else
+ elif [ "$EFFECTIVE_PLATFORM_NAME" = "-iphoneos" ]; then
echo "Installing Python modules for iOS Device"
SLICE_FOLDER="ios-arm64"
+ elif [ "$EFFECTIVE_PLATFORM_NAME" = "-appletvsimulator" ]; then
+ echo "Installing Python modules for tvOS Simulator"
+ if [ -d "$PROJECT_DIR/$PYTHON_XCFRAMEWORK_PATH/tvos-arm64-simulator" ]; then
+ SLICE_FOLDER="tvos-arm64-simulator"
+ else
+ SLICE_FOLDER="tvos-arm64_x86_64-simulator"
+ fi
+ elif [ "$EFFECTIVE_PLATFORM_NAME" = "-appletvos" ]; then
+ echo "Installing Python modules for tvOS Device"
+ SLICE_FOLDER="tvos-arm64"
+ elif [ "$EFFECTIVE_PLATFORM_NAME" = "-watchsimulator" ]; then
+ echo "Installing Python modules for watchOS Simulator"
+ if [ -d "$PROJECT_DIR/$PYTHON_XCFRAMEWORK_PATH/watchos-arm64-simulator" ]; then
+ SLICE_FOLDER="watchos-arm64-simulator"
+ else
+ SLICE_FOLDER="watchos-arm64_x86_64-simulator"
+ fi
+ elif [ "$EFFECTIVE_PLATFORM_NAME" = "-watchos" ]; then
+ echo "Installing Python modules for watchOS Device"
+ SLICE_FOLDER="watchos-arm64"
+ elif [ "$EFFECTIVE_PLATFORM_NAME" = "-xrsimulator" ]; then
+ echo "Installing Python modules for visionOS Simulator"
+ SLICE_FOLDER="xros-arm64-simulator"
+ elif [ "$EFFECTIVE_PLATFORM_NAME" = "-xros" ]; then
+ echo "Installing Python modules for visionOS Device"
+ SLICE_FOLDER="xros-arm64"
+ else
+ echo "Unsupported platform name $EFFECTIVE_PLATFORM_NAME"
+ exit 1
fi
# If the XCframework has a shared lib folder, then it's a full framework.
diff --git a/Platforms/Apple/testbed/Python.xcframework/build/watchOS-dylib-Info-template.plist b/Platforms/Apple/testbed/Python.xcframework/build/watchOS-dylib-Info-template.plist
new file mode 100644
index 00000000000..6f8c0bc2095
--- /dev/null
+++ b/Platforms/Apple/testbed/Python.xcframework/build/watchOS-dylib-Info-template.plist
@@ -0,0 +1,26 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ en
+ CFBundleExecutable
+
+ CFBundleIdentifier
+
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundlePackageType
+ APPL
+ CFBundleShortVersionString
+ 1.0
+ CFBundleSupportedPlatforms
+
+ watchOS
+
+ MinimumOSVersion
+ 4.0
+ CFBundleVersion
+ 1
+
+
diff --git a/Platforms/Apple/testbed/Python.xcframework/build/xrOS-dylib-Info-template.plist b/Platforms/Apple/testbed/Python.xcframework/build/xrOS-dylib-Info-template.plist
new file mode 100644
index 00000000000..e91673b4fbc
--- /dev/null
+++ b/Platforms/Apple/testbed/Python.xcframework/build/xrOS-dylib-Info-template.plist
@@ -0,0 +1,30 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ en
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleExecutable
+
+ CFBundleIdentifier
+
+ CFBundlePackageType
+ FMWK
+ CFBundleShortVersionString
+ 1.0
+ CFBundleSupportedPlatforms
+
+ XROS
+
+ CFBundleVersion
+ 1
+ MinimumOSVersion
+ 2.0
+ UIDeviceFamily
+
+ 7
+
+
+
diff --git a/Platforms/Apple/testbed/Python.xcframework/tvos-arm64/README b/Platforms/Apple/testbed/Python.xcframework/tvos-arm64/README
new file mode 100644
index 00000000000..ebd648d04bd
--- /dev/null
+++ b/Platforms/Apple/testbed/Python.xcframework/tvos-arm64/README
@@ -0,0 +1,4 @@
+This directory is intentionally empty.
+
+It should be used as a target for `--enable-framework` when compiling a tvOS
+on-device build for testing purposes.
diff --git a/Platforms/Apple/testbed/Python.xcframework/tvos-arm64_x86_64-simulator/README b/Platforms/Apple/testbed/Python.xcframework/tvos-arm64_x86_64-simulator/README
new file mode 100644
index 00000000000..f8163468d8c
--- /dev/null
+++ b/Platforms/Apple/testbed/Python.xcframework/tvos-arm64_x86_64-simulator/README
@@ -0,0 +1,4 @@
+This directory is intentionally empty.
+
+It should be used as a target for `--enable-framework` when compiling a tvOS
+simulator build for testing purposes (either x86_64 or ARM64).
diff --git a/Platforms/Apple/testbed/Python.xcframework/watchos-arm64_32/README b/Platforms/Apple/testbed/Python.xcframework/watchos-arm64_32/README
new file mode 100644
index 00000000000..696af231df3
--- /dev/null
+++ b/Platforms/Apple/testbed/Python.xcframework/watchos-arm64_32/README
@@ -0,0 +1,4 @@
+This directory is intentionally empty.
+
+It should be used as a target for `--enable-framework` when compiling a watchOS on-device
+build for testing purposes.
diff --git a/Platforms/Apple/testbed/Python.xcframework/watchos-arm64_x86_64-simulator/README b/Platforms/Apple/testbed/Python.xcframework/watchos-arm64_x86_64-simulator/README
new file mode 100644
index 00000000000..d38e1e98276
--- /dev/null
+++ b/Platforms/Apple/testbed/Python.xcframework/watchos-arm64_x86_64-simulator/README
@@ -0,0 +1,4 @@
+This directory is intentionally empty.
+
+It should be used as a target for `--enable-framework` when compiling a watchOS
+simulator build for testing purposes (either x86_64 or ARM64).
diff --git a/Platforms/Apple/testbed/Python.xcframework/xros-arm64-simulator/README b/Platforms/Apple/testbed/Python.xcframework/xros-arm64-simulator/README
new file mode 100644
index 00000000000..7bb0ad4b6ba
--- /dev/null
+++ b/Platforms/Apple/testbed/Python.xcframework/xros-arm64-simulator/README
@@ -0,0 +1,4 @@
+This directory is intentionally empty.
+
+It should be used as a target for `--enable-framework` when compiling an visionOS simulator
+build for testing purposes (either x86_64 or ARM64).
diff --git a/Platforms/Apple/testbed/Python.xcframework/xros-arm64/README b/Platforms/Apple/testbed/Python.xcframework/xros-arm64/README
new file mode 100644
index 00000000000..2fc2112e477
--- /dev/null
+++ b/Platforms/Apple/testbed/Python.xcframework/xros-arm64/README
@@ -0,0 +1,4 @@
+This directory is intentionally empty.
+
+It should be used as a target for `--enable-framework` when compiling an visionOS on-device
+build for testing purposes.
diff --git a/Platforms/Apple/testbed/__main__.py b/Platforms/Apple/testbed/__main__.py
index 797b522678f..643034e9bca 100644
--- a/Platforms/Apple/testbed/__main__.py
+++ b/Platforms/Apple/testbed/__main__.py
@@ -10,6 +10,9 @@
TEST_SLICES = {
"iOS": "ios-arm64_x86_64-simulator",
+ "tvOS": "tvos-arm64_x86_64-simulator",
+ "visionOS": "xros-arm64-simulator",
+ "watchOS": "watchos-arm64_x86_64-simulator",
}
DECODE_ARGS = ("UTF-8", "backslashreplace")
@@ -21,7 +24,7 @@
LOG_PREFIX_REGEX = re.compile(
r"^\d{4}-\d{2}-\d{2}" # YYYY-MM-DD
r"\s+\d+:\d{2}:\d{2}\.\d+\+\d{4}" # HH:MM:SS.ssssss+ZZZZ
- r"\s+iOSTestbed\[\d+:\w+\] " # Process/thread ID
+ r"\s+.*Testbed\[\d+:\w+\] " # Process/thread ID
)
@@ -54,6 +57,24 @@
)
)
simulator = se_simulators[-1][1]
+ elif platform == "tvOS":
+ # Find the most recent tvOS release.
+ simulators = sorted(
+ (devicetype["minRuntimeVersion"], devicetype["name"])
+ for devicetype in json_data["devicetypes"]
+ if devicetype["productFamily"] == "Apple TV"
+ )
+ simulator = simulators[-1][1]
+ elif platform == "visionOS":
+ # Find the most recent visionOS release.
+ simulators = sorted(
+ (devicetype["minRuntimeVersion"], devicetype["name"])
+ for devicetype in json_data["devicetypes"]
+ if devicetype["productFamily"] == "Apple Vision"
+ )
+ simulator = simulators[-1][1]
+ elif platform == "watchOS":
+ raise NotImplementedError("Don't know how to launch watchOS (yet)")
else:
raise ValueError(f"Unknown platform {platform}")
@@ -295,7 +316,7 @@
# many platforms, but when cloned, only one platform is preserved.
available_platforms = [
platform
- for platform in ["iOS"]
+ for platform in ["iOS", "tvOS", "visionOS", "watchOS"]
if (Path(__file__).parent / f"{platform}Testbed").is_dir()
]
@@ -349,7 +370,7 @@
),
description=(
"Run a testbed project. The arguments provided after `--` will be "
- "passed to the running iOS process as if they were arguments to "
+ "passed to the running test process as if they were arguments to "
"`python -m`."
),
help="Run a testbed project",
diff --git a/Platforms/Apple/testbed/tvOSTestbed.xcodeproj/project.pbxproj b/Platforms/Apple/testbed/tvOSTestbed.xcodeproj/project.pbxproj
new file mode 100644
index 00000000000..5ddfba882f4
--- /dev/null
+++ b/Platforms/Apple/testbed/tvOSTestbed.xcodeproj/project.pbxproj
@@ -0,0 +1,505 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 77;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ EE7C8A1E2DCD6FF3003206DB /* Python.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = EE7C8A1C2DCD6FF3003206DB /* Python.xcframework */; };
+ EE7C8A1F2DCD70CD003206DB /* Python.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = EE7C8A1C2DCD6FF3003206DB /* Python.xcframework */; };
+ EE7C8A202DCD70CD003206DB /* Python.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = EE7C8A1C2DCD6FF3003206DB /* Python.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+ EE989E662DCD6E7A0036B268 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = EE989E462DCD6E780036B268 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = EE989E4D2DCD6E780036B268;
+ remoteInfo = tvOSTestbed;
+ };
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+ EE7C8A212DCD70CD003206DB /* Embed Frameworks */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = "";
+ dstSubfolderSpec = 10;
+ files = (
+ EE7C8A202DCD70CD003206DB /* Python.xcframework in Embed Frameworks */,
+ );
+ name = "Embed Frameworks";
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+ 6077B3802E82A4BE00E3D6A3 /* tvOSTestbed.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = tvOSTestbed.xctestplan; sourceTree = ""; };
+ EE7C8A1C2DCD6FF3003206DB /* Python.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = Python.xcframework; sourceTree = ""; };
+ EE989E4E2DCD6E780036B268 /* tvOSTestbed.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = tvOSTestbed.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ EE989E652DCD6E7A0036B268 /* TestbedTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TestbedTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
+/* End PBXFileReference section */
+
+/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */
+ 6077B37F2E81892A00E3D6A3 /* Exceptions for "tvOSTestbed" folder in "tvOSTestbed" target */ = {
+ isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
+ membershipExceptions = (
+ "tvOSTestbed-Info.plist",
+ );
+ target = EE989E4D2DCD6E780036B268 /* tvOSTestbed */;
+ };
+/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */
+
+/* Begin PBXFileSystemSynchronizedRootGroup section */
+ EE989E502DCD6E780036B268 /* tvOSTestbed */ = {
+ isa = PBXFileSystemSynchronizedRootGroup;
+ exceptions = (
+ 6077B37F2E81892A00E3D6A3 /* Exceptions for "tvOSTestbed" folder in "tvOSTestbed" target */,
+ );
+ explicitFolders = (
+ app,
+ app_packages,
+ );
+ path = tvOSTestbed;
+ sourceTree = "";
+ };
+ EE989E682DCD6E7A0036B268 /* TestbedTests */ = {
+ isa = PBXFileSystemSynchronizedRootGroup;
+ path = TestbedTests;
+ sourceTree = "";
+ };
+/* End PBXFileSystemSynchronizedRootGroup section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ EE989E4B2DCD6E780036B268 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ EE7C8A1F2DCD70CD003206DB /* Python.xcframework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ EE989E622DCD6E7A0036B268 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ EE7C8A1E2DCD6FF3003206DB /* Python.xcframework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ EE989E452DCD6E780036B268 = {
+ isa = PBXGroup;
+ children = (
+ 6077B3802E82A4BE00E3D6A3 /* tvOSTestbed.xctestplan */,
+ EE7C8A1C2DCD6FF3003206DB /* Python.xcframework */,
+ EE989E502DCD6E780036B268 /* tvOSTestbed */,
+ EE989E682DCD6E7A0036B268 /* TestbedTests */,
+ EE989E4F2DCD6E780036B268 /* Products */,
+ );
+ sourceTree = "";
+ };
+ EE989E4F2DCD6E780036B268 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ EE989E4E2DCD6E780036B268 /* tvOSTestbed.app */,
+ EE989E652DCD6E7A0036B268 /* TestbedTests.xctest */,
+ );
+ name = Products;
+ sourceTree = "";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ EE989E4D2DCD6E780036B268 /* tvOSTestbed */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = EE989E792DCD6E7A0036B268 /* Build configuration list for PBXNativeTarget "tvOSTestbed" */;
+ buildPhases = (
+ EE989E4A2DCD6E780036B268 /* Sources */,
+ EE989E4B2DCD6E780036B268 /* Frameworks */,
+ EE989E4C2DCD6E780036B268 /* Resources */,
+ EE7C8A222DCD70F4003206DB /* Process Python libraries */,
+ EE7C8A212DCD70CD003206DB /* Embed Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ fileSystemSynchronizedGroups = (
+ EE989E502DCD6E780036B268 /* tvOSTestbed */,
+ );
+ name = tvOSTestbed;
+ packageProductDependencies = (
+ );
+ productName = tvOSTestbed;
+ productReference = EE989E4E2DCD6E780036B268 /* tvOSTestbed.app */;
+ productType = "com.apple.product-type.application";
+ };
+ EE989E642DCD6E7A0036B268 /* TestbedTests */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = EE989E7C2DCD6E7A0036B268 /* Build configuration list for PBXNativeTarget "TestbedTests" */;
+ buildPhases = (
+ EE989E612DCD6E7A0036B268 /* Sources */,
+ EE989E622DCD6E7A0036B268 /* Frameworks */,
+ EE989E632DCD6E7A0036B268 /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ EE989E672DCD6E7A0036B268 /* PBXTargetDependency */,
+ );
+ fileSystemSynchronizedGroups = (
+ EE989E682DCD6E7A0036B268 /* TestbedTests */,
+ );
+ name = TestbedTests;
+ packageProductDependencies = (
+ );
+ productName = TestbedTests;
+ productReference = EE989E652DCD6E7A0036B268 /* TestbedTests.xctest */;
+ productType = "com.apple.product-type.bundle.unit-test";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ EE989E462DCD6E780036B268 /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ BuildIndependentTargetsInParallel = 1;
+ LastUpgradeCheck = 1620;
+ TargetAttributes = {
+ EE989E4D2DCD6E780036B268 = {
+ CreatedOnToolsVersion = 16.2;
+ };
+ EE989E642DCD6E7A0036B268 = {
+ CreatedOnToolsVersion = 16.2;
+ TestTargetID = EE989E4D2DCD6E780036B268;
+ };
+ };
+ };
+ buildConfigurationList = EE989E492DCD6E780036B268 /* Build configuration list for PBXProject "tvOSTestbed" */;
+ developmentRegion = en;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ Base,
+ );
+ mainGroup = EE989E452DCD6E780036B268;
+ minimizedProjectReferenceProxies = 1;
+ preferredProjectObjectVersion = 77;
+ productRefGroup = EE989E4F2DCD6E780036B268 /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ EE989E4D2DCD6E780036B268 /* tvOSTestbed */,
+ EE989E642DCD6E7A0036B268 /* TestbedTests */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ EE989E4C2DCD6E780036B268 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ EE989E632DCD6E7A0036B268 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+ EE7C8A222DCD70F4003206DB /* Process Python libraries */ = {
+ isa = PBXShellScriptBuildPhase;
+ alwaysOutOfDate = 1;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputFileListPaths = (
+ );
+ inputPaths = (
+ );
+ name = "Process Python libraries";
+ outputFileListPaths = (
+ );
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "set -e\n\nsource $PROJECT_DIR/Python.xcframework/build/utils.sh\n\ninstall_python Python.xcframework app app_packages\n";
+ };
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ EE989E4A2DCD6E780036B268 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ EE989E612DCD6E7A0036B268 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+ EE989E672DCD6E7A0036B268 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = EE989E4D2DCD6E780036B268 /* tvOSTestbed */;
+ targetProxy = EE989E662DCD6E7A0036B268 /* PBXContainerItemProxy */;
+ };
+/* End PBXTargetDependency section */
+
+/* Begin XCBuildConfiguration section */
+ EE989E772DCD6E7A0036B268 /* 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 = NO;
+ 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 = NO;
+ FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)";
+ 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;
+ HEADER_SEARCH_PATHS = "$(BUILT_PRODUCTS_DIR)/Python.framework/Headers";
+ LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
+ MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
+ MTL_FAST_MATH = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ SDKROOT = appletvos;
+ TVOS_DEPLOYMENT_TARGET = 18.2;
+ };
+ name = Debug;
+ };
+ EE989E782DCD6E7A0036B268 /* 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 = NO;
+ 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_TESTABILITY = YES;
+ ENABLE_USER_SCRIPT_SANDBOXING = NO;
+ FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)";
+ 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;
+ HEADER_SEARCH_PATHS = "$(BUILT_PRODUCTS_DIR)/Python.framework/Headers";
+ LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ MTL_FAST_MATH = YES;
+ SDKROOT = appletvos;
+ TVOS_DEPLOYMENT_TARGET = 18.2;
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ EE989E7A2DCD6E7A0036B268 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
+ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
+ CODE_SIGN_STYLE = Automatic;
+ CURRENT_PROJECT_VERSION = 1;
+ GENERATE_INFOPLIST_FILE = NO;
+ INFOPLIST_FILE = "tvOSTestbed/tvOSTestbed-Info.plist";
+ INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
+ INFOPLIST_KEY_UIMainStoryboardFile = Main;
+ INFOPLIST_KEY_UIUserInterfaceStyle = Automatic;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
+ MARKETING_VERSION = 1.0;
+ PRODUCT_BUNDLE_IDENTIFIER = org.python.tvOSTestbed;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_EMIT_LOC_STRINGS = YES;
+ TARGETED_DEVICE_FAMILY = 3;
+ };
+ name = Debug;
+ };
+ EE989E7B2DCD6E7A0036B268 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
+ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
+ CODE_SIGN_STYLE = Automatic;
+ CURRENT_PROJECT_VERSION = 1;
+ GENERATE_INFOPLIST_FILE = NO;
+ INFOPLIST_FILE = "tvOSTestbed/tvOSTestbed-Info.plist";
+ INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
+ INFOPLIST_KEY_UIMainStoryboardFile = Main;
+ INFOPLIST_KEY_UIUserInterfaceStyle = Automatic;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
+ MARKETING_VERSION = 1.0;
+ PRODUCT_BUNDLE_IDENTIFIER = org.python.tvOSTestbed;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_EMIT_LOC_STRINGS = YES;
+ TARGETED_DEVICE_FAMILY = 3;
+ };
+ name = Release;
+ };
+ EE989E7D2DCD6E7A0036B268 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ BUNDLE_LOADER = "$(TEST_HOST)";
+ CODE_SIGN_STYLE = Automatic;
+ CURRENT_PROJECT_VERSION = 1;
+ GENERATE_INFOPLIST_FILE = YES;
+ MARKETING_VERSION = 1.0;
+ PRODUCT_BUNDLE_IDENTIFIER = org.python.TestbedTests;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_EMIT_LOC_STRINGS = NO;
+ TARGETED_DEVICE_FAMILY = 3;
+ TEST_HOST = "$(BUILT_PRODUCTS_DIR)/tvOSTestbed.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/tvOSTestbed";
+ TVOS_DEPLOYMENT_TARGET = 18.2;
+ };
+ name = Debug;
+ };
+ EE989E7E2DCD6E7A0036B268 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ BUNDLE_LOADER = "$(TEST_HOST)";
+ CODE_SIGN_STYLE = Automatic;
+ CURRENT_PROJECT_VERSION = 1;
+ GENERATE_INFOPLIST_FILE = YES;
+ MARKETING_VERSION = 1.0;
+ PRODUCT_BUNDLE_IDENTIFIER = org.python.TestbedTests;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_EMIT_LOC_STRINGS = NO;
+ TARGETED_DEVICE_FAMILY = 3;
+ TEST_HOST = "$(BUILT_PRODUCTS_DIR)/tvOSTestbed.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/tvOSTestbed";
+ TVOS_DEPLOYMENT_TARGET = 18.2;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ EE989E492DCD6E780036B268 /* Build configuration list for PBXProject "tvOSTestbed" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ EE989E772DCD6E7A0036B268 /* Debug */,
+ EE989E782DCD6E7A0036B268 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ EE989E792DCD6E7A0036B268 /* Build configuration list for PBXNativeTarget "tvOSTestbed" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ EE989E7A2DCD6E7A0036B268 /* Debug */,
+ EE989E7B2DCD6E7A0036B268 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ EE989E7C2DCD6E7A0036B268 /* Build configuration list for PBXNativeTarget "TestbedTests" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ EE989E7D2DCD6E7A0036B268 /* Debug */,
+ EE989E7E2DCD6E7A0036B268 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = EE989E462DCD6E780036B268 /* Project object */;
+}
diff --git a/Platforms/Apple/testbed/tvOSTestbed.xcodeproj/xcshareddata/xcschemes/tvOSTestbed.xcscheme b/Platforms/Apple/testbed/tvOSTestbed.xcodeproj/xcshareddata/xcschemes/tvOSTestbed.xcscheme
new file mode 100644
index 00000000000..c3f3f894a1f
--- /dev/null
+++ b/Platforms/Apple/testbed/tvOSTestbed.xcodeproj/xcshareddata/xcschemes/tvOSTestbed.xcscheme
@@ -0,0 +1,97 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Platforms/Apple/testbed/tvOSTestbed.xctestplan b/Platforms/Apple/testbed/tvOSTestbed.xctestplan
new file mode 100644
index 00000000000..f996facc178
--- /dev/null
+++ b/Platforms/Apple/testbed/tvOSTestbed.xctestplan
@@ -0,0 +1,46 @@
+{
+ "configurations" : [
+ {
+ "id" : "F5A95CE4-1ADE-4A6E-A0E1-CDBAE26DF0C5",
+ "name" : "Test Scheme Action",
+ "options" : {
+
+ }
+ }
+ ],
+ "defaultOptions" : {
+ "commandLineArgumentEntries" : [
+ {
+ "argument" : "test"
+ },
+ {
+ "argument" : "-uall"
+ },
+ {
+ "argument" : "--single-process"
+ },
+ {
+ "argument" : "--rerun"
+ },
+ {
+ "argument" : "-W"
+ }
+ ],
+ "targetForVariableExpansion" : {
+ "containerPath" : "container:tvOSTestbed.xcodeproj",
+ "identifier" : "607A66112B0EFA380010BFC8",
+ "name" : "tvOSTestbed"
+ }
+ },
+ "testTargets" : [
+ {
+ "parallelizable" : false,
+ "target" : {
+ "containerPath" : "container:tvOSTestbed.xcodeproj",
+ "identifier" : "EE989E642DCD6E7A0036B268",
+ "name" : "TestbedTests"
+ }
+ }
+ ],
+ "version" : 1
+}
\ No newline at end of file
diff --git a/Platforms/Apple/testbed/tvOSTestbed/AppDelegate.h b/Platforms/Apple/testbed/tvOSTestbed/AppDelegate.h
new file mode 100644
index 00000000000..112c9ed64b8
--- /dev/null
+++ b/Platforms/Apple/testbed/tvOSTestbed/AppDelegate.h
@@ -0,0 +1,11 @@
+//
+// AppDelegate.h
+// tvOSTestbed
+//
+
+#import
+
+@interface AppDelegate : UIResponder
+
+
+@end
diff --git a/Platforms/Apple/testbed/tvOSTestbed/AppDelegate.m b/Platforms/Apple/testbed/tvOSTestbed/AppDelegate.m
new file mode 100644
index 00000000000..bd91fb2d7d6
--- /dev/null
+++ b/Platforms/Apple/testbed/tvOSTestbed/AppDelegate.m
@@ -0,0 +1,19 @@
+//
+// AppDelegate.m
+// tvOSTestbed
+//
+
+#import "AppDelegate.h"
+
+@interface AppDelegate ()
+
+@end
+
+@implementation AppDelegate
+
+
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
+ return YES;
+}
+
+@end
diff --git a/Platforms/Apple/testbed/tvOSTestbed/Base.lproj/LaunchScreen.storyboard b/Platforms/Apple/testbed/tvOSTestbed/Base.lproj/LaunchScreen.storyboard
new file mode 100644
index 00000000000..660ba53de4f
--- /dev/null
+++ b/Platforms/Apple/testbed/tvOSTestbed/Base.lproj/LaunchScreen.storyboard
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Platforms/Apple/testbed/tvOSTestbed/app/README b/Platforms/Apple/testbed/tvOSTestbed/app/README
new file mode 100644
index 00000000000..46c0e8e2a29
--- /dev/null
+++ b/Platforms/Apple/testbed/tvOSTestbed/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
+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/Platforms/Apple/testbed/tvOSTestbed/app_packages/README b/Platforms/Apple/testbed/tvOSTestbed/app_packages/README
new file mode 100644
index 00000000000..02c2beccfbd
--- /dev/null
+++ b/Platforms/Apple/testbed/tvOSTestbed/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
+Framework form.
+
+When the test suite runs, this folder will be on the PYTHONPATH.
diff --git a/Platforms/Apple/testbed/tvOSTestbed/main.m b/Platforms/Apple/testbed/tvOSTestbed/main.m
new file mode 100644
index 00000000000..d5808fbb933
--- /dev/null
+++ b/Platforms/Apple/testbed/tvOSTestbed/main.m
@@ -0,0 +1,16 @@
+//
+// main.m
+// tvOSTestbed
+//
+
+#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/Platforms/Apple/testbed/tvOSTestbed/tvOSTestbed-Info.plist b/Platforms/Apple/testbed/tvOSTestbed/tvOSTestbed-Info.plist
new file mode 100644
index 00000000000..f08f6098999
--- /dev/null
+++ b/Platforms/Apple/testbed/tvOSTestbed/tvOSTestbed-Info.plist
@@ -0,0 +1,52 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ en
+ CFBundleDisplayName
+ ${PRODUCT_NAME}
+ CFBundleExecutable
+ ${EXECUTABLE_NAME}
+ CFBundleIdentifier
+ org.python.tvOSTestbed
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ ${PRODUCT_NAME}
+ CFBundlePackageType
+ APPL
+ CFBundleShortVersionString
+ 1.0
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ 1
+ LSRequiresIPhoneOS
+
+ UIRequiresFullScreen
+
+ UILaunchStoryboardName
+ Launch Screen
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UIApplicationSceneManifest
+
+ UIApplicationSupportsMultipleScenes
+
+ UISceneConfigurations
+
+
+
+
diff --git a/Platforms/Apple/testbed/visionOSTestbed.xcodeproj/project.pbxproj b/Platforms/Apple/testbed/visionOSTestbed.xcodeproj/project.pbxproj
new file mode 100644
index 00000000000..0fd5df716b1
--- /dev/null
+++ b/Platforms/Apple/testbed/visionOSTestbed.xcodeproj/project.pbxproj
@@ -0,0 +1,558 @@
+// !$*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 */; };
+ 607A66282B0EFA390010BFC8 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 607A66272B0EFA390010BFC8 /* main.m */; };
+ 607A66322B0EFA3A0010BFC8 /* TestbedTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 607A66312B0EFA3A0010BFC8 /* TestbedTests.m */; };
+ 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 */
+ 6077B3D62E82E60C00E3D6A3 /* visionOSTestbed.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = visionOSTestbed.xctestplan; sourceTree = ""; };
+ 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 = ""; };
+ 607A66272B0EFA390010BFC8 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
+ 607A662D2B0EFA3A0010BFC8 /* TestbedTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TestbedTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
+ 607A66312B0EFA3A0010BFC8 /* TestbedTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TestbedTests.m; 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 = (
+ 6077B3D62E82E60C00E3D6A3 /* visionOSTestbed.xctestplan */,
+ EEE9C80C2DAB5ECA0056F8C6 /* Python.xcframework */,
+ 607A66142B0EFA380010BFC8 /* visionOSTestbed */,
+ 607A66302B0EFA3A0010BFC8 /* TestbedTests */,
+ 607A66132B0EFA380010BFC8 /* Products */,
+ 607A664F2B0EFFE00010BFC8 /* Frameworks */,
+ );
+ sourceTree = "";
+ };
+ 607A66132B0EFA380010BFC8 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 607A66122B0EFA380010BFC8 /* visionOSTestbed.app */,
+ 607A662D2B0EFA3A0010BFC8 /* TestbedTests.xctest */,
+ );
+ name = Products;
+ sourceTree = "";
+ };
+ 607A66142B0EFA380010BFC8 /* visionOSTestbed */ = {
+ isa = PBXGroup;
+ children = (
+ 608619552CB7819B00F46182 /* app */,
+ 608619532CB77BA900F46182 /* app_packages */,
+ 607A66592B0F08600010BFC8 /* visionOSTestbed-Info.plist */,
+ 607A66152B0EFA380010BFC8 /* AppDelegate.h */,
+ 607A66162B0EFA380010BFC8 /* AppDelegate.m */,
+ 607A66212B0EFA390010BFC8 /* Assets.xcassets */,
+ 607A66272B0EFA390010BFC8 /* main.m */,
+ );
+ path = visionOSTestbed;
+ sourceTree = "";
+ };
+ 607A66302B0EFA3A0010BFC8 /* TestbedTests */ = {
+ isa = PBXGroup;
+ children = (
+ 607A66312B0EFA3A0010BFC8 /* TestbedTests.m */,
+ );
+ path = TestbedTests;
+ 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 /* Process Python libraries */,
+ 607A664E2B0EFC080010BFC8 /* Embed Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = visionOSTestbed;
+ productName = iOSTestbed;
+ productReference = 607A66122B0EFA380010BFC8 /* visionOSTestbed.app */;
+ productType = "com.apple.product-type.application";
+ };
+ 607A662C2B0EFA3A0010BFC8 /* TestbedTests */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 607A66442B0EFA3A0010BFC8 /* Build configuration list for PBXNativeTarget "TestbedTests" */;
+ buildPhases = (
+ 607A66292B0EFA3A0010BFC8 /* Sources */,
+ 607A662A2B0EFA3A0010BFC8 /* Frameworks */,
+ 607A662B2B0EFA3A0010BFC8 /* Resources */,
+ 607A66522B0EFFE00010BFC8 /* Embed Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 607A662F2B0EFA3A0010BFC8 /* PBXTargetDependency */,
+ );
+ name = TestbedTests;
+ productName = iOSTestbedTests;
+ productReference = 607A662D2B0EFA3A0010BFC8 /* TestbedTests.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 /* TestbedTests */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 607A66102B0EFA380010BFC8 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 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 /* Process Python libraries */ = {
+ isa = PBXShellScriptBuildPhase;
+ alwaysOutOfDate = 1;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputFileListPaths = (
+ );
+ inputPaths = (
+ );
+ name = "Process Python libraries";
+ outputFileListPaths = (
+ );
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "set -e\n\nsource $PROJECT_DIR/Python.xcframework/build/utils.sh\n\ninstall_python Python.xcframework app app_packages\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 /* TestbedTests.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 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.TestbedTests;
+ 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.TestbedTests;
+ 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 "TestbedTests" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 607A66452B0EFA3A0010BFC8 /* Debug */,
+ 607A66462B0EFA3A0010BFC8 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 607A660A2B0EFA380010BFC8 /* Project object */;
+}
diff --git a/Platforms/Apple/testbed/visionOSTestbed.xcodeproj/xcshareddata/xcschemes/visionOSTestbed.xcscheme b/Platforms/Apple/testbed/visionOSTestbed.xcodeproj/xcshareddata/xcschemes/visionOSTestbed.xcscheme
new file mode 100644
index 00000000000..b8397ea7cf1
--- /dev/null
+++ b/Platforms/Apple/testbed/visionOSTestbed.xcodeproj/xcshareddata/xcschemes/visionOSTestbed.xcscheme
@@ -0,0 +1,97 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Platforms/Apple/testbed/visionOSTestbed.xctestplan b/Platforms/Apple/testbed/visionOSTestbed.xctestplan
new file mode 100644
index 00000000000..73a2be8c22a
--- /dev/null
+++ b/Platforms/Apple/testbed/visionOSTestbed.xctestplan
@@ -0,0 +1,46 @@
+{
+ "configurations" : [
+ {
+ "id" : "C17FA044-0B70-48CA-AFF8-BC252081002F",
+ "name" : "Test Scheme Action",
+ "options" : {
+
+ }
+ }
+ ],
+ "defaultOptions" : {
+ "commandLineArgumentEntries" : [
+ {
+ "argument" : "test"
+ },
+ {
+ "argument" : "-uall"
+ },
+ {
+ "argument" : "--single-process"
+ },
+ {
+ "argument" : "--rerun"
+ },
+ {
+ "argument" : "-W"
+ }
+ ],
+ "targetForVariableExpansion" : {
+ "containerPath" : "container:visionOSTestbed.xcodeproj",
+ "identifier" : "607A66112B0EFA380010BFC8",
+ "name" : "visionOSTestbed"
+ }
+ },
+ "testTargets" : [
+ {
+ "parallelizable" : false,
+ "target" : {
+ "containerPath" : "container:visionOSTestbed.xcodeproj",
+ "identifier" : "607A662C2B0EFA3A0010BFC8",
+ "name" : "TestbedTests"
+ }
+ }
+ ],
+ "version" : 1
+}
\ No newline at end of file
diff --git a/Platforms/Apple/testbed/visionOSTestbed/AppDelegate.h b/Platforms/Apple/testbed/visionOSTestbed/AppDelegate.h
new file mode 100644
index 00000000000..8fe7ec8e64e
--- /dev/null
+++ b/Platforms/Apple/testbed/visionOSTestbed/AppDelegate.h
@@ -0,0 +1,11 @@
+//
+// AppDelegate.h
+// visionOSTestbed
+//
+
+#import
+
+@interface AppDelegate : UIResponder
+
+
+@end
diff --git a/Platforms/Apple/testbed/visionOSTestbed/AppDelegate.m b/Platforms/Apple/testbed/visionOSTestbed/AppDelegate.m
new file mode 100644
index 00000000000..b3ff14f7255
--- /dev/null
+++ b/Platforms/Apple/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/Platforms/Apple/testbed/visionOSTestbed/Assets.xcassets/AccentColor.colorset/Contents.json b/Platforms/Apple/testbed/visionOSTestbed/Assets.xcassets/AccentColor.colorset/Contents.json
new file mode 100644
index 00000000000..eb878970081
--- /dev/null
+++ b/Platforms/Apple/testbed/visionOSTestbed/Assets.xcassets/AccentColor.colorset/Contents.json
@@ -0,0 +1,11 @@
+{
+ "colors" : [
+ {
+ "idiom" : "universal"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/Platforms/Apple/testbed/visionOSTestbed/Assets.xcassets/AppIcon.appiconset/Contents.json b/Platforms/Apple/testbed/visionOSTestbed/Assets.xcassets/AppIcon.appiconset/Contents.json
new file mode 100644
index 00000000000..13613e3ee1a
--- /dev/null
+++ b/Platforms/Apple/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/Platforms/Apple/testbed/visionOSTestbed/Assets.xcassets/Contents.json b/Platforms/Apple/testbed/visionOSTestbed/Assets.xcassets/Contents.json
new file mode 100644
index 00000000000..73c00596a7f
--- /dev/null
+++ b/Platforms/Apple/testbed/visionOSTestbed/Assets.xcassets/Contents.json
@@ -0,0 +1,6 @@
+{
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/Platforms/Apple/testbed/visionOSTestbed/app/README b/Platforms/Apple/testbed/visionOSTestbed/app/README
new file mode 100644
index 00000000000..af22c685f87
--- /dev/null
+++ b/Platforms/Apple/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/Platforms/Apple/testbed/visionOSTestbed/app_packages/README b/Platforms/Apple/testbed/visionOSTestbed/app_packages/README
new file mode 100644
index 00000000000..42d7fdeb813
--- /dev/null
+++ b/Platforms/Apple/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/Platforms/Apple/testbed/visionOSTestbed/main.m b/Platforms/Apple/testbed/visionOSTestbed/main.m
new file mode 100644
index 00000000000..2bb491f25c8
--- /dev/null
+++ b/Platforms/Apple/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/Platforms/Apple/testbed/visionOSTestbed/visionOSTestbed-Info.plist b/Platforms/Apple/testbed/visionOSTestbed/visionOSTestbed-Info.plist
new file mode 100644
index 00000000000..fce9298555d
--- /dev/null
+++ b/Platforms/Apple/testbed/visionOSTestbed/visionOSTestbed-Info.plist
@@ -0,0 +1,56 @@
+
+
+
+
+ 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
+ TestArgs
+
+ test
+ -uall
+ --single-process
+ --rerun
+ -W
+
+ UIApplicationSceneManifest
+
+ UIApplicationSupportsMultipleScenes
+
+ UISceneConfigurations
+
+
+ UIRequiresFullScreen
+
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+
+
diff --git a/Platforms/Apple/tvOS/README.rst b/Platforms/Apple/tvOS/README.rst
new file mode 100644
index 00000000000..1f793252caf
--- /dev/null
+++ b/Platforms/Apple/tvOS/README.rst
@@ -0,0 +1,108 @@
+=====================
+Python on tvOS README
+=====================
+
+:Authors:
+ Russell Keith-Magee (2023-11)
+
+This document provides a quick overview of some tvOS specific features in the
+Python distribution.
+
+Compilers for building on tvOS
+==============================
+
+Building for tvOS requires the use of Apple's Xcode tooling. It is strongly
+recommended that you use the most recent stable release of Xcode, on the
+most recently released macOS.
+
+tvOS specific arguments to configure
+===================================
+
+* ``--enable-framework[=DIR]``
+
+ This argument specifies the location where the Python.framework will
+ be installed.
+
+* ``--with-framework-name=NAME``
+
+ Specify the name for the python framework, defaults to ``Python``.
+
+
+Building and using Python on tvOS
+=================================
+
+ABIs and Architectures
+----------------------
+
+tvOS apps can be deployed on physical devices, and on the tvOS simulator.
+Although the API used on these devices is identical, the ABI is different - you
+need to link against different libraries for an tvOS device build
+(``appletvos``) or an tvOS simulator build (``appletvsimulator``). Apple uses
+the XCframework format to allow specifying a single dependency that supports
+multiple ABIs. An XCframework is a wrapper around multiple ABI-specific
+frameworks.
+
+tvOS can also support different CPU architectures within each ABI. At present,
+there is only a single support ed architecture on physical devices - ARM64.
+However, the *simulator* supports 2 architectures - ARM64 (for running on Apple
+Silicon machines), and x86_64 (for running on older Intel-based machines.)
+
+To support multiple CPU architectures on a single platform, Apple uses a "fat
+binary" format - a single physical file that contains support for multiple
+architectures.
+
+How do I build Python for tvOS?
+-------------------------------
+
+The Python build system will build a ``Python.framework`` that supports a
+*single* ABI with a *single* architecture. If you want to use Python in an tvOS
+project, you need to:
+
+1. Produce multiple ``Python.framework`` builds, one for each ABI and architecture;
+2. Merge the binaries for each architecture on a given ABI into a single "fat" binary;
+3. Merge the "fat" frameworks for each ABI into a single XCframework.
+
+tvOS builds of Python *must* be constructed as framework builds. To support this,
+you must provide the ``--enable-framework`` flag when configuring the build.
+
+The build also requires the use of cross-compilation. The commands for building
+Python for tvOS will look somethign like::
+
+ $ ./configure \
+ --enable-framework=/path/to/install \
+ --host=aarch64-apple-tvos \
+ --build=aarch64-apple-darwin \
+ --with-build-python=/path/to/python.exe
+ $ make
+ $ make install
+
+In this invocation:
+
+* ``/path/to/install`` is the location where the final Python.framework will be
+ output.
+
+* ``--host`` is the architecture and ABI that you want to build, in GNU compiler
+ triple format. This will be one of:
+
+ - ``aarch64-apple-tvos`` for ARM64 tvOS devices.
+ - ``aarch64-apple-tvos-simulator`` for the tvOS simulator running on Apple
+ Silicon devices.
+ - ``x86_64-apple-tvos-simulator`` for the tvOS simulator running on Intel
+ devices.
+
+* ``--build`` is the GNU compiler triple for the machine that will be running
+ the compiler. This is one of:
+
+ - ``aarch64-apple-darwin`` for Apple Silicon devices.
+ - ``x86_64-apple-darwin`` for Intel devices.
+
+* ``/path/to/python.exe`` is the path to a Python binary on the machine that
+ will be running the compiler. This is needed because the Python compilation
+ process involves running some Python code. On a normal desktop build of
+ Python, you can compile a python interpreter and then use that interpreter to
+ run Python code. However, the binaries produced for tvOS won't run on macOS, so
+ you need to provide an external Python interpreter. This interpreter must be
+ the version as the Python that is being compiled.
+
+Using a framework-based Python on tvOS
+======================================
diff --git a/Platforms/Apple/tvOS/Resources/Info.plist.in b/Platforms/Apple/tvOS/Resources/Info.plist.in
new file mode 100644
index 00000000000..ab3050804b8
--- /dev/null
+++ b/Platforms/Apple/tvOS/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-2024 Python Software Foundation.
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ 1
+ CFBundleSupportedPlatforms
+
+ tvOS
+
+ MinimumOSVersion
+ @TVOS_DEPLOYMENT_TARGET@
+
+
diff --git a/Platforms/Apple/tvOS/Resources/bin/arm64-apple-tvos-ar b/Platforms/Apple/tvOS/Resources/bin/arm64-apple-tvos-ar
new file mode 100755
index 00000000000..e302748a13c
--- /dev/null
+++ b/Platforms/Apple/tvOS/Resources/bin/arm64-apple-tvos-ar
@@ -0,0 +1,2 @@
+#!/bin/bash
+xcrun --sdk appletvos${TVOS_SDK_VERSION} ar "$@"
diff --git a/Platforms/Apple/tvOS/Resources/bin/arm64-apple-tvos-clang b/Platforms/Apple/tvOS/Resources/bin/arm64-apple-tvos-clang
new file mode 100755
index 00000000000..7fb6d3d901c
--- /dev/null
+++ b/Platforms/Apple/tvOS/Resources/bin/arm64-apple-tvos-clang
@@ -0,0 +1,2 @@
+#!/bin/bash
+xcrun --sdk appletvos${TVOS_SDK_VERSION} clang -target arm64-apple-tvos${TVOS_DEPLOYMENT_TARGET} "$@"
diff --git a/Platforms/Apple/tvOS/Resources/bin/arm64-apple-tvos-clang++ b/Platforms/Apple/tvOS/Resources/bin/arm64-apple-tvos-clang++
new file mode 100755
index 00000000000..33bfb1367c3
--- /dev/null
+++ b/Platforms/Apple/tvOS/Resources/bin/arm64-apple-tvos-clang++
@@ -0,0 +1,2 @@
+#!/bin/bash
+xcrun --sdk appletvos${TVOS_SDK_VERSION} clang++ -target arm64-apple-tvos${TVOS_DEPLOYMENT_TARGET} "$@"
diff --git a/Platforms/Apple/tvOS/Resources/bin/arm64-apple-tvos-cpp b/Platforms/Apple/tvOS/Resources/bin/arm64-apple-tvos-cpp
new file mode 100755
index 00000000000..641c1bc8d18
--- /dev/null
+++ b/Platforms/Apple/tvOS/Resources/bin/arm64-apple-tvos-cpp
@@ -0,0 +1,2 @@
+#!/bin/bash
+xcrun --sdk appletvos${TVOS_SDK_VERSION} clang -target arm64-apple-tvos${TVOS_DEPLOYMENT_TARGET} -E "$@"
diff --git a/Platforms/Apple/tvOS/Resources/bin/arm64-apple-tvos-simulator-ar b/Platforms/Apple/tvOS/Resources/bin/arm64-apple-tvos-simulator-ar
new file mode 100755
index 00000000000..87ef5015aae
--- /dev/null
+++ b/Platforms/Apple/tvOS/Resources/bin/arm64-apple-tvos-simulator-ar
@@ -0,0 +1,2 @@
+#!/bin/bash
+xcrun --sdk appletvsimulator${TVOS_SDK_VERSION} ar "$@"
diff --git a/Platforms/Apple/tvOS/Resources/bin/arm64-apple-tvos-simulator-clang b/Platforms/Apple/tvOS/Resources/bin/arm64-apple-tvos-simulator-clang
new file mode 100755
index 00000000000..c8719cb0318
--- /dev/null
+++ b/Platforms/Apple/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${TVOS_DEPLOYMENT_TARGET}-simulator "$@"
diff --git a/Platforms/Apple/tvOS/Resources/bin/arm64-apple-tvos-simulator-clang++ b/Platforms/Apple/tvOS/Resources/bin/arm64-apple-tvos-simulator-clang++
new file mode 100755
index 00000000000..e3f0e720f7f
--- /dev/null
+++ b/Platforms/Apple/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${TVOS_DEPLOYMENT_TARGET}-simulator "$@"
diff --git a/Platforms/Apple/tvOS/Resources/bin/arm64-apple-tvos-simulator-cpp b/Platforms/Apple/tvOS/Resources/bin/arm64-apple-tvos-simulator-cpp
new file mode 100755
index 00000000000..f9a37b72a61
--- /dev/null
+++ b/Platforms/Apple/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${TVOS_DEPLOYMENT_TARGET}-simulator -E "$@"
diff --git a/Platforms/Apple/tvOS/Resources/bin/arm64-apple-tvos-simulator-strip b/Platforms/Apple/tvOS/Resources/bin/arm64-apple-tvos-simulator-strip
new file mode 100755
index 00000000000..a8cce95233e
--- /dev/null
+++ b/Platforms/Apple/tvOS/Resources/bin/arm64-apple-tvos-simulator-strip
@@ -0,0 +1,2 @@
+#!/bin/sh
+xcrun --sdk appletvsimulator${TVOS_SDK_VERSION} strip -arch arm64 "$@"
diff --git a/Platforms/Apple/tvOS/Resources/bin/arm64-apple-tvos-strip b/Platforms/Apple/tvOS/Resources/bin/arm64-apple-tvos-strip
new file mode 100755
index 00000000000..ee1d2b95ff1
--- /dev/null
+++ b/Platforms/Apple/tvOS/Resources/bin/arm64-apple-tvos-strip
@@ -0,0 +1,2 @@
+#!/bin/sh
+xcrun --sdk iphoneos${TVOS_SDK_VERSION} strip -arch arm64 "$@"
diff --git a/Platforms/Apple/tvOS/Resources/bin/x86_64-apple-tvos-simulator-ar b/Platforms/Apple/tvOS/Resources/bin/x86_64-apple-tvos-simulator-ar
new file mode 100755
index 00000000000..87ef5015aae
--- /dev/null
+++ b/Platforms/Apple/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/Platforms/Apple/tvOS/Resources/bin/x86_64-apple-tvos-simulator-clang b/Platforms/Apple/tvOS/Resources/bin/x86_64-apple-tvos-simulator-clang
new file mode 100755
index 00000000000..ea0cc26cbd9
--- /dev/null
+++ b/Platforms/Apple/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${TVOS_DEPLOYMENT_TARGET}-simulator "$@"
diff --git a/Platforms/Apple/tvOS/Resources/bin/x86_64-apple-tvos-simulator-clang++ b/Platforms/Apple/tvOS/Resources/bin/x86_64-apple-tvos-simulator-clang++
new file mode 100755
index 00000000000..f18f3603169
--- /dev/null
+++ b/Platforms/Apple/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${TVOS_DEPLOYMENT_TARGET}-simulator "$@"
diff --git a/Platforms/Apple/tvOS/Resources/bin/x86_64-apple-tvos-simulator-cpp b/Platforms/Apple/tvOS/Resources/bin/x86_64-apple-tvos-simulator-cpp
new file mode 100755
index 00000000000..b98054d1ce2
--- /dev/null
+++ b/Platforms/Apple/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${TVOS_DEPLOYMENT_TARGET}-simulator -E "$@"
diff --git a/Platforms/Apple/tvOS/Resources/bin/x86_64-apple-tvos-simulator-strip b/Platforms/Apple/tvOS/Resources/bin/x86_64-apple-tvos-simulator-strip
new file mode 100755
index 00000000000..f6a884b4aef
--- /dev/null
+++ b/Platforms/Apple/tvOS/Resources/bin/x86_64-apple-tvos-simulator-strip
@@ -0,0 +1,2 @@
+#!/bin/sh
+xcrun --sdk appletvsimulator${TVOS_SDK_VERSION} strip -arch x86_64 "$@"
diff --git a/Platforms/Apple/tvOS/Resources/pyconfig.h b/Platforms/Apple/tvOS/Resources/pyconfig.h
new file mode 100644
index 00000000000..4acff2c6051
--- /dev/null
+++ b/Platforms/Apple/tvOS/Resources/pyconfig.h
@@ -0,0 +1,7 @@
+#ifdef __arm64__
+#include "pyconfig-arm64.h"
+#endif
+
+#ifdef __x86_64__
+#include "pyconfig-x86_64.h"
+#endif
diff --git a/Platforms/Apple/visionOS/Resources/Info.plist.in b/Platforms/Apple/visionOS/Resources/Info.plist.in
new file mode 100644
index 00000000000..2679440da67
--- /dev/null
+++ b/Platforms/Apple/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/Platforms/Apple/visionOS/Resources/bin/arm64-apple-xros-ar b/Platforms/Apple/visionOS/Resources/bin/arm64-apple-xros-ar
new file mode 100755
index 00000000000..9fd78a205f3
--- /dev/null
+++ b/Platforms/Apple/visionOS/Resources/bin/arm64-apple-xros-ar
@@ -0,0 +1,2 @@
+#!/bin/bash
+xcrun --sdk xros${XROS_SDK_VERSION} ar "$@"
diff --git a/Platforms/Apple/visionOS/Resources/bin/arm64-apple-xros-clang b/Platforms/Apple/visionOS/Resources/bin/arm64-apple-xros-clang
new file mode 100755
index 00000000000..9a1a757cbd0
--- /dev/null
+++ b/Platforms/Apple/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/Platforms/Apple/visionOS/Resources/bin/arm64-apple-xros-clang++ b/Platforms/Apple/visionOS/Resources/bin/arm64-apple-xros-clang++
new file mode 100755
index 00000000000..f64fcfc11cd
--- /dev/null
+++ b/Platforms/Apple/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/Platforms/Apple/visionOS/Resources/bin/arm64-apple-xros-cpp b/Platforms/Apple/visionOS/Resources/bin/arm64-apple-xros-cpp
new file mode 100755
index 00000000000..d6492eff052
--- /dev/null
+++ b/Platforms/Apple/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/Platforms/Apple/visionOS/Resources/bin/arm64-apple-xros-simulator-ar b/Platforms/Apple/visionOS/Resources/bin/arm64-apple-xros-simulator-ar
new file mode 100755
index 00000000000..b202330fb5d
--- /dev/null
+++ b/Platforms/Apple/visionOS/Resources/bin/arm64-apple-xros-simulator-ar
@@ -0,0 +1,2 @@
+#!/bin/bash
+xcrun --sdk xrsimulator${XROS_SDK_VERSION} ar "$@"
diff --git a/Platforms/Apple/visionOS/Resources/bin/arm64-apple-xros-simulator-clang b/Platforms/Apple/visionOS/Resources/bin/arm64-apple-xros-simulator-clang
new file mode 100755
index 00000000000..87b0aba0751
--- /dev/null
+++ b/Platforms/Apple/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/Platforms/Apple/visionOS/Resources/bin/arm64-apple-xros-simulator-clang++ b/Platforms/Apple/visionOS/Resources/bin/arm64-apple-xros-simulator-clang++
new file mode 100755
index 00000000000..c89d48f1cb8
--- /dev/null
+++ b/Platforms/Apple/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/Platforms/Apple/visionOS/Resources/bin/arm64-apple-xros-simulator-cpp b/Platforms/Apple/visionOS/Resources/bin/arm64-apple-xros-simulator-cpp
new file mode 100755
index 00000000000..ee11e018ae0
--- /dev/null
+++ b/Platforms/Apple/visionOS/Resources/bin/arm64-apple-xros-simulator-cpp
@@ -0,0 +1,2 @@
+#!/bin/bash
+xcrun --sdk xrsimulator${XROS_SDK_VERSION} clang -target arm64-apple-xros${XROS_DEPLOYMENT_TARGET}-simulator -E "$@"
diff --git a/Platforms/Apple/visionOS/Resources/bin/arm64-apple-xros-simulator-strip b/Platforms/Apple/visionOS/Resources/bin/arm64-apple-xros-simulator-strip
new file mode 100644
index 00000000000..376aff61a23
--- /dev/null
+++ b/Platforms/Apple/visionOS/Resources/bin/arm64-apple-xros-simulator-strip
@@ -0,0 +1,2 @@
+#!/bin/sh
+xcrun --sdk xrsimulator${XROS_SDK_VERSION} strip -arch arm64 "$@"
diff --git a/Platforms/Apple/visionOS/Resources/bin/arm64-apple-xros-strip b/Platforms/Apple/visionOS/Resources/bin/arm64-apple-xros-strip
new file mode 100644
index 00000000000..2de3ba5d31c
--- /dev/null
+++ b/Platforms/Apple/visionOS/Resources/bin/arm64-apple-xros-strip
@@ -0,0 +1,2 @@
+#!/bin/sh
+xcrun --sdk xros${XROS_SDK_VERSION} strip -arch arm64 "$@"
diff --git a/Platforms/Apple/visionOS/Resources/pyconfig.h b/Platforms/Apple/visionOS/Resources/pyconfig.h
new file mode 100644
index 00000000000..2a433078400
--- /dev/null
+++ b/Platforms/Apple/visionOS/Resources/pyconfig.h
@@ -0,0 +1,3 @@
+#ifdef __arm64__
+#include "pyconfig-arm64.h"
+#endif
diff --git a/Platforms/Apple/watchOS/README.rst b/Platforms/Apple/watchOS/README.rst
new file mode 100644
index 00000000000..35221478452
--- /dev/null
+++ b/Platforms/Apple/watchOS/README.rst
@@ -0,0 +1,108 @@
+========================
+Python on watchOS README
+========================
+
+:Authors:
+ Russell Keith-Magee (2023-11)
+
+This document provides a quick overview of some watchOS specific features in the
+Python distribution.
+
+Compilers for building on watchOS
+=================================
+
+Building for watchOS requires the use of Apple's Xcode tooling. It is strongly
+recommended that you use the most recent stable release of Xcode, on the
+most recently released macOS.
+
+watchOS specific arguments to configure
+=======================================
+
+* ``--enable-framework[=DIR]``
+
+ This argument specifies the location where the Python.framework will
+ be installed.
+
+* ``--with-framework-name=NAME``
+
+ Specify the name for the python framework, defaults to ``Python``.
+
+
+Building and using Python on watchOS
+====================================
+
+ABIs and Architectures
+----------------------
+
+watchOS apps can be deployed on physical devices, and on the watchOS simulator.
+Although the API used on these devices is identical, the ABI is different - you
+need to link against different libraries for an watchOS device build
+(``watchos``) or an watchOS simulator build (``watchsimulator``). Apple uses the
+XCframework format to allow specifying a single dependency that supports
+multiple ABIs. An XCframework is a wrapper around multiple ABI-specific
+frameworks.
+
+watchOS can also support different CPU architectures within each ABI. At present,
+there is only a single support ed architecture on physical devices - ARM64.
+However, the *simulator* supports 2 architectures - ARM64 (for running on Apple
+Silicon machines), and x86_64 (for running on older Intel-based machines.)
+
+To support multiple CPU architectures on a single platform, Apple uses a "fat
+binary" format - a single physical file that contains support for multiple
+architectures.
+
+How do I build Python for watchOS?
+-------------------------------
+
+The Python build system will build a ``Python.framework`` that supports a
+*single* ABI with a *single* architecture. If you want to use Python in an watchOS
+project, you need to:
+
+1. Produce multiple ``Python.framework`` builds, one for each ABI and architecture;
+2. Merge the binaries for each architecture on a given ABI into a single "fat" binary;
+3. Merge the "fat" frameworks for each ABI into a single XCframework.
+
+watchOS builds of Python *must* be constructed as framework builds. To support this,
+you must provide the ``--enable-framework`` flag when configuring the build.
+
+The build also requires the use of cross-compilation. The commands for building
+Python for watchOS will look somethign like::
+
+ $ ./configure \
+ --enable-framework=/path/to/install \
+ --host=aarch64-apple-watchos \
+ --build=aarch64-apple-darwin \
+ --with-build-python=/path/to/python.exe
+ $ make
+ $ make install
+
+In this invocation:
+
+* ``/path/to/install`` is the location where the final Python.framework will be
+ output.
+
+* ``--host`` is the architecture and ABI that you want to build, in GNU compiler
+ triple format. This will be one of:
+
+ - ``arm64_32-apple-watchos`` for ARM64-32 watchOS devices.
+ - ``aarch64-apple-watchos-simulator`` for the watchOS simulator running on Apple
+ Silicon devices.
+ - ``x86_64-apple-watchos-simulator`` for the watchOS simulator running on Intel
+ devices.
+
+* ``--build`` is the GNU compiler triple for the machine that will be running
+ the compiler. This is one of:
+
+ - ``aarch64-apple-darwin`` for Apple Silicon devices.
+ - ``x86_64-apple-darwin`` for Intel devices.
+
+* ``/path/to/python.exe`` is the path to a Python binary on the machine that
+ will be running the compiler. This is needed because the Python compilation
+ process involves running some Python code. On a normal desktop build of
+ Python, you can compile a python interpreter and then use that interpreter to
+ run Python code. However, the binaries produced for watchOS won't run on macOS, so
+ you need to provide an external Python interpreter. This interpreter must be
+ the version as the Python that is being compiled.
+
+Using a framework-based Python on watchOS
+======================================
diff --git a/Platforms/Apple/watchOS/Resources/Info.plist.in b/Platforms/Apple/watchOS/Resources/Info.plist.in
new file mode 100644
index 00000000000..e83ddfd2a43
--- /dev/null
+++ b/Platforms/Apple/watchOS/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
+
+ watchOS
+
+ MinimumOSVersion
+ @WATCHOS_DEPLOYMENT_TARGET@
+
+
diff --git a/Platforms/Apple/watchOS/Resources/bin/arm64-apple-watchos-simulator-ar b/Platforms/Apple/watchOS/Resources/bin/arm64-apple-watchos-simulator-ar
new file mode 100755
index 00000000000..dda2b211bd5
--- /dev/null
+++ b/Platforms/Apple/watchOS/Resources/bin/arm64-apple-watchos-simulator-ar
@@ -0,0 +1,2 @@
+#!/bin/bash
+xcrun --sdk watchsimulator${WATCHOS_SDK_VERSION} ar "$@"
diff --git a/Platforms/Apple/watchOS/Resources/bin/arm64-apple-watchos-simulator-clang b/Platforms/Apple/watchOS/Resources/bin/arm64-apple-watchos-simulator-clang
new file mode 100755
index 00000000000..fe834d3efe4
--- /dev/null
+++ b/Platforms/Apple/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${WATCHOS_DEPLOYMENT_TARGET}-simulator "$@"
diff --git a/Platforms/Apple/watchOS/Resources/bin/arm64-apple-watchos-simulator-clang++ b/Platforms/Apple/watchOS/Resources/bin/arm64-apple-watchos-simulator-clang++
new file mode 100755
index 00000000000..757f3a26d8f
--- /dev/null
+++ b/Platforms/Apple/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${WATCHOS_DEPLOYMENT_TARGET}-simulator "$@"
diff --git a/Platforms/Apple/watchOS/Resources/bin/arm64-apple-watchos-simulator-cpp b/Platforms/Apple/watchOS/Resources/bin/arm64-apple-watchos-simulator-cpp
new file mode 100755
index 00000000000..fdb57d9e010
--- /dev/null
+++ b/Platforms/Apple/watchOS/Resources/bin/arm64-apple-watchos-simulator-cpp
@@ -0,0 +1,2 @@
+#!/bin/bash
+xcrun --sdk watchsimulator clang -target arm64-apple-watchos${WATCHOS_DEPLOYMENT_TARGET}-simulator -E "$@"
diff --git a/Platforms/Apple/watchOS/Resources/bin/arm64-apple-watchos-simulator-strip b/Platforms/Apple/watchOS/Resources/bin/arm64-apple-watchos-simulator-strip
new file mode 100755
index 00000000000..e28e3f7597a
--- /dev/null
+++ b/Platforms/Apple/watchOS/Resources/bin/arm64-apple-watchos-simulator-strip
@@ -0,0 +1,2 @@
+#!/bin/sh
+xcrun --sdk watchsimulator${WATCHOS_SDK_VERSION} strip -arch arm64 "$@"
diff --git a/Platforms/Apple/watchOS/Resources/bin/arm64-apple-watchos-strip b/Platforms/Apple/watchOS/Resources/bin/arm64-apple-watchos-strip
new file mode 100755
index 00000000000..efe5a1260ad
--- /dev/null
+++ b/Platforms/Apple/watchOS/Resources/bin/arm64-apple-watchos-strip
@@ -0,0 +1,2 @@
+#!/bin/sh
+xcrun --sdk watchos${WATCHOS_SDK_VERSION} strip -arch arm64 "$@"
diff --git a/Platforms/Apple/watchOS/Resources/bin/arm64_32-apple-watchos-ar b/Platforms/Apple/watchOS/Resources/bin/arm64_32-apple-watchos-ar
new file mode 100755
index 00000000000..029f9a32073
--- /dev/null
+++ b/Platforms/Apple/watchOS/Resources/bin/arm64_32-apple-watchos-ar
@@ -0,0 +1,2 @@
+#!/bin/bash
+xcrun --sdk watchos${WATCHOS_SDK_VERSION} ar "$@"
diff --git a/Platforms/Apple/watchOS/Resources/bin/arm64_32-apple-watchos-clang b/Platforms/Apple/watchOS/Resources/bin/arm64_32-apple-watchos-clang
new file mode 100755
index 00000000000..285036d4010
--- /dev/null
+++ b/Platforms/Apple/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${WATCHOS_DEPLOYMENT_TARGET} "$@"
diff --git a/Platforms/Apple/watchOS/Resources/bin/arm64_32-apple-watchos-clang++ b/Platforms/Apple/watchOS/Resources/bin/arm64_32-apple-watchos-clang++
new file mode 100755
index 00000000000..c8f60ebec51
--- /dev/null
+++ b/Platforms/Apple/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${WATCHOS_DEPLOYMENT_TARGET} "$@"
diff --git a/Platforms/Apple/watchOS/Resources/bin/arm64_32-apple-watchos-cpp b/Platforms/Apple/watchOS/Resources/bin/arm64_32-apple-watchos-cpp
new file mode 100755
index 00000000000..b411fc25aa4
--- /dev/null
+++ b/Platforms/Apple/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${WATCHOS_DEPLOYMENT_TARGET} -E "$@"
diff --git a/Platforms/Apple/watchOS/Resources/bin/x86_64-apple-watchos-simulator-ar b/Platforms/Apple/watchOS/Resources/bin/x86_64-apple-watchos-simulator-ar
new file mode 100755
index 00000000000..dda2b211bd5
--- /dev/null
+++ b/Platforms/Apple/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/Platforms/Apple/watchOS/Resources/bin/x86_64-apple-watchos-simulator-clang b/Platforms/Apple/watchOS/Resources/bin/x86_64-apple-watchos-simulator-clang
new file mode 100755
index 00000000000..4776b9b5348
--- /dev/null
+++ b/Platforms/Apple/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${WATCHOS_DEPLOYMENT_TARGET}-simulator "$@"
diff --git a/Platforms/Apple/watchOS/Resources/bin/x86_64-apple-watchos-simulator-clang++ b/Platforms/Apple/watchOS/Resources/bin/x86_64-apple-watchos-simulator-clang++
new file mode 100755
index 00000000000..e9b0c5f4b87
--- /dev/null
+++ b/Platforms/Apple/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${WATCHOS_DEPLOYMENT_TARGET}-simulator "$@"
diff --git a/Platforms/Apple/watchOS/Resources/bin/x86_64-apple-watchos-simulator-cpp b/Platforms/Apple/watchOS/Resources/bin/x86_64-apple-watchos-simulator-cpp
new file mode 100755
index 00000000000..d3b821c5f7f
--- /dev/null
+++ b/Platforms/Apple/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${WATCHOS_DEPLOYMENT_TARGET}-simulator -E "$@"
diff --git a/Platforms/Apple/watchOS/Resources/bin/x86_64-apple-watchos-simulator-strip b/Platforms/Apple/watchOS/Resources/bin/x86_64-apple-watchos-simulator-strip
new file mode 100755
index 00000000000..105c78281f9
--- /dev/null
+++ b/Platforms/Apple/watchOS/Resources/bin/x86_64-apple-watchos-simulator-strip
@@ -0,0 +1,2 @@
+#!/bin/sh
+xcrun --sdk watchsimulator${WATCHOS_SDK_VERSION} strip -arch x86_64 "$@"
diff --git a/Platforms/Apple/watchOS/Resources/pyconfig.h b/Platforms/Apple/watchOS/Resources/pyconfig.h
new file mode 100644
index 00000000000..f842b987b2e
--- /dev/null
+++ b/Platforms/Apple/watchOS/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/config.sub b/config.sub
index 1bb6a05dc11..49febd56a37 100755
--- a/config.sub
+++ b/config.sub
@@ -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 --git a/configure b/configure
index a68a98c5a4d..a34d4986bbe 100755
--- a/configure
+++ b/configure
@@ -994,6 +994,10 @@
CFLAGS
CC
HAS_XCRUN
+EXPORT_XROS_DEPLOYMENT_TARGET
+WATCHOS_DEPLOYMENT_TARGET
+XROS_DEPLOYMENT_TARGET
+TVOS_DEPLOYMENT_TARGET
IPHONEOS_DEPLOYMENT_TARGET
EXPORT_MACOSX_DEPLOYMENT_TARGET
CONFIGURE_MACOSX_DEPLOYMENT_TARGET
@@ -4161,6 +4165,15 @@
*-apple-ios*)
ac_sys_system=iOS
;;
+ *-apple-tvos*)
+ ac_sys_system=tvOS
+ ;;
+ *-apple-xros*)
+ ac_sys_system=visionOS
+ ;;
+ *-apple-watchos*)
+ ac_sys_system=watchOS
+ ;;
*-*-darwin*)
ac_sys_system=Darwin
;;
@@ -4245,7 +4258,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.
#
-# On iOS, this results in binaries like "arm64-apple-ios13.0-simulator-gcc",
+# On iOS/tvOS/visionOS/watchOS, 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
@@ -4260,6 +4273,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 ;;
+
+ aarch64-apple-tvos*-simulator) AR=arm64-apple-tvos-simulator-ar ;;
+ aarch64-apple-tvos*) AR=arm64-apple-tvos-ar ;;
+ x86_64-apple-tvos*-simulator) AR=x86_64-apple-tvos-simulator-ar ;;
+
+ aarch64-apple-xros*-simulator) AR=arm64-apple-xros-simulator-ar ;;
+ aarch64-apple-xros*) AR=arm64-apple-xros-ar ;;
+
+ 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 ;;
*)
esac
fi
@@ -4268,6 +4292,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 ;;
+
+ aarch64-apple-tvos*-simulator) CC=arm64-apple-tvos-simulator-clang ;;
+ aarch64-apple-tvos*) CC=arm64-apple-tvos-clang ;;
+ x86_64-apple-tvos*-simulator) CC=x86_64-apple-tvos-simulator-clang ;;
+
+ aarch64-apple-xros*-simulator) CC=arm64-apple-xros-simulator-clang ;;
+ aarch64-apple-xros*) CC=arm64-apple-xros-clang ;;
+
+ 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 ;;
*)
esac
fi
@@ -4276,6 +4311,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 ;;
+
+ aarch64-apple-tvos*-simulator) CPP=arm64-apple-tvos-simulator-cpp ;;
+ aarch64-apple-tvos*) CPP=arm64-apple-tvos-cpp ;;
+ x86_64-apple-tvos*-simulator) CPP=x86_64-apple-tvos-simulator-cpp ;;
+
+ aarch64-apple-xros*-simulator) CPP=arm64-apple-xros-simulator-cpp ;;
+ aarch64-apple-xros*) CPP=arm64-apple-xros-cpp ;;
+
+ 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 ;;
*)
esac
fi
@@ -4284,6 +4330,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++ ;;
+
+ aarch64-apple-tvos*-simulator) CXX=arm64-apple-tvos-simulator-clang++ ;;
+ aarch64-apple-tvos*) CXX=arm64-apple-tvos-clang++ ;;
+ x86_64-apple-tvos*-simulator) CXX=x86_64-apple-tvos-simulator-clang++ ;;
+
+ aarch64-apple-xros*-simulator) CXX=arm64-apple-xros-simulator-clang++ ;;
+ aarch64-apple-xros*) CXX=arm64-apple-xros-clang++ ;;
+
+ 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++ ;;
*)
esac
fi
@@ -4406,8 +4463,11 @@
case $enableval in
yes)
case $ac_sys_system in
- Darwin) enableval=/Library/Frameworks ;;
- iOS) enableval=Platforms/Apple/iOS/Frameworks/\$\(MULTIARCH\) ;;
+ Darwin) enableval=/Library/Frameworks ;;
+ iOS) enableval=Platforms/Apple/iOS/Frameworks/\$\(MULTIARCH\) ;;
+ tvOS) enableval=Platforms/Apple/tvOS/Frameworks/\$\(MULTIARCH\) ;;
+ visionOS) enableval=Platforms/Apple/visionOS/Frameworks/\$\(MULTIARCH\) ;;
+ watchOS) enableval=Platforms/Apple/watchOS/Frameworks/\$\(MULTIARCH\) ;;
*) as_fn_error $? "Unknown platform for framework build" "$LINENO" 5
esac
esac
@@ -4416,6 +4476,9 @@
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 ;;
+ visionOS) as_fn_error $? "visionOS builds must use --enable-framework" "$LINENO" 5 ;;
+ watchOS) as_fn_error $? "watchOS builds must use --enable-framework" "$LINENO" 5 ;;
*)
PYTHONFRAMEWORK=
PYTHONFRAMEWORKDIR=no-framework
@@ -4522,6 +4585,51 @@
ac_config_files="$ac_config_files Platforms/Apple/iOS/Resources/Info.plist"
+ ;;
+ tvOS) :
+ FRAMEWORKINSTALLFIRST="frameworkinstallunversionedstructure"
+ FRAMEWORKALTINSTALLFIRST="frameworkinstallunversionedstructure "
+ FRAMEWORKINSTALLLAST="frameworkinstallmobileheaders"
+ FRAMEWORKALTINSTALLLAST="frameworkinstallmobileheaders"
+ FRAMEWORKPYTHONW=
+ INSTALLTARGETS="libinstall inclinstall sharedinstall"
+
+ prefix=$PYTHONFRAMEWORKPREFIX
+ PYTHONFRAMEWORKINSTALLNAMEPREFIX="@rpath/$PYTHONFRAMEWORKDIR"
+ RESSRCDIR=Platforms/Apple/tvOS/Resources
+
+ ac_config_files="$ac_config_files Platforms/Apple/tvOS/Resources/Info.plist"
+
+ ;;
+ visionOS) :
+ FRAMEWORKINSTALLFIRST="frameworkinstallunversionedstructure"
+ FRAMEWORKALTINSTALLFIRST="frameworkinstallunversionedstructure "
+ FRAMEWORKINSTALLLAST="frameworkinstallmobileheaders"
+ FRAMEWORKALTINSTALLLAST="frameworkinstallmobileheaders"
+ FRAMEWORKPYTHONW=
+ INSTALLTARGETS="libinstall inclinstall sharedinstall"
+
+ prefix=$PYTHONFRAMEWORKPREFIX
+ PYTHONFRAMEWORKINSTALLNAMEPREFIX="@rpath/$PYTHONFRAMEWORKDIR"
+ RESSRCDIR=Platforms/Apple/visionOS/Resources
+
+ ac_config_files="$ac_config_files Platforms/Apple/visionOS/Resources/Info.plist"
+
+ ;;
+ watchOS) :
+ FRAMEWORKINSTALLFIRST="frameworkinstallunversionedstructure"
+ FRAMEWORKALTINSTALLFIRST="frameworkinstallunversionedstructure "
+ FRAMEWORKINSTALLLAST="frameworkinstallmobileheaders"
+ FRAMEWORKALTINSTALLLAST="frameworkinstallmobileheaders"
+ FRAMEWORKPYTHONW=
+ INSTALLTARGETS="libinstall inclinstall sharedinstall"
+
+ prefix=$PYTHONFRAMEWORKPREFIX
+ PYTHONFRAMEWORKINSTALLNAMEPREFIX="@rpath/$PYTHONFRAMEWORKDIR"
+ RESSRCDIR=Platforms/Apple/watchOS/Resources
+
+ ac_config_files="$ac_config_files Platforms/Apple/watchOS/Resources/Info.plist"
+
;;
*)
as_fn_error $? "Unknown platform for framework build" "$LINENO" 5
@@ -4533,6 +4641,9 @@
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 ;;
+ visionOS) as_fn_error $? "visionOS builds must use --enable-framework" "$LINENO" 5 ;;
+ watchOS) as_fn_error $? "watchOS builds must use --enable-framework" "$LINENO" 5 ;;
*)
PYTHONFRAMEWORK=
PYTHONFRAMEWORKDIR=no-framework
@@ -4587,8 +4698,8 @@
case "$withval" in
yes)
case $ac_sys_system in
- Darwin|iOS)
- # iOS is able to share the macOS patch
+ Darwin|iOS|tvOS|visionOS|watchOS)
+ # iOS/tvOS/visionOS/watchOS 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 ;;
@@ -4606,8 +4717,8 @@
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|visionOS|watchOS)
+ # Always apply the compliance patch on iOS/tvOS/visionOS/watchOS; 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; }
@@ -4625,6 +4736,8 @@
+EXPORT_XROS_DEPLOYMENT_TARGET='#'
+
if test "$cross_compiling" = yes; then
case "$host" in
@@ -4665,6 +4778,78 @@
;;
esac
;;
+ *-apple-tvos*)
+ _host_os=`echo $host | cut -d '-' -f3`
+ _host_device=`echo $host | cut -d '-' -f4`
+ _host_device=${_host_device:=os}
+
+ # TVOS_DEPLOYMENT_TARGET is the minimum supported tvOS version
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking tvOS deployment target" >&5
+printf %s "checking tvOS deployment target... " >&6; }
+ TVOS_DEPLOYMENT_TARGET=${_host_os:4}
+ TVOS_DEPLOYMENT_TARGET=${TVOS_DEPLOYMENT_TARGET:=12.0}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $TVOS_DEPLOYMENT_TARGET" >&5
+printf "%s\n" "$TVOS_DEPLOYMENT_TARGET" >&6; }
+
+ case "$host_cpu" in
+ aarch64)
+ _host_ident=${TVOS_DEPLOYMENT_TARGET}-arm64-appletv${_host_device}
+ ;;
+ *)
+ _host_ident=${TVOS_DEPLOYMENT_TARGET}-$host_cpu-appletv${_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 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; }
+ { 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)
+ _host_ident=${XROS_DEPLOYMENT_TARGET}-arm64-xr${_host_device}
+ ;;
+ *)
+ _host_ident=${XROS_DEPLOYMENT_TARGET}-$host_cpu-xr${_host_device}
+ ;;
+ esac
+ ;;
+ *-apple-watchos*)
+ _host_os=`echo $host | cut -d '-' -f3`
+ _host_device=`echo $host | cut -d '-' -f4`
+ _host_device=${_host_device:=os}
+
+ # WATCHOS_DEPLOYMENT_TARGET is the minimum supported watchOS version
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking watchOS deployment target" >&5
+printf %s "checking watchOS deployment target... " >&6; }
+ WATCHOS_DEPLOYMENT_TARGET=${_host_os:7}
+ WATCHOS_DEPLOYMENT_TARGET=${WATCHOS_DEPLOYMENT_TARGET:=4.0}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $WATCHOS_DEPLOYMENT_TARGET" >&5
+printf "%s\n" "$WATCHOS_DEPLOYMENT_TARGET" >&6; }
+
+ case "$host_cpu" in
+ aarch64)
+ _host_ident=${WATCHOS_DEPLOYMENT_TARGET}-arm64-watch${_host_device}
+ ;;
+ *)
+ _host_ident=${WATCHOS_DEPLOYMENT_TARGET}-$host_cpu-watch${_host_device}
+ ;;
+ esac
+ ;;
*-*-darwin*)
case "$host_cpu" in
arm*)
@@ -4755,9 +4940,15 @@
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/visionOS/watchOS, defining _POSIX_C_SOURCE also disables platform specific features.
iOS/*)
define_xopen_source=no;;
+ tvOS/*)
+ define_xopen_source=no;;
+ visionOS/*)
+ define_xopen_source=no;;
+ watchOS/*)
+ define_xopen_source=no;;
# On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
# defining NI_NUMERICHOST.
QNX/6.3.2)
@@ -4820,7 +5011,14 @@
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 /
+# XROS_DEPLOYMENT_TARGET / WATCHOS_DEPLOYMENT_TARGET enforced by the selected host triple.
+
+
+
+
+
+# XROS_DEPLOYMENT_TARGET should get exported
# checks for alternative programs
@@ -4866,6 +5064,26 @@
as_fn_append CFLAGS " -mios-version-min=${IPHONEOS_DEPLOYMENT_TARGET}"
as_fn_append LDFLAGS " -mios-version-min=${IPHONEOS_DEPLOYMENT_TARGET}"
;; #(
+ *-apple-tvos*-simulator) :
+
+ as_fn_append CFLAGS " -mtvos-simulator-version-min=${TVOS_DEPLOYMENT_TARGET}"
+ as_fn_append LDFLAGS " -mtvos-simulator-version-min=${TVOS_DEPLOYMENT_TARGET}"
+ ;; #(
+ *-apple-tvos*) :
+
+ as_fn_append CFLAGS " -mtvos-version-min=${TVOS_DEPLOYMENT_TARGET}"
+ as_fn_append LDFLAGS " -mtvos-version-min=${TVOS_DEPLOYMENT_TARGET}"
+ ;; #(
+ *-apple-watchos*-simulator) :
+
+ as_fn_append CFLAGS " -mwatchos-simulator-version-min=${WATCHOS_DEPLOYMENT_TARGET}"
+ as_fn_append LDFLAGS " -mwatchos-simulator-version-min=${WATCHOS_DEPLOYMENT_TARGET}"
+ ;; #(
+ *-apple-watchos*) :
+
+ as_fn_append CFLAGS " -mwatchos-version-min=${WATCHOS_DEPLOYMENT_TARGET}"
+ as_fn_append LDFLAGS " -mwatchos-version-min=${WATCHOS_DEPLOYMENT_TARGET}"
+ ;; #(
*) :
;;
esac
@@ -7235,6 +7453,12 @@
MULTIARCH="" ;; #(
iOS) :
MULTIARCH="" ;; #(
+ tvOS) :
+ MULTIARCH="" ;; #(
+ visionOS) :
+ MULTIARCH="" ;; #(
+ watchOS) :
+ MULTIARCH="" ;; #(
FreeBSD*) :
MULTIARCH="" ;; #(
*) :
@@ -7255,7 +7479,7 @@
printf "%s\n" "$MULTIARCH" >&6; }
case $ac_sys_system in #(
- iOS) :
+ iOS|tvOS|visionOS|watchOS) :
SOABI_PLATFORM=`echo "$PLATFORM_TRIPLET" | cut -d '-' -f2` ;; #(
*) :
SOABI_PLATFORM=$PLATFORM_TRIPLET
@@ -7324,6 +7548,18 @@
PY_SUPPORT_TIER=3 ;; #(
aarch64-apple-ios*/clang) :
PY_SUPPORT_TIER=3 ;; #(
+ aarch64-apple-tvos*-simulator/clang) :
+ PY_SUPPORT_TIER=3 ;; #(
+ aarch64-apple-tvos*/clang) :
+ PY_SUPPORT_TIER=3 ;; #(
+ aarch64-apple-xros*-simulator/clang) :
+ PY_SUPPORT_TIER=3 ;; #(
+ aarch64-apple-xros*/clang) :
+ PY_SUPPORT_TIER=3 ;; #(
+ aarch64-apple-watchos*-simulator/clang) :
+ PY_SUPPORT_TIER=3 ;; #(
+ arm64_32-apple-watchos*/clang) :
+ PY_SUPPORT_TIER=3 ;; #(
aarch64-*-linux-android/clang) :
PY_SUPPORT_TIER=3 ;; #(
x86_64-*-linux-android/clang) :
@@ -7778,7 +8014,7 @@
case $ac_sys_system in
Darwin)
LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)';;
- iOS)
+ iOS|tvOS|visionOS|watchOS)
LDLIBRARY='$(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK)';;
*)
as_fn_error $? "Unknown platform for framework build" "$LINENO" 5;;
@@ -7844,7 +8080,7 @@
BLDLIBRARY='-L. -lpython$(LDVERSION)'
RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
;;
- iOS)
+ iOS|tvOS|visionOS|watchOS)
LDLIBRARY='libpython$(LDVERSION).dylib'
;;
AIX*)
@@ -14196,7 +14432,7 @@
BLDSHARED="$LDSHARED"
fi
;;
- iOS/*)
+ iOS/*|tvOS/*|visionOS/*|watchOS/*)
LDSHARED='$(CC) -dynamiclib -F . -framework $(PYTHONFRAMEWORK)'
LDCXXSHARED='$(CXX) -dynamiclib -F . -framework $(PYTHONFRAMEWORK)'
BLDSHARED="$LDSHARED"
@@ -14329,7 +14565,7 @@
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/*|visionOS/*|watchOS/*)
LINKFORSHARED="$extra_undefs -framework CoreFoundation"
# Issue #18075: the default maximum stack size (8MBytes) is too
@@ -14353,7 +14589,7 @@
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" = "visionOS" -o "$ac_sys_system" = "watchOS"; then
LINKFORSHARED="-Wl,-stack_size,$stack_size $LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK)'
fi
;;
@@ -16182,7 +16418,7 @@
ctypes_malloc_closure=yes
;; #(
- iOS) :
+ iOS|tvOS|visionOS|watchOS) :
ctypes_malloc_closure=yes
;; #(
@@ -20055,12 +20291,6 @@
then :
printf "%s\n" "#define HAVE_DUP 1" >>confdefs.h
-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
ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero"
if test "x$ac_cv_func_explicit_bzero" = xyes
@@ -20121,18 +20351,6 @@
then :
printf "%s\n" "#define HAVE_FEXECVE 1" >>confdefs.h
-fi
-ac_fn_c_check_func "$LINENO" "fork" "ac_cv_func_fork"
-if test "x$ac_cv_func_fork" = xyes
-then :
- printf "%s\n" "#define HAVE_FORK 1" >>confdefs.h
-
-fi
-ac_fn_c_check_func "$LINENO" "fork1" "ac_cv_func_fork1"
-if test "x$ac_cv_func_fork1" = xyes
-then :
- printf "%s\n" "#define HAVE_FORK1 1" >>confdefs.h
-
fi
ac_fn_c_check_func "$LINENO" "fpathconf" "ac_cv_func_fpathconf"
if test "x$ac_cv_func_fpathconf" = xyes
@@ -20565,24 +20783,6 @@
then :
printf "%s\n" "#define HAVE_POSIX_OPENPT 1" >>confdefs.h
-fi
-ac_fn_c_check_func "$LINENO" "posix_spawn" "ac_cv_func_posix_spawn"
-if test "x$ac_cv_func_posix_spawn" = xyes
-then :
- printf "%s\n" "#define HAVE_POSIX_SPAWN 1" >>confdefs.h
-
-fi
-ac_fn_c_check_func "$LINENO" "posix_spawnp" "ac_cv_func_posix_spawnp"
-if test "x$ac_cv_func_posix_spawnp" = xyes
-then :
- printf "%s\n" "#define HAVE_POSIX_SPAWNP 1" >>confdefs.h
-
-fi
-ac_fn_c_check_func "$LINENO" "posix_spawn_file_actions_addclosefrom_np" "ac_cv_func_posix_spawn_file_actions_addclosefrom_np"
-if test "x$ac_cv_func_posix_spawn_file_actions_addclosefrom_np" = xyes
-then :
- printf "%s\n" "#define HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSEFROM_NP 1" >>confdefs.h
-
fi
ac_fn_c_check_func "$LINENO" "pread" "ac_cv_func_pread"
if test "x$ac_cv_func_pread" = xyes
@@ -20901,12 +21101,6 @@
then :
printf "%s\n" "#define HAVE_SIGACTION 1" >>confdefs.h
-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
ac_fn_c_check_func "$LINENO" "sigfillset" "ac_cv_func_sigfillset"
if test "x$ac_cv_func_sigfillset" = xyes
@@ -21197,18 +21391,12 @@
fi
-# iOS defines some system methods that can be linked (so they are
+# iOS/tvOS/visionOS/watchOS 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_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3"
-if test "x$ac_cv_func_dup3" = xyes
-then :
- printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h
-
-fi
-ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy"
+if test "$ac_sys_system" != "iOS" -a "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "visionOS" -a "$ac_sys_system" != "watchOS" ; then
+ ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy"
if test "x$ac_cv_func_getentropy" = xyes
then :
printf "%s\n" "#define HAVE_GETENTROPY 1" >>confdefs.h
@@ -21219,6 +21407,24 @@
then :
printf "%s\n" "#define HAVE_GETGROUPS 1" >>confdefs.h
+fi
+ac_fn_c_check_func "$LINENO" "system" "ac_cv_func_system"
+if test "x$ac_cv_func_system" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYSTEM 1" >>confdefs.h
+
+fi
+
+fi
+# In addition, macOS introduced dup3 and pipe2 in macOS 27, late in the
+# lifetime of this version of Python. Rather than adding weaklinking
+# support for them, just continue to ignore them.
+if test "$ac_sys_system" != "iOS" -a "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "visionOS" -a "$ac_sys_system" != "watchOS" -a "$ac_sys_system" != "Darwin"; then
+ ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3"
+if test "x$ac_cv_func_dup3" = xyes
+then :
+ printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h
+
fi
ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
if test "x$ac_cv_func_pipe2" = xyes
@@ -21226,10 +21432,51 @@
printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h
fi
-ac_fn_c_check_func "$LINENO" "system" "ac_cv_func_system"
-if test "x$ac_cv_func_system" = xyes
+
+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
+ 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_SYSTEM 1" >>confdefs.h
+ printf "%s\n" "#define HAVE_EXECV 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "fork" "ac_cv_func_fork"
+if test "x$ac_cv_func_fork" = xyes
+then :
+ printf "%s\n" "#define HAVE_FORK 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "fork1" "ac_cv_func_fork1"
+if test "x$ac_cv_func_fork1" = xyes
+then :
+ printf "%s\n" "#define HAVE_FORK1 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "posix_spawn" "ac_cv_func_posix_spawn"
+if test "x$ac_cv_func_posix_spawn" = xyes
+then :
+ printf "%s\n" "#define HAVE_POSIX_SPAWN 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "posix_spawnp" "ac_cv_func_posix_spawnp"
+if test "x$ac_cv_func_posix_spawnp" = xyes
+then :
+ printf "%s\n" "#define HAVE_POSIX_SPAWNP 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "posix_spawn_file_actions_addclosefrom_np" "ac_cv_func_posix_spawn_file_actions_addclosefrom_np"
+if test "x$ac_cv_func_posix_spawn_file_actions_addclosefrom_np" = xyes
+then :
+ printf "%s\n" "#define HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSEFROM_NP 1" >>confdefs.h
+
+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
@@ -24687,7 +24934,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
for ac_func in openpty
do :
@@ -24801,7 +25049,7 @@
fi
done
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing login_tty" >&5
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing login_tty" >&5
printf %s "checking for library containing login_tty... " >&6; }
if test ${ac_cv_search_login_tty+y}
then :
@@ -24984,6 +25232,7 @@
fi
done
+fi
# check for long file support functions
ac_fn_c_check_func "$LINENO" "fseek64" "ac_cv_func_fseek64"
@@ -25249,10 +25498,10 @@
done
-# On Android and iOS, clock_settime can be linked (so it is found by
+# On Android, iOS, tvOS, visionOS, and watchOS, 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" != "visionOS" -a "$ac_sys_system" != "watchOS"
then
for ac_func in clock_settime
@@ -25569,7 +25818,7 @@
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" = "visionOS" || test "$ac_sys_system" = "watchOS"; then
ac_cv_buggy_getaddrinfo="no"
elif test "${enable_ipv6+set}" = set; then
ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
@@ -27647,8 +27896,8 @@
LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
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 = "visionOS" -o $ac_sys_system = "watchOS"; then
MODULE_DEPS_SHARED="$MODULE_DEPS_SHARED \$(PYTHONFRAMEWORKDIR)/\$(PYTHONFRAMEWORK)"
fi
@@ -30767,7 +31016,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" = "visionOS" -o "$ac_sys_system" = "watchOS" ; then
ac_cv_file__dev_ptmx=no
ac_cv_file__dev_ptc=no
else
@@ -31321,7 +31570,7 @@
with_ensurepip=no ;; #(
WASI) :
with_ensurepip=no ;; #(
- iOS) :
+ iOS|tvOS|visionOS|watchOS) :
with_ensurepip=no ;; #(
*) :
with_ensurepip=upgrade
@@ -32271,6 +32520,9 @@
NetBSD*) _PYTHREAD_NAME_MAXLEN=15;; # gh-131268
Darwin) _PYTHREAD_NAME_MAXLEN=63;;
iOS) _PYTHREAD_NAME_MAXLEN=63;;
+ tvOS) _PYTHREAD_NAME_MAXLEN=63;;
+ visionOS) _PYTHREAD_NAME_MAXLEN=63;;
+ watchOS) _PYTHREAD_NAME_MAXLEN=63;;
FreeBSD*) _PYTHREAD_NAME_MAXLEN=19;; # gh-131268
OpenBSD*) _PYTHREAD_NAME_MAXLEN=23;; # gh-131268
*) _PYTHREAD_NAME_MAXLEN=;;
@@ -32302,7 +32554,7 @@
;; #(
Darwin) :
;; #(
- iOS) :
+ iOS|tvOS|visionOS|watchOS) :
@@ -36605,6 +36857,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" ;;
"Platforms/Apple/iOS/Resources/Info.plist") CONFIG_FILES="$CONFIG_FILES Platforms/Apple/iOS/Resources/Info.plist" ;;
+ "Platforms/Apple/tvOS/Resources/Info.plist") CONFIG_FILES="$CONFIG_FILES Platforms/Apple/tvOS/Resources/Info.plist" ;;
+ "Platforms/Apple/visionOS/Resources/Info.plist") CONFIG_FILES="$CONFIG_FILES Platforms/Apple/visionOS/Resources/Info.plist" ;;
+ "Platforms/Apple/watchOS/Resources/Info.plist") CONFIG_FILES="$CONFIG_FILES Platforms/Apple/watchOS/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 ed8b53dd3a4..4f455a475e8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -339,6 +339,15 @@
*-apple-ios*)
ac_sys_system=iOS
;;
+ *-apple-tvos*)
+ ac_sys_system=tvOS
+ ;;
+ *-apple-xros*)
+ ac_sys_system=visionOS
+ ;;
+ *-apple-watchos*)
+ ac_sys_system=watchOS
+ ;;
*-*-darwin*)
ac_sys_system=Darwin
;;
@@ -417,7 +426,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.
#
-# On iOS, this results in binaries like "arm64-apple-ios13.0-simulator-gcc",
+# On iOS/tvOS/visionOS/watchOS, 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
@@ -432,6 +441,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 ;;
+
+ aarch64-apple-tvos*-simulator) AR=arm64-apple-tvos-simulator-ar ;;
+ aarch64-apple-tvos*) AR=arm64-apple-tvos-ar ;;
+ x86_64-apple-tvos*-simulator) AR=x86_64-apple-tvos-simulator-ar ;;
+
+ aarch64-apple-xros*-simulator) AR=arm64-apple-xros-simulator-ar ;;
+ aarch64-apple-xros*) AR=arm64-apple-xros-ar ;;
+
+ 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 ;;
*)
esac
fi
@@ -440,6 +460,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 ;;
+
+ aarch64-apple-tvos*-simulator) CC=arm64-apple-tvos-simulator-clang ;;
+ aarch64-apple-tvos*) CC=arm64-apple-tvos-clang ;;
+ x86_64-apple-tvos*-simulator) CC=x86_64-apple-tvos-simulator-clang ;;
+
+ aarch64-apple-xros*-simulator) CC=arm64-apple-xros-simulator-clang ;;
+ aarch64-apple-xros*) CC=arm64-apple-xros-clang ;;
+
+ 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 ;;
*)
esac
fi
@@ -448,6 +479,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 ;;
+
+ aarch64-apple-tvos*-simulator) CPP=arm64-apple-tvos-simulator-cpp ;;
+ aarch64-apple-tvos*) CPP=arm64-apple-tvos-cpp ;;
+ x86_64-apple-tvos*-simulator) CPP=x86_64-apple-tvos-simulator-cpp ;;
+
+ aarch64-apple-xros*-simulator) CPP=arm64-apple-xros-simulator-cpp ;;
+ aarch64-apple-xros*) CPP=arm64-apple-xros-cpp ;;
+
+ 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 ;;
*)
esac
fi
@@ -456,6 +498,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++ ;;
+
+ aarch64-apple-tvos*-simulator) CXX=arm64-apple-tvos-simulator-clang++ ;;
+ aarch64-apple-tvos*) CXX=arm64-apple-tvos-clang++ ;;
+ x86_64-apple-tvos*-simulator) CXX=x86_64-apple-tvos-simulator-clang++ ;;
+
+ aarch64-apple-xros*-simulator) CXX=arm64-apple-xros-simulator-clang++ ;;
+ aarch64-apple-xros*) CXX=arm64-apple-xros-clang++ ;;
+
+ 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++ ;;
*)
esac
fi
@@ -570,8 +623,11 @@
case $enableval in
yes)
case $ac_sys_system in
- Darwin) enableval=/Library/Frameworks ;;
- iOS) enableval=Platforms/Apple/iOS/Frameworks/\$\(MULTIARCH\) ;;
+ Darwin) enableval=/Library/Frameworks ;;
+ iOS) enableval=Platforms/Apple/iOS/Frameworks/\$\(MULTIARCH\) ;;
+ tvOS) enableval=Platforms/Apple/tvOS/Frameworks/\$\(MULTIARCH\) ;;
+ visionOS) enableval=Platforms/Apple/visionOS/Frameworks/\$\(MULTIARCH\) ;;
+ watchOS) enableval=Platforms/Apple/watchOS/Frameworks/\$\(MULTIARCH\) ;;
*) AC_MSG_ERROR([Unknown platform for framework build])
esac
esac
@@ -580,6 +636,9 @@
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]) ;;
+ visionOS) AC_MSG_ERROR([visionOS builds must use --enable-framework]) ;;
+ watchOS) AC_MSG_ERROR([watchOS builds must use --enable-framework]) ;;
*)
PYTHONFRAMEWORK=
PYTHONFRAMEWORKDIR=no-framework
@@ -682,6 +741,48 @@
AC_CONFIG_FILES([Platforms/Apple/iOS/Resources/Info.plist])
;;
+ tvOS) :
+ FRAMEWORKINSTALLFIRST="frameworkinstallunversionedstructure"
+ FRAMEWORKALTINSTALLFIRST="frameworkinstallunversionedstructure "
+ FRAMEWORKINSTALLLAST="frameworkinstallmobileheaders"
+ FRAMEWORKALTINSTALLLAST="frameworkinstallmobileheaders"
+ FRAMEWORKPYTHONW=
+ INSTALLTARGETS="libinstall inclinstall sharedinstall"
+
+ prefix=$PYTHONFRAMEWORKPREFIX
+ PYTHONFRAMEWORKINSTALLNAMEPREFIX="@rpath/$PYTHONFRAMEWORKDIR"
+ RESSRCDIR=Platforms/Apple/tvOS/Resources
+
+ AC_CONFIG_FILES([Platforms/Apple/tvOS/Resources/Info.plist])
+ ;;
+ visionOS) :
+ FRAMEWORKINSTALLFIRST="frameworkinstallunversionedstructure"
+ FRAMEWORKALTINSTALLFIRST="frameworkinstallunversionedstructure "
+ FRAMEWORKINSTALLLAST="frameworkinstallmobileheaders"
+ FRAMEWORKALTINSTALLLAST="frameworkinstallmobileheaders"
+ FRAMEWORKPYTHONW=
+ INSTALLTARGETS="libinstall inclinstall sharedinstall"
+
+ prefix=$PYTHONFRAMEWORKPREFIX
+ PYTHONFRAMEWORKINSTALLNAMEPREFIX="@rpath/$PYTHONFRAMEWORKDIR"
+ RESSRCDIR=Platforms/Apple/visionOS/Resources
+
+ AC_CONFIG_FILES([Platforms/Apple/visionOS/Resources/Info.plist])
+ ;;
+ watchOS) :
+ FRAMEWORKINSTALLFIRST="frameworkinstallunversionedstructure"
+ FRAMEWORKALTINSTALLFIRST="frameworkinstallunversionedstructure "
+ FRAMEWORKINSTALLLAST="frameworkinstallmobileheaders"
+ FRAMEWORKALTINSTALLLAST="frameworkinstallmobileheaders"
+ FRAMEWORKPYTHONW=
+ INSTALLTARGETS="libinstall inclinstall sharedinstall"
+
+ prefix=$PYTHONFRAMEWORKPREFIX
+ PYTHONFRAMEWORKINSTALLNAMEPREFIX="@rpath/$PYTHONFRAMEWORKDIR"
+ RESSRCDIR=Platforms/Apple/watchOS/Resources
+
+ AC_CONFIG_FILES([Platforms/Apple/watchOS/Resources/Info.plist])
+ ;;
*)
AC_MSG_ERROR([Unknown platform for framework build])
;;
@@ -690,6 +791,9 @@
],[
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]) ;;
+ visionOS) AC_MSG_ERROR([visionOS builds must use --enable-framework]) ;;
+ watchOS) AC_MSG_ERROR([watchOS builds must use --enable-framework]) ;;
*)
PYTHONFRAMEWORK=
PYTHONFRAMEWORKDIR=no-framework
@@ -742,8 +846,8 @@
case "$withval" in
yes)
case $ac_sys_system in
- Darwin|iOS)
- # iOS is able to share the macOS patch
+ Darwin|iOS|tvOS|visionOS|watchOS)
+ # iOS/tvOS/visionOS/watchOS 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]) ;;
@@ -757,8 +861,8 @@
esac
],[
case $ac_sys_system in
- iOS)
- # Always apply the compliance patch on iOS; we can use the macOS patch
+ iOS|tvOS|visionOS|watchOS)
+ # Always apply the compliance patch on iOS/tvOS/visionOS/watchOS; 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])
;;
@@ -771,6 +875,8 @@
])
AC_SUBST([APP_STORE_COMPLIANCE_PATCH])
+EXPORT_XROS_DEPLOYMENT_TARGET='#'
+
AC_SUBST([_PYTHON_HOST_PLATFORM])
if test "$cross_compiling" = yes; then
case "$host" in
@@ -809,6 +915,70 @@
;;
esac
;;
+ *-apple-tvos*)
+ _host_os=`echo $host | cut -d '-' -f3`
+ _host_device=`echo $host | cut -d '-' -f4`
+ _host_device=${_host_device:=os}
+
+ # TVOS_DEPLOYMENT_TARGET is the minimum supported tvOS version
+ AC_MSG_CHECKING([tvOS deployment target])
+ TVOS_DEPLOYMENT_TARGET=${_host_os:4}
+ TVOS_DEPLOYMENT_TARGET=${TVOS_DEPLOYMENT_TARGET:=12.0}
+ AC_MSG_RESULT([$TVOS_DEPLOYMENT_TARGET])
+
+ case "$host_cpu" in
+ aarch64)
+ _host_ident=${TVOS_DEPLOYMENT_TARGET}-arm64-appletv${_host_device}
+ ;;
+ *)
+ _host_ident=${TVOS_DEPLOYMENT_TARGET}-$host_cpu-appletv${_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 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])
+ 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)
+ _host_ident=${XROS_DEPLOYMENT_TARGET}-arm64-xr${_host_device}
+ ;;
+ *)
+ _host_ident=${XROS_DEPLOYMENT_TARGET}-$host_cpu-xr${_host_device}
+ ;;
+ esac
+ ;;
+ *-apple-watchos*)
+ _host_os=`echo $host | cut -d '-' -f3`
+ _host_device=`echo $host | cut -d '-' -f4`
+ _host_device=${_host_device:=os}
+
+ # WATCHOS_DEPLOYMENT_TARGET is the minimum supported watchOS version
+ AC_MSG_CHECKING([watchOS deployment target])
+ WATCHOS_DEPLOYMENT_TARGET=${_host_os:7}
+ WATCHOS_DEPLOYMENT_TARGET=${WATCHOS_DEPLOYMENT_TARGET:=4.0}
+ AC_MSG_RESULT([$WATCHOS_DEPLOYMENT_TARGET])
+
+ case "$host_cpu" in
+ aarch64)
+ _host_ident=${WATCHOS_DEPLOYMENT_TARGET}-arm64-watch${_host_device}
+ ;;
+ *)
+ _host_ident=${WATCHOS_DEPLOYMENT_TARGET}-$host_cpu-watch${_host_device}
+ ;;
+ esac
+ ;;
*-*-darwin*)
case "$host_cpu" in
arm*)
@@ -898,9 +1068,15 @@
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/visionOS/watchOS, defining _POSIX_C_SOURCE also disables platform specific features.
iOS/*)
define_xopen_source=no;;
+ tvOS/*)
+ define_xopen_source=no;;
+ visionOS/*)
+ define_xopen_source=no;;
+ watchOS/*)
+ define_xopen_source=no;;
# On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
# defining NI_NUMERICHOST.
QNX/6.3.2)
@@ -959,8 +1135,15 @@
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 /
+# XROS_DEPLOYMENT_TARGET / WATCHOS_DEPLOYMENT_TARGET enforced by the selected host triple.
AC_SUBST([IPHONEOS_DEPLOYMENT_TARGET])
+AC_SUBST([TVOS_DEPLOYMENT_TARGET])
+AC_SUBST([XROS_DEPLOYMENT_TARGET])
+AC_SUBST([WATCHOS_DEPLOYMENT_TARGET])
+
+# XROS_DEPLOYMENT_TARGET should get exported
+AC_SUBST([EXPORT_XROS_DEPLOYMENT_TARGET])
# checks for alternative programs
@@ -994,7 +1177,9 @@
],
)
-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
+dnl version. visionOS doesn't use an explicit -mxros-version-min option -
+dnl it encodes the min version into the target triple.
AS_CASE([$host],
[*-apple-ios*-simulator], [
AS_VAR_APPEND([CFLAGS], [" -mios-simulator-version-min=${IPHONEOS_DEPLOYMENT_TARGET}"])
@@ -1003,6 +1188,18 @@
[*-apple-ios*], [
AS_VAR_APPEND([CFLAGS], [" -mios-version-min=${IPHONEOS_DEPLOYMENT_TARGET}"])
AS_VAR_APPEND([LDFLAGS], [" -mios-version-min=${IPHONEOS_DEPLOYMENT_TARGET}"])
+ ],[*-apple-tvos*-simulator], [
+ AS_VAR_APPEND([CFLAGS], [" -mtvos-simulator-version-min=${TVOS_DEPLOYMENT_TARGET}"])
+ AS_VAR_APPEND([LDFLAGS], [" -mtvos-simulator-version-min=${TVOS_DEPLOYMENT_TARGET}"])
+ ],[*-apple-tvos*], [
+ AS_VAR_APPEND([CFLAGS], [" -mtvos-version-min=${TVOS_DEPLOYMENT_TARGET}"])
+ AS_VAR_APPEND([LDFLAGS], [" -mtvos-version-min=${TVOS_DEPLOYMENT_TARGET}"])
+ ],[*-apple-watchos*-simulator], [
+ AS_VAR_APPEND([CFLAGS], [" -mwatchos-simulator-version-min=${WATCHOS_DEPLOYMENT_TARGET}"])
+ AS_VAR_APPEND([LDFLAGS], [" -mwatchos-simulator-version-min=${WATCHOS_DEPLOYMENT_TARGET}"])
+ ],[*-apple-watchos*], [
+ AS_VAR_APPEND([CFLAGS], [" -mwatchos-version-min=${WATCHOS_DEPLOYMENT_TARGET}"])
+ AS_VAR_APPEND([LDFLAGS], [" -mwatchos-version-min=${WATCHOS_DEPLOYMENT_TARGET}"])
],
)
@@ -1191,6 +1388,9 @@
AS_CASE([$ac_sys_system],
[Darwin*], [MULTIARCH=""],
[iOS], [MULTIARCH=""],
+ [tvOS], [MULTIARCH=""],
+ [visionOS], [MULTIARCH=""],
+ [watchOS], [MULTIARCH=""],
[FreeBSD*], [MULTIARCH=""],
[MULTIARCH=$($CC --print-multiarch 2>/dev/null)]
)
@@ -1212,7 +1412,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],
- [iOS], [SOABI_PLATFORM=`echo "$PLATFORM_TRIPLET" | cut -d '-' -f2`],
+ [iOS|tvOS|visionOS|watchOS], [SOABI_PLATFORM=`echo "$PLATFORM_TRIPLET" | cut -d '-' -f2`],
[SOABI_PLATFORM=$PLATFORM_TRIPLET]
)
@@ -1251,16 +1451,22 @@
[wasm32-unknown-wasip1/clang], [PY_SUPPORT_TIER=2], dnl WebAssembly System Interface preview1, clang
[x86_64-*-linux-gnu/clang], [PY_SUPPORT_TIER=2], dnl Linux on AMD64, any vendor, glibc, clang
- [aarch64-pc-windows-msvc/msvc], [PY_SUPPORT_TIER=3], dnl Windows ARM64, MSVC
- [armv7l-*-linux-gnueabihf/gcc], [PY_SUPPORT_TIER=3], dnl ARMv7 LE with hardware floats, any vendor, glibc, gcc
- [powerpc64le-*-linux-gnu/clang], [PY_SUPPORT_TIER=3], dnl Linux on PPC64 little endian, glibc, clang
- [s390x-*-linux-gnu/gcc], [PY_SUPPORT_TIER=3], dnl Linux on 64bit s390x (big endian), glibc, gcc
- [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
- [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
- [wasm32-*-emscripten/emcc], [PY_SUPPORT_TIER=3], dnl Emscripten
+ [aarch64-pc-windows-msvc/msvc], [PY_SUPPORT_TIER=3], dnl Windows ARM64, MSVC
+ [armv7l-*-linux-gnueabihf/gcc], [PY_SUPPORT_TIER=3], dnl ARMv7 LE with hardware floats, any vendor, glibc, gcc
+ [powerpc64le-*-linux-gnu/clang], [PY_SUPPORT_TIER=3], dnl Linux on PPC64 little endian, glibc, clang
+ [s390x-*-linux-gnu/gcc], [PY_SUPPORT_TIER=3], dnl Linux on 64bit s390x (big endian), glibc, gcc
+ [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
+ [aarch64-apple-tvos*-simulator/clang], [PY_SUPPORT_TIER=3], dnl tvOS Simulator on arm64
+ [aarch64-apple-tvos*/clang], [PY_SUPPORT_TIER=3], dnl tvOS 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-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-*-linux-android/clang], [PY_SUPPORT_TIER=3], dnl Android on ARM64
+ [x86_64-*-linux-android/clang], [PY_SUPPORT_TIER=3], dnl Android on AMD64
+ [wasm32-*-emscripten/emcc], [PY_SUPPORT_TIER=3], dnl Emscripten
[PY_SUPPORT_TIER=0]
)
@@ -1579,7 +1785,7 @@
case $ac_sys_system in
Darwin)
LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)';;
- iOS)
+ iOS|tvOS|visionOS|watchOS)
LDLIBRARY='$(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK)';;
*)
AC_MSG_ERROR([Unknown platform for framework build]);;
@@ -1644,7 +1850,7 @@
BLDLIBRARY='-L. -lpython$(LDVERSION)'
RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
;;
- iOS)
+ iOS|tvOS|visionOS|watchOS)
LDLIBRARY='libpython$(LDVERSION).dylib'
;;
AIX*)
@@ -3652,7 +3858,7 @@
BLDSHARED="$LDSHARED"
fi
;;
- iOS/*)
+ iOS/*|tvOS/*|visionOS/*|watchOS/*)
LDSHARED='$(CC) -dynamiclib -F . -framework $(PYTHONFRAMEWORK)'
LDCXXSHARED='$(CXX) -dynamiclib -F . -framework $(PYTHONFRAMEWORK)'
BLDSHARED="$LDSHARED"
@@ -3776,7 +3982,7 @@
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/*|visionOS/*|watchOS/*)
LINKFORSHARED="$extra_undefs -framework CoreFoundation"
# Issue #18075: the default maximum stack size (8MBytes) is too
@@ -3800,7 +4006,7 @@
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" = "visionOS" -o "$ac_sys_system" = "watchOS"; then
LINKFORSHARED="-Wl,-stack_size,$stack_size $LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK)'
fi
;;
@@ -4308,7 +4514,7 @@
dnl when do we need USING_APPLE_OS_LIBFFI?
ctypes_malloc_closure=yes
],
- [iOS], [
+ [iOS|tvOS|visionOS|watchOS], [
ctypes_malloc_closure=yes
],
[sunos5], [AS_VAR_APPEND([LIBFFI_LIBS], [" -mimpure-text"])]
@@ -5487,9 +5693,9 @@
AC_CHECK_FUNCS([ \
accept4 alarm bind_textdomain_codeset chmod chown clearenv \
clock closefrom close_range confstr \
- copy_file_range ctermid dladdr dup execv explicit_bzero explicit_memset \
+ copy_file_range ctermid dladdr dup explicit_bzero explicit_memset \
faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \
- fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \
+ fpathconf fstatat ftime ftruncate futimens futimes futimesat \
gai_strerror getegid geteuid getgid getgrent getgrgid getgrgid_r \
getgrnam_r getgrouplist gethostname getitimer getloadavg getlogin getlogin_r \
getpeername getpgid getpid getppid getpriority _getpty \
@@ -5497,8 +5703,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 \
- plock poll ppoll posix_fadvise posix_fallocate posix_openpt posix_spawn posix_spawnp \
- posix_spawn_file_actions_addclosefrom_np \
+ plock poll ppoll 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_get_name_np pthread_getname_np pthread_set_name_np \
@@ -5508,7 +5713,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 \
- setresuid setreuid setsid setuid setvbuf shutdown sigaction sigaltstack \
+ setresuid setreuid setsid setuid setvbuf shutdown sigaction \
sigfillset siginterrupt sigpending sigrelse sigtimedwait sigwait \
sigwaitinfo snprintf splice strftime strlcpy strsignal symlinkat sync \
sysconf sysctlbyname tcgetpgrp tcsetpgrp tempnam timegm times tmpfile \
@@ -5529,12 +5734,26 @@
AC_CHECK_FUNCS([lchmod])
fi
-# iOS defines some system methods that can be linked (so they are
+# iOS/tvOS/visionOS/watchOS 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([dup3 getentropy getgroups pipe2 system])
+if test "$ac_sys_system" != "iOS" -a "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "visionOS" -a "$ac_sys_system" != "watchOS" ; then
+ AC_CHECK_FUNCS([getentropy getgroups system])
+fi
+# In addition, macOS introduced dup3 and pipe2 in macOS 27, late in the
+# lifetime of this version of Python. Rather than adding weaklinking
+# support for them, just continue to ignore them.
+if test "$ac_sys_system" != "iOS" -a "$ac_sys_system" != "tvOS" -a "$ac_sys_system" != "visionOS" -a "$ac_sys_system" != "watchOS" -a "$ac_sys_system" != "Darwin"; then
+ AC_CHECK_FUNCS([dup3 pipe2])
+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
+ AC_CHECK_FUNCS([ \
+ execv fork fork1 posix_spawn posix_spawnp posix_spawn_file_actions_addclosefrom_np \
+ sigaltstack \
+ ])
fi
AC_CHECK_DECL([dirfd],
@@ -5861,20 +6080,22 @@
@%:@include ])
])
# 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" ; then
+ 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"])])])
+fi
# check for long file support functions
AC_CHECK_FUNCS([fseek64 fseeko fstatvfs ftell64 ftello statvfs])
@@ -5913,10 +6134,10 @@
])
])
-# On Android and iOS, clock_settime can be linked (so it is found by
+# On Android, iOS, tvOS, visionOS, and watchOS, 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" != "visionOS" -a "$ac_sys_system" != "watchOS"
then
AC_CHECK_FUNCS([clock_settime], [], [
AC_CHECK_LIB([rt], [clock_settime], [
@@ -6074,7 +6295,7 @@
[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" = "visionOS" || test "$ac_sys_system" = "watchOS"; then
ac_cv_buggy_getaddrinfo="no"
elif test "${enable_ipv6+set}" = set; then
ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
@@ -6678,8 +6899,8 @@
LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
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 = "visionOS" -o $ac_sys_system = "watchOS"; then
MODULE_DEPS_SHARED="$MODULE_DEPS_SHARED \$(PYTHONFRAMEWORKDIR)/\$(PYTHONFRAMEWORK)"
fi
@@ -7352,7 +7573,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" = "visionOS" -o "$ac_sys_system" = "watchOS" ; then
ac_cv_file__dev_ptmx=no
ac_cv_file__dev_ptc=no
else
@@ -7681,7 +7902,7 @@
AS_CASE([$ac_sys_system],
[Emscripten], [with_ensurepip=no],
[WASI], [with_ensurepip=no],
- [iOS], [with_ensurepip=no],
+ [iOS|tvOS|visionOS|watchOS], [with_ensurepip=no],
[with_ensurepip=upgrade]
)
])
@@ -8069,6 +8290,9 @@
NetBSD*) _PYTHREAD_NAME_MAXLEN=15;; # gh-131268
Darwin) _PYTHREAD_NAME_MAXLEN=63;;
iOS) _PYTHREAD_NAME_MAXLEN=63;;
+ tvOS) _PYTHREAD_NAME_MAXLEN=63;;
+ visionOS) _PYTHREAD_NAME_MAXLEN=63;;
+ watchOS) _PYTHREAD_NAME_MAXLEN=63;;
FreeBSD*) _PYTHREAD_NAME_MAXLEN=19;; # gh-131268
OpenBSD*) _PYTHREAD_NAME_MAXLEN=23;; # gh-131268
*) _PYTHREAD_NAME_MAXLEN=;;
@@ -8093,7 +8317,7 @@
[VxWorks*], [PY_STDLIB_MOD_SET_NA([_scproxy], [termios], [grp])],
dnl The _scproxy module is available on macOS
[Darwin], [],
- [iOS], [
+ [iOS|tvOS|visionOS|watchOS], [
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