File: public_modules.rtremove

package info (click to toggle)
python3-defaults 3.1.3-12%2Bsqueeze1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 656 kB
  • ctags: 132
  • sloc: python: 1,616; makefile: 311; sh: 132; perl: 5
file content (20 lines) | stat: -rwxr-xr-x 573 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#! /bin/sh
set -e

VERSION=${2#python}
if which py3clean >/dev/null 2>&1; then
	if [ "$VERSION" = 3.1 ]; then
		find /usr/lib/python3.1/ -name '*.py[co]' -delete
        find /usr/lib/python3/ -name '*.py[co]' -delete
	else
		py3clean -V $VERSION /usr/lib/python3/
	fi
else
	if [ "$VERSION" = 3.1 ]; then
		find /usr/lib/python3.1/ -name '*.py[co]' -delete
	else
		TAG=`python$VERSION -c "import imp; print(imp.magic_tags[imp.get_magic()])"` \
		find /usr/lib/python3/ -name "*.$TAG.py[co]" -delete
		find /usr/lib/python3/ -depth -empty -name '__pycache__' -delete
	fi
fi