mirror of
https://github.com/samba-team/samba.git
synced 2025-08-02 00:22:11 +03:00
s4-python: only install external python libs that are missing
This commit is contained in:
@ -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
|
||||
|
12
source4/scripting/python/samba_external/missing.py
Executable file
12
source4/scripting/python/samba_external/missing.py
Executable file
@ -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)
|
Reference in New Issue
Block a user