summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-03-05 11:53:19 +1100
committerAndrew Tridgell <tridge@samba.org>2010-03-05 11:54:37 +1100
commit25a0750b8184e434e30717bb47f0b36a00e41629 (patch)
tree3815ef42a7ab11243be1e465a2608a36ec8f2dbf /source4
parent7d86257d54cb59d016a051b91bdee62ab2f8a0d5 (diff)
downloadsamba-25a0750b8184e434e30717bb47f0b36a00e41629.tar.gz
samba-25a0750b8184e434e30717bb47f0b36a00e41629.tar.bz2
samba-25a0750b8184e434e30717bb47f0b36a00e41629.zip
s4-python: only install external python libs that are missing
Diffstat (limited to 'source4')
-rwxr-xr-xsource4/script/installmisc.sh8
-rwxr-xr-xsource4/scripting/python/samba_external/missing.py12
2 files changed, 19 insertions, 1 deletions
diff --git a/source4/script/installmisc.sh b/source4/script/installmisc.sh
index fecd1ebbf6..6aaf6bec84 100755
--- a/source4/script/installmisc.sh
+++ b/source4/script/installmisc.sh
@@ -83,6 +83,12 @@ cp setup/dns_update_list $SETUPDIR || exit 1
echo "Installing external python libraries"
mkdir -p $PYTHONDIR/samba_external || exit 1
-cp -r scripting/python/samba_external/* $PYTHONDIR/samba_external/ || exit 1
+for p in $($PYTHON scripting/python/samba_external/missing.py);
+do
+ echo "Installing missing python library $p"
+ mkdir -p $PYTHONDIR/samba_external/$p
+ cp -r scripting/python/samba_external/$p/* $PYTHONDIR/samba_external/$p/ || exit 1
+done
+
exit 0
diff --git a/source4/scripting/python/samba_external/missing.py b/source4/scripting/python/samba_external/missing.py
new file mode 100755
index 0000000000..50bda65a21
--- /dev/null
+++ b/source4/scripting/python/samba_external/missing.py
@@ -0,0 +1,12 @@
+#!/usr/bin/python
+
+# work out what python external libraries we need to install
+
+list = []
+
+try:
+ import dns.resolver
+except:
+ list.append("dnspython")
+
+print ' '.join(list)