c47dfc01a8c54bf9ea20b56e5845426df6bcb05b
[nivanova/samba-autobuild/.git] / lib / wscript_build
1 #!/usr/bin/env python
2
3 import os
4
5 # work out what python external libraries we need to install
6 external_libs = {
7     "dns.resolver": "dnspython/dns",
8     "subunit": "subunit/python/subunit",
9     "testtools": "testtools/testtools"}
10
11 list = []
12
13 for module, package in external_libs.iteritems():
14     try:
15         __import__(module)
16     except ImportError:
17         list.append(package)
18
19 for e in list:
20     bld.INSTALL_WILDCARD('${PYTHONDIR}', e + '/**/*', flat=False,
21                          exclude='*.pyc', trim_path=os.path.dirname(e))