bindings/python/wscript
changeset 6589 9c325569fb01
parent 6574 a6007ea4f1cd
--- a/bindings/python/wscript	Fri Aug 20 08:24:29 2010 -0700
+++ b/bindings/python/wscript	Fri Aug 20 12:17:19 2010 -0700
@@ -107,11 +107,18 @@
             conf.check_message("pybindgen location", '', True, ("%s (given)" % Options.options.with_pybindgen))
             conf.env['WITH_PYBINDGEN'] = os.path.abspath(Options.options.with_pybindgen)
     else:
+        # ns-3-dev uses ../pybindgen, while ns-3 releases use ../REQUIRED_PYBINDGEN_VERSION
         pybindgen_dir = os.path.join('..', "pybindgen")
+        pybindgen_release_str = "pybindgen-" + '.'.join([str(x) for x in REQUIRED_PYBINDGEN_VERSION])
+        pybindgen_release_dir = os.path.join('..', pybindgen_release_str)
         if os.path.isdir(pybindgen_dir):
             conf.check_message("pybindgen location", '', True, ("%s (guessed)" % pybindgen_dir))
             conf.env['WITH_PYBINDGEN'] = os.path.abspath(pybindgen_dir)
+        elif os.path.isdir(pybindgen_release_dir):
+            conf.check_message("pybindgen location", '', True, ("%s (guessed)" % pybindgen_release_dir))
+            conf.env['WITH_PYBINDGEN'] = os.path.abspath(pybindgen_release_dir)
         del pybindgen_dir
+        del pybindgen_release_dir
     if not conf.env['WITH_PYBINDGEN']:
         conf.check_message("pybindgen location", '', False)