1 # This is a default template for a post-install scriptlet. You can
2 # remove any functions you don't need (and this header).
4 # arg 1: the new package version
9 # arg 1: the new package version
11 PYTHONVER=$(python2 -c 'import sys;print(sys.version[0:3])')
12 echo "Byte compiling python modules..."
13 python2 /usr/lib/python$PYTHONVER/compileall.py >/dev/null 2>&1
14 python2 -O /usr/lib/python$PYTHONVER/compileall.py >/dev/null 2>&1
17 # arg 1: the new package version
18 # arg 2: the old package version
23 # arg 1: the new package version
24 # arg 2: the old package version
26 PYTHONVER=$(python2 -c 'import sys;print(sys.version[0:3])')
27 echo "Byte compiling python modules..."
28 python2 /usr/lib/python$PYTHONVER/compileall.py >/dev/null 2>&1
29 python2 -O /usr/lib/python$PYTHONVER/compileall.py >/dev/null 2>&1
32 # arg 1: the old package version
37 # arg 1: the old package version