diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2014-10-17 00:48:20 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2014-11-12 20:21:09 +0100 |
commit | 776424e99113a3ffc6679c583093e2892304a7fd (patch) | |
tree | 704f016dc668e2627bd56c603c37454fbcd26633 /third_party | |
parent | 0de6799996955fbf8e19ace8c4b7b61f5a262cb5 (diff) | |
download | samba-776424e99113a3ffc6679c583093e2892304a7fd.tar.gz |
Add samba.ensure_third_party_module() function, loading external python modules from third_party/ if the system doesn't provide them.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/wscript_build | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/third_party/wscript_build b/third_party/wscript_build new file mode 100644 index 00000000000..d8b9aae0154 --- /dev/null +++ b/third_party/wscript_build @@ -0,0 +1,27 @@ +#!/usr/bin/env python + +import os + +# work out what python external libraries we need to install +external_libs = { + } + +list = [] + +for module, package in external_libs.items(): + try: + __import__(module) + except ImportError: + list.append(package) + +for e in list: + bld.INSTALL_WILDCARD('${PYTHONARCHDIR}/samba/third_party', e + '/**/*', flat=False, + exclude='*.pyc', trim_path=os.path.dirname(e)) + +bld.SAMBA_GENERATOR('third_party_init_py', + rule='touch ${TGT}', + target='empty_file') + +bld.INSTALL_FILES('${PYTHONARCHDIR}/samba/third_party', 'empty_file', destname='__init__.py') +bld.RECURSE('zlib') +bld.RECURSE('popt') |