1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-25 06:04:04 +03:00
samba-mirror/third_party/wscript_build
Jelmer Vernooij 13bd83ad30 Bundle pyiso8601 for iso8601 time/date manipulation.
(corrected lib/update-external.sh by Andrew Bartlett)

Change-Id: I0f992b949b1717635ff26fa0db6073675cce4ad7
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2015-03-06 04:41:48 +01:00

30 lines
768 B
Python

#!/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')