diff options
author | Lutz Justen <ljusten@google.com> | 2019-04-22 10:22:16 -0700 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2019-04-24 07:32:31 +0000 |
commit | 92f30f91e44dba7e85d56279bbbe3662d0b5faeb (patch) | |
tree | 69e65604cea2972578810efdc45729f54b7058fa /third_party/wscript | |
parent | 3020050bdf9df077ec9a0e962a689557187174ac (diff) | |
download | samba-92f30f91e44dba7e85d56279bbbe3662d0b5faeb.tar.gz |
waf: build: Respect --disable-python for third_party modules
Skips installation of samba/third_party stuff into the python directory if
--disable-python is set.
Added test after install that confirms no python modules installed.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13905
Signed-off-by: Lutz Justen <ljusten@google.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Apr 24 07:32:31 UTC 2019 on sn-devel-184
Diffstat (limited to 'third_party/wscript')
-rw-r--r-- | third_party/wscript | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/third_party/wscript b/third_party/wscript index ecd1975d7b8..286e1015e70 100644 --- a/third_party/wscript +++ b/third_party/wscript @@ -60,23 +60,25 @@ def configure(conf): def build(bld): - list = [] + if not bld.env.disable_python: + list = [] - for module, package in external_pkgs.items(): - try: - __import__(module) - except ImportError: - list.append(package) + for module, package in external_pkgs.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)) - 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.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.INSTALL_FILES('${PYTHONARCHDIR}/samba/third_party', 'empty_file', destname='__init__.py') bld.RECURSE('cmocka') bld.RECURSE('zlib') bld.RECURSE('popt') |