~ubuntu-branches/ubuntu/raring/python3.3/raring-proposed

« back to all changes in this revision

Viewing changes to debian/idle-PVER.prerm.in

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2012-03-22 06:14:01 UTC
  • Revision ID: package-import@ubuntu.com-20120322061401-vvrgvw3nvi68rtqq
Tags: 3.3.0~a1-1
* Python 3.3.0 alpha1 release.
* Update to 20120321 from the trunk.
* Update debian/copyright.
* Build-depend on expat (>= 2.1~).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh -e
 
2
 
 
3
remove_bytecode()
 
4
{
 
5
    pkg=$1
 
6
    max=$(LANG=C LC_ALL=C xargs --show-limits < /dev/null 2>&1 | awk '/Maximum/ {print int($NF / 4)}')
 
7
    dpkg -L $pkg \
 
8
        | awk -F/ 'BEGIN {OFS="/"} /\.py$/ {$NF=sprintf("__pycache__/%s.*.py[co]", substr($NF,1,length($NF)-3)); print}' \
 
9
        | xargs --max-chars=$max echo \
 
10
        | while read files; do rm -f $files; done
 
11
    find /usr/lib/@PVER@ -name dist-packages -prune -o -name __pycache__ -empty -print \
 
12
        | xargs -r rm -rf
 
13
}
 
14
 
 
15
case "$1" in
 
16
    remove|upgrade)
 
17
        remove_bytecode idle-@PVER@
 
18
        ;;
 
19
    deconfigure)
 
20
        ;;
 
21
    failed-upgrade)
 
22
        ;;
 
23
    *)
 
24
        echo "prerm called with unknown argument \`$1'" >&2
 
25
        exit 1
 
26
    ;;
 
27
esac
 
28
 
 
29
#DEBHELPER#
 
30
 
 
31
exit 0