summaryrefslogtreecommitdiff
path: root/lib/wscript_build
blob: 7424c7f7edc695fdda14e777117b37ac73fee224 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env python

import os

# work out what python external libraries we need to install
external_libs = {
    "dns.resolver": "dnspython/dns",
    "subunit": "subunit/python/subunit",
    "testtools": "testtools/testtools"}

list = []

for module, package in external_libs.iteritems():
    try:
        __import__(module)
    except ImportError:
        list.append(package)

for e in list:
    bld.INSTALL_WILDCARD('${PYTHONDIR}/samba/external', e + '/**/*', flat=False,
                         exclude='*.pyc', trim_path=os.path.dirname(e))