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 5ed9750 commit 51c4fa7
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 @@ -375,7 +375,7 @@ index f3828b10e1..03bce2aa25 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 d6412e169b..2bf6b979b0 100755
index d6412e169b..d1532ba89c 100755
--- a/Lib/platform.py
+++ b/Lib/platform.py
@@ -449,6 +449,25 @@
Expand Down Expand Up @@ -421,17 +421,17 @@ index d6412e169b..2bf6b979b0 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 51c4fa7

Please sign in to comment.