./waf --apiscan=all: now only scans modules that have bld.ns3_python_bindings() in their wscript
This commit is contained in:
@@ -671,7 +671,10 @@ def build(bld):
|
||||
continue
|
||||
if mod.name.endswith('-test'):
|
||||
continue
|
||||
scan_modules.append(mod.name.split('ns3-')[1])
|
||||
bindings_enabled = (mod.name in env.MODULAR_BINDINGS_MODULES)
|
||||
#print mod.name, bindings_enabled
|
||||
if bindings_enabled:
|
||||
scan_modules.append(mod.name.split('ns3-')[1])
|
||||
else:
|
||||
scan_modules = Options.options.apiscan.split(',')
|
||||
print "Modules to scan: ", scan_modules
|
||||
|
||||
@@ -161,7 +161,12 @@ def create_obj(bld, *args):
|
||||
|
||||
|
||||
def ns3_python_bindings(bld):
|
||||
# this method is called from a module wscript, so remember bld.path is not bindings/python!
|
||||
module_abs_src_path = bld.path.abspath()
|
||||
module = os.path.basename(module_abs_src_path)
|
||||
env = bld.env
|
||||
env.append_value("MODULAR_BINDINGS_MODULES", "ns3-"+module)
|
||||
|
||||
if not env['ENABLE_PYTHON_BINDINGS']:
|
||||
return
|
||||
if env['BINDINGS_TYPE'] not in ('modular', 'both'):
|
||||
@@ -173,10 +178,6 @@ def ns3_python_bindings(bld):
|
||||
Warning, stacklevel=2)
|
||||
return
|
||||
|
||||
# this method is called from a module wscript, so remember bld.path is not bindings/python!
|
||||
module_abs_src_path = bld.path.abspath()
|
||||
module = os.path.basename(module_abs_src_path)
|
||||
|
||||
if ("ns3-%s" % (module,)) not in env.NS3_ENABLED_MODULES:
|
||||
#print "bindings for module %s which is not enabled, skip" % module
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user