Modular bindings: add support for <module>.py and _<module>.so layout, for extending modules in Python

This commit is contained in:
Gustavo J. A. M. Carneiro
2011-03-27 23:35:55 +01:00
parent 5787b9bf36
commit 35a81dd4e4
3 changed files with 19 additions and 4 deletions

View File

@@ -44,7 +44,7 @@ class MyMultiSectionFactory(MultiSectionFactory):
def main(argv):
module_abs_src_path, target, output_cc_file_name = argv[1:]
module_abs_src_path, target, extension_name, output_cc_file_name = argv[1:]
module_name = os.path.basename(module_abs_src_path)
out = MyMultiSectionFactory(output_cc_file_name)
@@ -70,6 +70,7 @@ def main(argv):
sys.path.pop(0)
root_module = module_apidefs.module_init()
root_module.set_name(extension_name)
root_module.add_include('"ns3/%s-module.h"' % module_name)
# -----------

View File

@@ -15,7 +15,7 @@ import Build
import Utils
## https://launchpad.net/pybindgen/
REQUIRED_PYBINDGEN_VERSION = (0, 15, 0, 777)
REQUIRED_PYBINDGEN_VERSION = (0, 15, 0, 779)
REQUIRED_PYGCCXML_VERSION = (0, 9, 5)