]> git.donarmstrong.com Git - debhelper.git/blobdiff - autoscripts/postinst-python
r574: * wiggy didn't take my hint about making update-modules send warnings to
[debhelper.git] / autoscripts / postinst-python
index 2ecb99b2b8273cc00a9ca44f44960fabb6891645..6f1f9a5b885e9ebe9005470ccaef5067ef8a88a6 100644 (file)
@@ -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