diff options
Diffstat (limited to 'debian/postinst')
-rw-r--r-- | debian/postinst | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/debian/postinst b/debian/postinst index 6923e0f..ed8ed5c 100644 --- a/debian/postinst +++ b/debian/postinst @@ -7,11 +7,13 @@ if [ "$1" = "configure" ]; then fi NAME=scons +PYTHON_VERSION=`python -V 2>&1| cut -d" " -f2 | cut -d"." -f0-2` +PYTHON_EXE_NAME=`which python$PYTHON_VERSION` case "$1" in configure|abort-upgrade|abort-remove|abort-deconfigure) dpkg --listfiles $NAME | grep '\.py$' | \ - xargs -n 1 /usr/bin/python2.2 -c 'import py_compile,sys;py_compile.compile(sys.argv[1])' + xargs -n 1 $PYTHON_EXE_NAME -c 'import py_compile,sys;py_compile.compile(sys.argv[1])' dpkg --listfiles $NAME | grep '\.py$' | \ - xargs -n 1 /usr/bin/python2.2 -O -c 'import py_compile,sys;py_compile.compile(sys.argv[1])' + xargs -n 1 $PYTHON_EXE_NAME -O -c 'import py_compile,sys;py_compile.compile(sys.argv[1])' ;; esac |