Bug 1257 - waf install __init__ Python files even with --disable-python
authorGustavo J. A. M. Carneiro <gjc@inescporto.pt>
Fri, 23 Sep 2011 12:19:53 +0100
changeset 7560 1f697c6f0b12
parent 7559 2024597e0ad8
child 7561 375e4985e37a
Bug 1257 - waf install __init__ Python files even with --disable-python
bindings/python/wscript
--- a/bindings/python/wscript	Fri Sep 23 11:58:59 2011 +0100
+++ b/bindings/python/wscript	Fri Sep 23 12:19:53 2011 +0100
@@ -428,11 +428,6 @@
 
     set_pybindgen_pythonpath(env)
 
-    bld.new_task_gen(features='copy',
-                     source="ns__init__.py",
-                     target='ns/__init__.py')
-    bld.install_as('${PYTHONDIR}/ns/__init__.py', 'ns__init__.py')
-
     if Options.options.apiscan:
         if not env['ENABLE_PYTHON_SCANNING']:
             raise Utils.WafError("Cannot re-scan python bindings: (py)gccxml not available")
@@ -481,6 +476,12 @@
         grp = bld.get_group(bld.current_group)
         grp.append(task)
 
+        bld.new_task_gen(features='copy',
+                         source="ns__init__.py",
+                         target='ns/__init__.py')
+        bld.install_as('${PYTHONDIR}/ns/__init__.py', 'ns__init__.py')
+
+
     # note: the actual build commands for the python bindings are in
     # src/wscript, not here.