diff --git a/bindings/python/ns3modulegen.py b/bindings/python/ns3modulegen.py index 4445d9eab..4ca929a1d 100644 --- a/bindings/python/ns3modulegen.py +++ b/bindings/python/ns3modulegen.py @@ -107,6 +107,11 @@ def main(): mod = __import__(local_module) mod.register_functions(root_module) + + # if GtkConfigStore support is disabled, disable the class wrapper + if 'DISABLE_GTK_CONFIG_STORE' in os.environ: + root_module.classes.remove(root_module['ns3::GtkConfigStore']) + root_module.generate(out, '_ns3') out.close() diff --git a/bindings/python/wscript b/bindings/python/wscript index 9ad0fb18f..d3d8f9616 100644 --- a/bindings/python/wscript +++ b/bindings/python/wscript @@ -334,6 +334,10 @@ def build(bld): bindgen.hidden_outputs.append("ns3_module_%s.cc" % module.replace('-', '_')) bindgen.prio = 50 + bindgen.os_env = dict(os.environ) + if not env['ENABLE_GTK_CONFIG_STORE']: + bindgen.os_env['DISABLE_GTK_CONFIG_STORE'] = "1" + ## we build python bindings if either we have the tools to ## generate them or if the pregenerated source file is already