8 # work out what python external libraries we need to install
10 "dns.resolver": "dnspython/dns",
11 "iso8601": "pyiso8601/iso8601",
15 def find_third_party_module(conf
, module
, package
):
16 conf
.COMPOUND_START("Checking for third party Python module %s" % module
)
22 # Installed on the system
23 conf
.COMPOUND_END("system")
27 sys
.path
.append(os
.path
.join(conf
.curdir
, os
.path
.dirname(package
)))
31 if samba_git
.has_submodules(conf
.srcdir
):
32 raise Utils
.WafError("""\
33 Unable to find Python module '%s'. Please install the system package or check \
34 out the relevant submodule by running 'git submodule update --init'.
37 raise Utils
.WafError("""\
38 Unable to find Python module '%s'. Please install the system package or place a copy in
40 """ % (module
, package
))
42 conf
.COMPOUND_END("bundled")
48 for module
, package
in external_pkgs
.items():
49 find_third_party_module(conf
, module
, package
)
57 for module
, package
in external_pkgs
.items():
64 bld
.INSTALL_WILDCARD('${PYTHONARCHDIR}/samba/third_party', e
+ '/**/*', flat
=False,
65 exclude
='*.pyc', trim_path
=os
.path
.dirname(e
))
67 bld
.SAMBA_GENERATOR('third_party_init_py',
71 bld
.INSTALL_FILES('${PYTHONARCHDIR}/samba/third_party', 'empty_file', destname
='__init__.py')