summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-03-31 03:15:24 +0200
committerJelmer Vernooij <jelmer@samba.org>2010-03-31 03:15:24 +0200
commite4af3afd7ae3e39218b42a42d39c2ec10be9a642 (patch)
tree64718865cc5287477592eb9fa194d4353a35a0d0 /source4
parent31094b0e8ca73e3150de9de689f4c5c38b2e9f1f (diff)
downloadsamba-e4af3afd7ae3e39218b42a42d39c2ec10be9a642.tar.gz
samba-e4af3afd7ae3e39218b42a42d39c2ec10be9a642.tar.bz2
samba-e4af3afd7ae3e39218b42a42d39c2ec10be9a642.zip
samba_external: Simplify script to find missing external packages; include subunit and testtools as well.
Diffstat (limited to 'source4')
-rwxr-xr-xsource4/scripting/python/samba_external/missing.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/source4/scripting/python/samba_external/missing.py b/source4/scripting/python/samba_external/missing.py
index 50bda65a21..082afd8397 100755
--- a/source4/scripting/python/samba_external/missing.py
+++ b/source4/scripting/python/samba_external/missing.py
@@ -2,11 +2,17 @@
# work out what python external libraries we need to install
+external_libs = {
+ "dns.resolver": "dnspython",
+ "subunit": "subunit",
+ "testtools": "testtools"}
+
list = []
-try:
- import dns.resolver
-except:
- list.append("dnspython")
+for module, package in external_libs.iteritems():
+ try:
+ __import__(module)
+ except ImportError:
+ list.append(package)
print ' '.join(list)