aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_importlib/util.py
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2024-03-19 20:36:19 +0800
committerGitHub <noreply@github.com>2024-03-19 08:36:19 -0400
commit408e127159e54d87bb3464fd8bd60219dc527fac (patch)
tree055bc39042521f314a7d225a22b3ca8ce403d453 /Lib/test/test_importlib/util.py
parenta5574789876987b2b9aa19294c735fe795a5b5c4 (diff)
downloadcpython-408e127159e54d87bb3464fd8bd60219dc527fac.tar.gz
cpython-408e127159e54d87bb3464fd8bd60219dc527fac.zip
gh-114099 - Add iOS framework loading machinery. (GH-116454)
Co-authored-by: Malcolm Smith <smith@chaquo.com> Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
Diffstat (limited to 'Lib/test/test_importlib/util.py')
-rw-r--r--Lib/test/test_importlib/util.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_importlib/util.py b/Lib/test/test_importlib/util.py
index a900cc1dddf..89272484009 100644
--- a/Lib/test/test_importlib/util.py
+++ b/Lib/test/test_importlib/util.py
@@ -8,6 +8,7 @@ import os
import os.path
from test import support
from test.support import import_helper
+from test.support import is_apple_mobile
from test.support import os_helper
import unittest
import sys
@@ -43,6 +44,11 @@ else:
global EXTENSIONS
for path in sys.path:
for ext in machinery.EXTENSION_SUFFIXES:
+ # Apple mobile platforms mechanically load .so files,
+ # but the findable files are labelled .fwork
+ if is_apple_mobile:
+ ext = ext.replace(".so", ".fwork")
+
filename = EXTENSIONS.name + ext
file_path = os.path.join(path, filename)
if os.path.exists(file_path):