samba_external: Simplify script to find missing external packages; include subunit...
[idra/samba.git] / source4 / scripting / python / samba_external / missing.py
1 #!/usr/bin/python
2
3 # work out what python external libraries we need to install
4
5 external_libs = {
6     "dns.resolver": "dnspython", 
7     "subunit": "subunit",
8     "testtools": "testtools"}
9
10 list = []
11
12 for module, package in external_libs.iteritems():
13     try:
14         __import__(module)
15     except ImportError:
16         list.append(package)
17
18 print ' '.join(list)