Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'main' into ios-framework-loader
  • Loading branch information
freakboy3742 committed Mar 14, 2024
commit dbf818d1eb96d5dc13d909c15a2dd840d3a82f2c
33 changes: 17 additions & 16 deletions Lib/test/test_importlib/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,23 @@ def _extension_details():
EXTENSIONS.file_path = None
EXTENSIONS.name = '_testsinglephase'

def _extension_details():
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):
EXTENSIONS.path = path
EXTENSIONS.ext = ext
EXTENSIONS.filename = filename
EXTENSIONS.file_path = file_path
return
def _extension_details():
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):
EXTENSIONS.path = path
EXTENSIONS.ext = ext
EXTENSIONS.filename = filename
EXTENSIONS.file_path = file_path
return

_extension_details()

Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.