cmake: update installation of python extra submodules
- support Python standalone builds - loader installs submodules unconditionally
This commit is contained in:
@@ -41,7 +41,7 @@ def __load_extra_py_code_for_module(base, name, enable_debug_print=False):
|
||||
setattr(py_module, "_native", native_module)
|
||||
for k, v in filter(lambda kv: not hasattr(py_module, kv[0]),
|
||||
native_module.__dict__.items()):
|
||||
if enable_debug_print: print(' symbol: {} = {}'.format(k, v))
|
||||
if enable_debug_print: print(' symbol({}): {} = {}'.format(name, k, v))
|
||||
setattr(py_module, k, v)
|
||||
return True
|
||||
|
||||
@@ -51,6 +51,7 @@ def __collect_extra_submodules(enable_debug_print=False):
|
||||
return all((
|
||||
# module is not internal
|
||||
not module.startswith("_"),
|
||||
not module.startswith("python-"),
|
||||
# it is not a file
|
||||
os.path.isdir(os.path.join(_extra_submodules_init_path, module))
|
||||
))
|
||||
|
||||
Reference in New Issue
Block a user