diff options
author | Jeremy Allison <jra@samba.org> | 2010-03-31 10:01:03 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2010-03-31 10:01:03 -0700 |
commit | 2e839a636b2ea3f4d8dfcf5a8e99d9725787ba61 (patch) | |
tree | 42f219978f7d07d8fa196cb9ebd9db7be971450d /source4/scripting/python | |
parent | f58d02dbeeeba037ee79fba93a707e959e90ffa3 (diff) | |
parent | 6f30b9a6ff57ca6112e6319c64c411d2bf09be79 (diff) | |
download | samba-2e839a636b2ea3f4d8dfcf5a8e99d9725787ba61.tar.gz samba-2e839a636b2ea3f4d8dfcf5a8e99d9725787ba61.tar.bz2 samba-2e839a636b2ea3f4d8dfcf5a8e99d9725787ba61.zip |
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Diffstat (limited to 'source4/scripting/python')
-rw-r--r-- | source4/scripting/python/config.mk | 4 | ||||
-rwxr-xr-x | source4/scripting/python/samba_external/missing.py | 13 |
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) |