Support loading plugins without sources
cx_Freeze include only the bytecodes version of the translation plugin. Closes #13208
This commit is contained in:
1 parent
f5db4a5899
commit
4c5659e87c
1 file changed
+5
-3
@@ -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