4 pkgRelDir
= sys
.argv
[1]
5 pkgFiles
= sys
.argv
[2:]
7 getFileName
= lambda f
: os
.path
.splitext(os
.path
.basename(f
))[0]
8 importNames
= ", ".join('"{}"'.format(getFileName(f
)) for f
in pkgFiles
)
10 script
= """__all__ = [{import_names}]
12 __import__('lldb.{pkg_name}.' + x)
14 def __lldb_init_module(debugger, internal_dict):
17 submodule = getattr(lldb.{pkg_name}, x)
18 lldb_init = getattr(submodule, '__lldb_init_module', None)
20 lldb_init(debugger, internal_dict)
22 import_names
=importNames
, pkg_name
=pkgRelDir
.replace("/", ".")
25 pkgIniFile
= os
.path
.normpath(os
.path
.join(pkgRelDir
, "__init__.py"))
26 with
open(pkgIniFile
, "w") as f
: