Make ns3_python_bindings skip bindings with warning if apidefs dir not found
authorGustavo J. A. M. Carneiro <gjc@inescporto.pt>
Tue, 08 Mar 2011 15:02:28 +0000
changeset 6876 9ac9bd55541d
parent 6875 106abe4a32f0
child 6877 826f20022032
Make ns3_python_bindings skip bindings with warning if apidefs dir not found
src/wscript
--- a/src/wscript	Tue Mar 08 12:46:53 2011 +0000
+++ b/src/wscript	Tue Mar 08 15:02:28 2011 +0000
@@ -128,6 +128,12 @@
     if env['BINDINGS_TYPE'] not in ('modular', 'both'):
         return
 
+    if not bld.path.find_dir("bindings"):
+        warnings.warn("(in %s) Requested to build modular python bindings, but apidefs dir not found "
+                      "=> skipped the bindings." % str(bld.path),
+                      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)