File: public_modules.rtinstall

package info (click to toggle)
python-defaults 2.7.9-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,484 kB
  • ctags: 248
  • sloc: python: 2,342; makefile: 565; sh: 203; perl: 7
file content (17 lines) | stat: -rwxr-xr-x 375 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#! /bin/sh
set -e

VERSION=${2#python}
case "$VERSION" in
    2.[45])
	sitedir=/usr/lib/python$VERSION/site-packages;;
    *)
	sitedir=/usr/lib/python$VERSION/dist-packages
esac

if which python >/dev/null 2>&1 && which pycompile >/dev/null 2>&1; then
    pycompile -V $VERSION $sitedir
else
    echo >&2 "python or pycompile not found in $(basename $0) hook."
    exit 1
fi