3
# Debian prerm script for Python x.y hierarchical modules
4
# Written by Gregor Hoffleit <flight@debian.org>
5
# Extended by Matthias Klose <doko@debian.org>
8
PACKAGE=`basename $0 | sed -e 's/\.[^.]*$//'`
9
PV=`dpkg --listfiles $PACKAGE | sed -n -e '/^\/usr\/lib\/python.*\//{
10
s,/usr/lib/python\([0-9][0-9.]*\)/.*,\1,p
13
DIRLIST="/usr/lib/python$PV/site-packages"
16
configure|abort-upgrade|abort-remove|abort-deconfigure)
17
for i in $DIRLIST ; do
18
/usr/bin/python -W ignore::SyntaxWarning:: -O \
19
/usr/lib/python$PV/compileall.py -q $i
20
/usr/bin/python -W ignore::SyntaxWarning:: \
21
/usr/lib/python$PV/compileall.py -q $i
26
echo "postinst called with unknown argument \`$1'" >&2