./waf --apiscan=all: now only scans modules that have bld.ns3_python_bindings() in their wscript
--- a/bindings/python/wscript Tue Mar 22 15:41:38 2011 +0000
+++ b/bindings/python/wscript Tue Mar 22 15:56:41 2011 +0000
@@ -671,7 +671,10 @@
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
--- a/src/wscript Tue Mar 22 15:41:38 2011 +0000
+++ b/src/wscript Tue Mar 22 15:56:41 2011 +0000
@@ -161,7 +161,12 @@
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 @@
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