visualizer: (fixes #199) Include bindings of visualizer dependencies
This commit is contained in:
committed by
Tom Henderson
parent
14c97d2472
commit
cd906e1c12
13
src/wscript
13
src/wscript
@@ -192,10 +192,6 @@ def ns3_python_bindings(bld):
|
||||
Warning, stacklevel=2)
|
||||
return
|
||||
|
||||
if ("ns3-%s" % (module,)) not in env.NS3_ENABLED_MODULES:
|
||||
#print "bindings for module %s which is not enabled, skip" % module
|
||||
return
|
||||
|
||||
env.append_value('PYTHON_MODULES_BUILT', module)
|
||||
try:
|
||||
apidefs = env['PYTHON_BINDINGS_APIDEFS'].replace("-", "_")
|
||||
@@ -253,14 +249,21 @@ def ns3_python_bindings(bld):
|
||||
bindgen.env['FEATURES'] = ','.join(features)
|
||||
bindgen.dep_vars = ['FEATURES', "GCC_RTTI_ABI_COMPLETE"]
|
||||
bindgen.name = "pybindgen(ns3 module %s)" % module
|
||||
bindgen.module = module
|
||||
bindgen.install_path = None
|
||||
|
||||
# Retrieve the module dependencies
|
||||
module_obj = bld.get_tgen_by_name('ns3-' + module)
|
||||
module_deps = module_obj.use.copy()
|
||||
module_deps.append('ns3-' + module)
|
||||
|
||||
# generate the extension module
|
||||
pymod = bld(features='cxx cxxshlib pyext')
|
||||
pymod.source = ['bindings/ns3module.cc']
|
||||
pymod.target = '%s/%s' % (module_target_dir, extension_name)
|
||||
pymod.name = 'ns3module_%s' % module
|
||||
pymod.use = ["%s" % mod for mod in pymod.env['NS3_ENABLED_MODULES']] # Should be '"ns3-"+module', but see bug 1117
|
||||
pymod.module= module
|
||||
pymod.use = module_deps # Should be '"ns3-"+module', but see bug 1117
|
||||
if pymod.env['ENABLE_STATIC_NS3']:
|
||||
if sys.platform == 'darwin':
|
||||
pymod.env.append_value('LINKFLAGS', '-Wl,-all_load')
|
||||
|
||||
8
wscript
8
wscript
@@ -1012,6 +1012,14 @@ def build(bld):
|
||||
if obj.module not in bld.env.NS3_ENABLED_MODULES and obj.module not in bld.env.NS3_ENABLED_CONTRIBUTED_MODULES:
|
||||
bld.exclude_taskgen(obj)
|
||||
|
||||
# disable python bindings for disabled modules
|
||||
if 'pybindgen' in obj.name:
|
||||
if ("ns3-%s" % obj.module) not in modules and ("ns3-%s" % obj.module) not in contribModules:
|
||||
bld.exclude_taskgen(obj)
|
||||
if 'pyext' in getattr(obj, "features", []):
|
||||
if ("ns3-%s" % obj.module) not in modules and ("ns3-%s" % obj.module) not in contribModules:
|
||||
bld.exclude_taskgen(obj)
|
||||
|
||||
|
||||
if env['NS3_ENABLED_MODULES']:
|
||||
env['NS3_ENABLED_MODULES'] = list(modules)
|
||||
|
||||
Reference in New Issue
Block a user