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 43883f2 commit 5364651
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions patch/Python/Python.patch
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ index 509f99ae8e..a1bf71dee7 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 b7e7bc439e..b19881890a 100755
index b7e7bc439e..bbe36759a6 100755
--- a/Lib/platform.py
+++ b/Lib/platform.py
@@ -445,6 +445,26 @@
Expand All @@ -400,7 +400,7 @@ index b7e7bc439e..b19881890a 100755
+ from actual devices because they are reproducing actual device
+ properties.
+ """
+ return getattr(sys.implementation, "_multiarch", False)
+ return getattr(sys.implementation, "_simulator", False)
+
+
def _java_getprop(name, default):
Expand Down Expand Up @@ -434,7 +434,7 @@ index b7e7bc439e..b19881890a 100755
+ system, release, model = iOS_ver()
+ # Simulator devices report as "arm64" or "x86_64";
+ # use the model as the basis for the normalized machine name.
+ if sys.implementation._multiarch.endswith("simulator"):
+ if getattr(sys.implementation, "_simulator", False):
+ machine = f"{model} Simulator"
+ processor = os.uname().machine
+ else:
Expand Down

0 comments on commit 5364651

Please sign in to comment.