#! /bin/sh -e # # postinst script for Debian python packages. # Written 1998 by Gregor Hoffleit . # Modified 2001 by Matthias Klose PACKAGE=`basename $0 .postinst` PV=`dpkg --listfiles $PACKAGE | sed -n -e '/^\/usr\/lib\/python.*\//{ s,/usr/lib/python\([0-9][0-9.]*\)/.*,\1,p q }'` PYTHON=python$PV DIRLIST="/usr/lib/python$PV/site-packages/extension" case "$1" in configure|abort-upgrade|abort-remove|abort-deconfigure) for i in $DIRLIST ; do /usr/bin/$PYTHON -O /usr/lib/python$PV/compileall.py -q $i /usr/bin/$PYTHON /usr/lib/python$PV/compileall.py -q $i done ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac #DEBHELPER# exit 0