From e50342f33d5969f34e5b83f1ed3e7644470fb2ce Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 28 Mar 2015 15:43:29 +0000 Subject: [PATCH] Move configure part of third party to third_party/wscript. Change-Id: I34875a8bde99df2e0a2659677e88640bb0ec1816 Signed-off-by: Jelmer Vernooij Reviewed-by: David Disseldorp --- third_party/wscript | 36 ++++++++++++++++++++++++++++++++++++ third_party/wscript_build | 29 ----------------------------- wscript | 3 +-- 3 files changed, 37 insertions(+), 31 deletions(-) create mode 100644 third_party/wscript delete mode 100644 third_party/wscript_build diff --git a/third_party/wscript b/third_party/wscript new file mode 100644 index 00000000000..8e7581f1e6c --- /dev/null +++ b/third_party/wscript @@ -0,0 +1,36 @@ +#!/usr/bin/env python + +import os + +# work out what python external libraries we need to install +external_libs = { + "dns.resolver": "dnspython/dns", + "iso8601": "pyiso8601/iso8601", + } + + +def configure(conf): + conf.RECURSE('popt') + conf.RECURSE('zlib') + + +def build(bld): + 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') diff --git a/third_party/wscript_build b/third_party/wscript_build deleted file mode 100644 index 9a5fabc0544..00000000000 --- a/third_party/wscript_build +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env python - -import os - -# work out what python external libraries we need to install -external_libs = { - "dns.resolver": "dnspython/dns", - "iso8601": "pyiso8601", - } - -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') diff --git a/wscript b/wscript index 146556bec4f..8cf22f86ac0 100644 --- a/wscript +++ b/wscript @@ -114,8 +114,7 @@ def configure(conf): conf.RECURSE('dynconfig') if conf.CHECK_FOR_THIRD_PARTY(): - conf.RECURSE('third_party/zlib') - conf.RECURSE('third_party/popt') + conf.RECURSE('third_party') else: if not conf.CHECK_ZLIB(): raise Utils.WafError('zlib development packages have not been found.\nIf third_party is installed, check that it is in the proper place.') -- 2.34.1