Modular bindings: handle module names with hyphens

This commit is contained in:
Gustavo J. A. M. Carneiro
2011-03-13 18:38:59 +00:00
parent 3af457ddd3
commit 6015e64410
3 changed files with 3 additions and 3 deletions

View File

@@ -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)

View File

@@ -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