Skip to content

Commit 5364651

Browse files
committed
Correct an issue with processor identification on x86 simulators.
1 parent 43883f2 commit 5364651

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

patch/Python/Python.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ index 509f99ae8e..a1bf71dee7 100644
376376
+ _bootstrap._verbose_message('Adding Apple Framework dylib finder at {}', frameworks_folder)
377377
+ sys.meta_path.append(AppleFrameworkFinder(frameworks_folder))
378378
diff --git a/Lib/platform.py b/Lib/platform.py
379-
index b7e7bc439e..b19881890a 100755
379+
index b7e7bc439e..bbe36759a6 100755
380380
--- a/Lib/platform.py
381381
+++ b/Lib/platform.py
382382
@@ -445,6 +445,26 @@
@@ -400,7 +400,7 @@ index b7e7bc439e..b19881890a 100755
400400
+ from actual devices because they are reproducing actual device
401401
+ properties.
402402
+ """
403-
+ return getattr(sys.implementation, "_multiarch", False)
403+
+ return getattr(sys.implementation, "_simulator", False)
404404
+
405405
+
406406
def _java_getprop(name, default):
@@ -434,7 +434,7 @@ index b7e7bc439e..b19881890a 100755
434434
+ system, release, model = iOS_ver()
435435
+ # Simulator devices report as "arm64" or "x86_64";
436436
+ # use the model as the basis for the normalized machine name.
437-
+ if sys.implementation._multiarch.endswith("simulator"):
437+
+ if getattr(sys.implementation, "_simulator", False):
438438
+ machine = f"{model} Simulator"
439439
+ processor = os.uname().machine
440440
+ else:

0 commit comments

Comments
 (0)