diff --git a/patch/Python/Python.patch b/patch/Python/Python.patch index 22e1932..a22d08a 100644 --- a/patch/Python/Python.patch +++ b/patch/Python/Python.patch @@ -131,7 +131,7 @@ index 2ce5c5b64d..6e10a0c4a5 100644 import pwd os.environ['HOME'] = pwd.getpwuid(os.getuid())[5] diff --git a/Lib/importlib/_bootstrap_external.py b/Lib/importlib/_bootstrap_external.py -index f603a89f7f..d6db040d0d 100644 +index f603a89f7f..48463efcfc 100644 --- a/Lib/importlib/_bootstrap_external.py +++ b/Lib/importlib/_bootstrap_external.py @@ -52,7 +52,7 @@ @@ -143,7 +143,7 @@ index f603a89f7f..d6db040d0d 100644 _CASE_INSENSITIVE_PLATFORMS = (_CASE_INSENSITIVE_PLATFORMS_BYTES_KEY + _CASE_INSENSITIVE_PLATFORMS_STR_KEY) -@@ -1705,6 +1705,59 @@ +@@ -1705,6 +1705,60 @@ return 'FileFinder({!r})'.format(self.path) @@ -194,6 +194,7 @@ index f603a89f7f..d6db040d0d 100644 + + for extension in EXTENSION_SUFFIXES: + dylib_file = _path_join(self.frameworks_path, f"{framework_name}.framework", f"{name}{extension}") ++ _bootstrap._verbose_message('Looking for Apple Framework dylib {}', dylib_file) + if _path_isfile(dylib_file): + loader = AppleFrameworkLoader(fullname, dylib_file, path) + return _bootstrap.spec_from_loader(fullname, loader) @@ -203,16 +204,14 @@ index f603a89f7f..d6db040d0d 100644 # Import setup ############################################################### def _fix_up_module(ns, name, pathname, cpathname=None): -@@ -1752,3 +1805,9 @@ +@@ -1752,3 +1806,7 @@ supported_loaders = _get_supported_file_loaders() sys.path_hooks.extend([FileFinder.path_hook(*supported_loaders)]) sys.meta_path.append(PathFinder) -+ if sys.platform == "ios": -+ sys.meta_path.append( -+ AppleFrameworkFinder( -+ _path_join(_path_split(sys.executable)[0], "Frameworks") -+ ) -+ ) ++ if sys.platform in {"ios", "tvos", "watchos"}: ++ frameworks_folder = _path_join(_path_split(sys.executable)[0], "Frameworks") ++ _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 9b9d88bf58..6fe084a3a5 100755 --- a/Lib/platform.py