def _detectedShlibFile(filename, module_name): # That is not a shared library, but looks like one. if module_name == "__main__": return from nuitka import ModuleRegistry if ModuleRegistry.hasRootModule(module_name): return parts = module_name.split('.') if len(parts) == 1: package_name = None name = module_name else: package_name = '.'.join(parts[:-1]) name = parts[-1] source_ref = SourceCodeReferences.fromFilename( filename = filename ) shlib_module = PythonShlibModule( name = name, package_name = package_name, source_ref = source_ref ) ModuleRegistry.addRootModule(shlib_module) ImportCache.addImportedModule(shlib_module) module_names.add(module_name)
def _detectedShlibFile(filename, module_name): # That is not a shared library, but looks like one. if module_name == "__main__": return # Cyclic dependency from nuitka import ModuleRegistry if ModuleRegistry.hasRootModule(module_name): return source_ref = SourceCodeReferences.fromFilename(filename=filename) shlib_module = PythonShlibModule(module_name=module_name, source_ref=source_ref) ModuleRegistry.addRootModule(shlib_module) ImportCache.addImportedModule(shlib_module) module_names.add(module_name)