Modular bindings: handle module names with hyphens
This commit is contained in:
@@ -206,7 +206,7 @@ def scan_callback_classes(module_parser, callback_classes_file):
|
||||
|
||||
|
||||
def ns3_module_scan(top_builddir, module_name, headers_map, output_file_name, cflags):
|
||||
module_parser = ModuleParser('ns.%s' % module_name, 'ns3')
|
||||
module_parser = ModuleParser('ns.%s' % module_name.replace('-', '_'), 'ns3')
|
||||
module_parser.add_pre_scan_hook(PreScanHook(headers_map, module_name))
|
||||
#module_parser.add_post_scan_hook(post_scan_hook)
|
||||
|
||||
|
||||
@@ -566,7 +566,7 @@ class gen_ns3_compat_pymod_task(Task.TaskBase):
|
||||
'and should not be used in newly written code", DeprecationWarning, stacklevel=2)'
|
||||
print >> outfile
|
||||
for module in self.bld.env['PYTHON_MODULES_BUILT']:
|
||||
print >> outfile, "from ns.%s import *" % (module,)
|
||||
print >> outfile, "from ns.%s import *" % (module.replace('-', '_'))
|
||||
outfile.close()
|
||||
return 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user