From 865e478e25e6c9d69915061f6f2211298e730068 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 2 Apr 2010 12:26:27 +1100 Subject: s4-waf: create a blank __init__.py in samba/external needed for the external lib loader --- buildtools/wafsamba/samba_utils.py | 5 +++++ lib/wscript_build | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/buildtools/wafsamba/samba_utils.py b/buildtools/wafsamba/samba_utils.py index 789720f0ea..03325e08db 100644 --- a/buildtools/wafsamba/samba_utils.py +++ b/buildtools/wafsamba/samba_utils.py @@ -407,3 +407,8 @@ def IS_NEWER(bld, file1, file2): return t1 > t2 Build.BuildContext.IS_NEWER = IS_NEWER + +def TOUCH_FILE(file): + '''touch a file''' + f = open(file, 'w') + f.close() diff --git a/lib/wscript_build b/lib/wscript_build index 7424c7f7ed..b8bc9e9120 100644 --- a/lib/wscript_build +++ b/lib/wscript_build @@ -1,6 +1,7 @@ #!/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 = { @@ -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)) + +if Options.is_install: + # we need a blank __init__.py in samba/external + TOUCH_FILE(bld.EXPAND_VARIABLES('${PYTHONDIR}/samba/external/__init__.py')) -- cgit