Skip to content

Commit 51c4fa7

Browse files
committed
Correct an issue with processor identification on x86 simulators.
1 parent 5ed9750 commit 51c4fa7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

patch/Python/Python.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ index f3828b10e1..03bce2aa25 100644
375375
+ _bootstrap._verbose_message('Adding Apple Framework dylib finder at {}', frameworks_folder)
376376
+ sys.meta_path.append(AppleFrameworkFinder(frameworks_folder))
377377
diff --git a/Lib/platform.py b/Lib/platform.py
378-
index d6412e169b..2bf6b979b0 100755
378+
index d6412e169b..d1532ba89c 100755
379379
--- a/Lib/platform.py
380380
+++ b/Lib/platform.py
381381
@@ -449,6 +449,25 @@
@@ -421,17 +421,17 @@ index d6412e169b..2bf6b979b0 100755
421421
+ # as uname.machine. On device it doesn't; but there's only
422422
+ # on CPU architecture on device
423423
+ def get_ios():
424-
+ if sys.implementation._multiarch.endswith('simulator'):
424+
+ if getattr(sys.implementation, "_simulator", False):
425425
+ return os.uname().machine
426426
+ return 'arm64'
427427
+
428428
+ def get_tvos():
429-
+ if sys.implementation._multiarch.endswith('simulator'):
429+
+ if getattr(sys.implementation, "_simulator", False):
430430
+ return os.uname().machine
431431
+ return 'arm64'
432432
+
433433
+ def get_watchos():
434-
+ if sys.implementation._multiarch.endswith('simulator'):
434+
+ if getattr(sys.implementation, "_simulator", False):
435435
+ return os.uname().machine
436436
+ return 'arm64_32'
437437
+

0 commit comments

Comments
 (0)