s4-waf: create a blank __init__.py in samba/external
authorAndrew Tridgell <tridge@samba.org>
Fri, 2 Apr 2010 01:26:27 +0000 (12:26 +1100)
committerAndrew Tridgell <tridge@samba.org>
Tue, 6 Apr 2010 10:27:22 +0000 (20:27 +1000)
needed for the external lib loader

buildtools/wafsamba/samba_utils.py
lib/wscript_build

index 789720f0ea63b442498622c8aff19cf18e018476..03325e08db64cc74950587da0d761ffdba19cb39 100644 (file)
@@ -407,3 +407,8 @@ def IS_NEWER(bld, file1, file2):
     return t1 > t2
 Build.BuildContext.IS_NEWER = IS_NEWER
 
     return t1 > t2
 Build.BuildContext.IS_NEWER = IS_NEWER
 
+
+def TOUCH_FILE(file):
+    '''touch a file'''
+    f = open(file, 'w')
+    f.close()
index 7424c7f7edc695fdda14e777117b37ac73fee224..b8bc9e9120d7801dade0c16ca5ccb564c6e4566c 100644 (file)
@@ -1,6 +1,7 @@
 #!/usr/bin/env python
 
 #!/usr/bin/env python
 
-import os
+import os, Options
+from samba_utils import TOUCH_FILE, EXPAND_VARIABLES
 
 # work out what python external libraries we need to install
 external_libs = {
 
 # work out what python external libraries we need to install
 external_libs = {
@@ -19,3 +20,7 @@ for module, package in external_libs.iteritems():
 for e in list:
     bld.INSTALL_WILDCARD('${PYTHONDIR}/samba/external', e + '/**/*', flat=False,
                          exclude='*.pyc', trim_path=os.path.dirname(e))
 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'))