From c77a36f731a5de1b01a65dc32ca19b22deddbde2 Mon Sep 17 00:00:00 2001 From: joey Date: Mon, 9 Dec 2002 17:21:33 +0000 Subject: 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. --- autoscripts/postinst-python | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'autoscripts') 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 -- cgit v1.2.3