s3-waf: fix the build.
[samba.git] / lib / wscript_build
index b8bc9e9120d7801dade0c16ca5ccb564c6e4566c..55ca7537c8f5b06f9c6e5bcc482526be9dc124e4 100644 (file)
@@ -1,7 +1,6 @@
 #!/usr/bin/env python
 
 import os, Options
-from samba_utils import TOUCH_FILE, EXPAND_VARIABLES
 
 # work out what python external libraries we need to install
 external_libs = {
@@ -11,7 +10,7 @@ external_libs = {
 
 list = []
 
-for module, package in external_libs.iteritems():
+for module, package in external_libs.items():
     try:
         __import__(module)
     except ImportError:
@@ -21,6 +20,8 @@ for e in list:
     bld.INSTALL_WILDCARD('${PYTHONDIR}/samba/external', e + '/**/*', flat=False,
                          exclude='*.pyc', trim_path=os.path.dirname(e))
 
-if Options.is_install:
-    # we need a blank __init__.py in samba/external
-    TOUCH_FILE(bld.EXPAND_VARIABLES('${PYTHONDIR}/samba/external/__init__.py'))
+bld.SAMBA_GENERATOR('external_init_py',
+                    rule='touch ${TGT}',
+                    target='empty_file')
+
+bld.INSTALL_FILES('${PYTHONDIR}/samba/external', 'empty_file', destname='__init__.py')