mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
gh-122907: Fix Builds Without HAVE_DYNAMIC_LOADING Set (gh-122952)
As of 529a160
(gh-118204), building with HAVE_DYNAMIC_LOADING stopped working. This is a minimal fix just to get builds working again. There are actually a number of long-standing deficiencies with HAVE_DYNAMIC_LOADING builds that need to be resolved separately.
This commit is contained in:
parent
5f68511522
commit
ee1b8ce26e
5 changed files with 32 additions and 12 deletions
|
@ -1523,14 +1523,14 @@ def _get_supported_file_loaders():
|
|||
|
||||
Each item is a tuple (loader, suffixes).
|
||||
"""
|
||||
if sys.platform in {"ios", "tvos", "watchos"}:
|
||||
extension_loaders = [(AppleFrameworkLoader, [
|
||||
suffix.replace(".so", ".fwork")
|
||||
for suffix in _imp.extension_suffixes()
|
||||
])]
|
||||
else:
|
||||
extension_loaders = []
|
||||
extension_loaders.append((ExtensionFileLoader, _imp.extension_suffixes()))
|
||||
extension_loaders = []
|
||||
if hasattr(_imp, 'create_dynamic'):
|
||||
if sys.platform in {"ios", "tvos", "watchos"}:
|
||||
extension_loaders = [(AppleFrameworkLoader, [
|
||||
suffix.replace(".so", ".fwork")
|
||||
for suffix in _imp.extension_suffixes()
|
||||
])]
|
||||
extension_loaders.append((ExtensionFileLoader, _imp.extension_suffixes()))
|
||||
source = SourceFileLoader, SOURCE_SUFFIXES
|
||||
bytecode = SourcelessFileLoader, BYTECODE_SUFFIXES
|
||||
return extension_loaders + [source, bytecode]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue