diff options
author | joey <joey> | 2002-12-09 17:21:33 +0000 |
---|---|---|
committer | joey <joey> | 2002-12-09 17:21:33 +0000 |
commit | c77a36f731a5de1b01a65dc32ca19b22deddbde2 (patch) | |
tree | acaa747ecd98bea485f97bfa895d092f1887171a /autoscripts/postinst-python | |
parent | 0603748a9eff14666bd5f8e0f2983565684d324d (diff) | |
download | debhelper-c77a36f731a5de1b01a65dc32ca19b22deddbde2.tar.gz |
r568: * Fixed dh_python ordering in example rules files. Closes: #172283
* Make python postinst fragment only run python if it is installed, useful
for packages that include python modules but do not depend on python.
Diffstat (limited to 'autoscripts/postinst-python')
-rw-r--r-- | autoscripts/postinst-python | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/autoscripts/postinst-python b/autoscripts/postinst-python index 2ecb99b2..6f1f9a5b 100644 --- a/autoscripts/postinst-python +++ b/autoscripts/postinst-python @@ -1,6 +1,8 @@ PYTHON=#PYVER# -DIRLIST="#DIRLIST#" -for i in $DIRLIST ; do - $PYTHON -O /usr/lib/$PYTHON/compileall.py -q $i - $PYTHON /usr/lib/$PYTHON/compileall.py -q $i -done +if which $PYTHON >/dev/null 2>&1; then + DIRLIST="#DIRLIST#" + for i in $DIRLIST ; do + $PYTHON -O /usr/lib/$PYTHON/compileall.py -q $i + $PYTHON /usr/lib/$PYTHON/compileall.py -q $i + done +fi |