1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
#!/bin/sh
set -e
#DEBHELPER#
# Standard tools just arrange to produce unoptimized .pyc files; ensure
# that we also have optimized .pyo files for better performance.
# (Compile with -Wignore per #358023, and cover /usr/share/bitpim/code
# in addition to /usr/lib/bitpim to ensure that bitpim's .pyo files
# will remain valid when the default Python version changes.)
if test -x /usr/bin/pyversions; then
PYTHON=`pyversions -d`
else
PYTHON=python2.3
fi
if which $PYTHON >/dev/null 2>&1 && [ -e /usr/lib/$PYTHON/compileall.py ]; then
for d in /usr/lib/bitpim /usr/share/bitpim/code; do
test -d $d && $PYTHON -OO -Wignore /usr/lib/$PYTHON/compileall.py -q $d
done
fi
exit 0
|