From c468bdc1d3275f04b753988d2e55e8db70372b72 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Wed, 4 Oct 2023 09:40:13 +0800 Subject: [PATCH] Correct an issue with processor identification on x86 simulators. --- patch/Python/Python.patch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/patch/Python/Python.patch b/patch/Python/Python.patch index 0b8e2ec..200fcdc 100644 --- a/patch/Python/Python.patch +++ b/patch/Python/Python.patch @@ -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 @@ @@ -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' +