Support loading plugins without sources
cx_Freeze include only the bytecodes version of the translation plugin. Closes #13208 (grafted from c06fd05a195bfb9bae5dd388a366c0d58c2005a4) --HG-- branch : 7.0
This commit is contained in:
@@ -24,9 +24,11 @@ def register():
|
||||
imported = set()
|
||||
for path in paths:
|
||||
finder = importlib.machinery.FileFinder(
|
||||
path, (
|
||||
importlib.machinery.SourceFileLoader,
|
||||
importlib.machinery.SOURCE_SUFFIXES))
|
||||
path,
|
||||
(importlib.machinery.SourceFileLoader,
|
||||
importlib.machinery.SOURCE_SUFFIXES),
|
||||
(importlib.machinery.SourcelessFileLoader,
|
||||
importlib.machinery.BYTECODE_SUFFIXES))
|
||||
for plugin in os.listdir(path):
|
||||
module = os.path.splitext(plugin)[0]
|
||||
if (module.startswith('_') or module in imported):
|
||||
|
||||
Reference in New Issue
Block a user