Skip to content

Commit

Permalink
Correct an issue with processor identification on x86 simulators.
Browse files Browse the repository at this point in the history
  • Loading branch information
freakboy3742 committed Oct 4, 2023
1 parent cbb313d commit c468bdc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions patch/Python/Python.patch
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ index 49bcaea78d..6aac60a0aa 100644
+ _bootstrap._verbose_message('Adding Apple Framework dylib finder at {}', frameworks_folder)
+ sys.meta_path.append(AppleFrameworkFinder(frameworks_folder))
diff --git a/Lib/platform.py b/Lib/platform.py
index 6a820c90a1..11f7fc926e 100755
index 6a820c90a1..f16a540118 100755
--- a/Lib/platform.py
+++ b/Lib/platform.py
@@ -449,6 +449,26 @@
Expand Down Expand Up @@ -425,17 +425,17 @@ index 6a820c90a1..11f7fc926e 100755
+ # as uname.machine. On device it doesn't; but there's only
+ # on CPU architecture on device
+ def get_ios():
+ if sys.implementation._multiarch.endswith('simulator'):
+ if getattr(sys.implementation, "_simulator", False):
+ return os.uname().machine
+ return 'arm64'
+
+ def get_tvos():
+ if sys.implementation._multiarch.endswith('simulator'):
+ if getattr(sys.implementation, "_simulator", False):
+ return os.uname().machine
+ return 'arm64'
+
+ def get_watchos():
+ if sys.implementation._multiarch.endswith('simulator'):
+ if getattr(sys.implementation, "_simulator", False):
+ return os.uname().machine
+ return 'arm64_32'
+
Expand Down

0 comments on commit c468bdc

Please sign in to comment.