summaryrefslogtreecommitdiff
path: root/source4/scripting/python
diff options
context:
space:
mode:
Diffstat (limited to 'source4/scripting/python')
-rw-r--r--source4/scripting/python/config.mk4
-rwxr-xr-xsource4/scripting/python/samba_external/missing.py13
2 files changed, 11 insertions, 6 deletions
diff --git a/source4/scripting/python/config.mk b/source4/scripting/python/config.mk
index d36e136346..db35669e1a 100644
--- a/source4/scripting/python/config.mk
+++ b/source4/scripting/python/config.mk
@@ -23,9 +23,9 @@ python_glue_OBJ_FILES = $(pyscriptsrcdir)/pyglue.o
$(python_glue_OBJ_FILES): CFLAGS+=-I$(ldbsrcdir)
-_PY_FILES = $(shell find $(pyscriptsrcdir)/samba ../lib/subunit/python -type f -name "*.py")
+_PY_FILES = $(shell find $(pyscriptsrcdir)/samba -type f -name "*.py")
-$(eval $(foreach pyfile, $(_PY_FILES),$(call python_py_module_template,$(patsubst $(pyscriptsrcdir)/%,%,$(subst ../lib/subunit/python,,$(pyfile))),$(pyfile))))
+$(eval $(foreach pyfile, $(_PY_FILES),$(call python_py_module_template,$(patsubst $(pyscriptsrcdir)/%,%,$(pyfile)),$(pyfile))))
PYDOCTOR = pydoctor
PYDOCTOR_OPTIONS = --project-name Samba --project-url http://www.samba.org/ \
diff --git a/source4/scripting/python/samba_external/missing.py b/source4/scripting/python/samba_external/missing.py
index 50bda65a21..d3dd2b9290 100755
--- a/source4/scripting/python/samba_external/missing.py
+++ b/source4/scripting/python/samba_external/missing.py
@@ -1,12 +1,17 @@
#!/usr/bin/python
# work out what python external libraries we need to install
+external_libs = {
+ "dns.resolver": "dnspython/dns",
+ "subunit": "subunit/python/subunit",
+ "testtools": "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)