Skip to content
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
f4810d9
patch for xrOS
johnzhou721 Apr 13, 2025
23f9fc2
Update configure.ac
johnzhou721 Apr 13, 2025
477f798
modify to visionOS
johnzhou721 Apr 13, 2025
cdc75e1
Merge remote-tracking branch 'origin/3.14-patched' into 3.14-patched
johnzhou721 Apr 13, 2025
001a168
autoreconf using the docker i guess
johnzhou721 Apr 13, 2025
2bf2add
file business
johnzhou721 Apr 13, 2025
3183f22
config.sub
johnzhou721 Apr 13, 2025
5c216d3
filenames
johnzhou721 Apr 13, 2025
30e92fb
some changes
johnzhou721 Apr 13, 2025
cc6d47d
Configure and make now runs correctly
johnzhou721 Apr 13, 2025
d15e059
remove info.plist i guess
johnzhou721 Apr 13, 2025
94434ec
update visionos in lib
johnzhou721 Apr 13, 2025
7e8c1c6
xrOS
johnzhou721 Apr 14, 2025
e4538ed
remove unnessacary disablement of commands
johnzhou721 Apr 14, 2025
62f5e08
more enablement
johnzhou721 Apr 14, 2025
c5dab98
Add platform triplet
johnzhou721 Apr 14, 2025
f805bde
comments and version
johnzhou721 Apr 15, 2025
d5df89f
export visionOS deployment
johnzhou721 Apr 15, 2025
7900c23
add (probably) nonworking testbed
johnzhou721 Apr 15, 2025
ce466a9
consistency
johnzhou721 Apr 16, 2025
f4f92ce
Add testvisionos
johnzhou721 Apr 17, 2025
89f8719
Remove more iOS refs.
johnzhou721 Apr 17, 2025
4cd23bd
Platform identification on visionOS.
johnzhou721 Apr 17, 2025
641a8d5
Add more visionos references that were missing.
johnzhou721 Apr 18, 2025
5c7bb69
fix an outdated re
johnzhou721 Apr 18, 2025
b2932d9
Remove some debug statements
johnzhou721 Apr 18, 2025
58cc3b5
lower/upper
johnzhou721 Apr 19, 2025
4388757
code styl
johnzhou721 Apr 20, 2025
b20ce5b
Remove reference to LaunchScreen storyboard.
johnzhou721 Apr 21, 2025
5df4700
fix simulator detection
johnzhou721 Apr 21, 2025
b234a61
fix some more tests
johnzhou721 Apr 21, 2025
740c818
plist cleanup
johnzhou721 Apr 21, 2025
379c3d9
fix typo
johnzhou721 Apr 21, 2025
f3286a5
test: Resolve situation on iOS regarding fd_count.
johnzhou721 Apr 23, 2025
c0ce04a
Final test cleanups for visionOS.
freakboy3742 Apr 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ tvOS/Frameworks
tvOS/Resources/Info.plist
watchOS/Frameworks
watchOS/Resources/Info.plist
tvOS/Frameworks
tvOS/Resources/Info.plist
Mac/Makefile
Mac/PythonLauncher/Info.plist
Mac/PythonLauncher/Makefile
Expand Down
35 changes: 34 additions & 1 deletion Lib/platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,30 @@ def watchos_ver(system="", release="", model="", is_simulator=False):
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)


def _java_getprop(name, default):
"""This private helper is deprecated in 3.13 and will be removed in 3.15"""
from java.lang import System
Expand Down Expand Up @@ -932,7 +956,7 @@ def get_OpenVMS():
csid, cpu_number = vms_lib.getsyi('SYI$_CPU', 0)
return 'Alpha' if cpu_number >= 128 else 'VAX'

# On the iOS/tvOS/watchOS simulator, os.uname returns the architecture as
# On the iOS/tvOS/watchOS/visionOS simulator, os.uname returns the architecture as
# uname.machine. On device it returns the model name for some reason; but
# there's only one CPU architecture for devices, so we know the right
# answer.
Expand All @@ -951,6 +975,11 @@ def get_watchos():
return os.uname().machine
return 'arm64_32'

def get_visionos():
if sys.implementation._multiarch.endswith("simulator"):
return os.uname().machine
return 'arm64'

def from_subprocess():
"""
Fall back to `uname -p`
Expand Down Expand Up @@ -1117,6 +1146,8 @@ def uname():
system, release, _, _ = tvos_ver()
if sys.platform == 'watchos':
system, release, _, _ = watchos_ver()
if sys.platform == 'visionos':
system, release, _, _ = visionos_ver()

vals = system, node, release, version, machine
# Replace 'unknown' values with the more portable ''
Expand Down Expand Up @@ -1410,6 +1441,8 @@ def platform(aliased=False, terse=False):
system, release, _, _ = tvos_ver()
elif sys.platform == "watchos":
system, release, _, _ = watchos_ver()
elif sys.platform == "visionos":
system, release, _, _ = visionos_ver()
else:
macos_release = mac_ver()[0]
if macos_release:
Expand Down
4 changes: 4 additions & 0 deletions Lib/sysconfig/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,10 @@ def get_platform():
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("VISIONOS_DEPLOYMENT_TARGET", "4.0")
osname = sys.platform
machine = sys.implementation._multiarch
else:
import _osx_support
osname, release, machine = _osx_support.get_platform_osx(
Expand Down
Loading