Debian Codegraph @

debian/python3-twisted.postinst

raw
1 #! /bin/sh
2
3 set -e
4
5 #DEBHELPER#
6
7 rebuild_cache()
8 {
9 # remove all cache files, then rebuild for the installed python3 versions
10 rm -f /usr/lib/python3/*-packages/twisted/plugins/dropin.cache
11 for p in $(py3versions -i); do
12 "${p}" -c 'from twisted.plugin import IPlugin, getPlugins; list(getPlugins(IPlugin))' \
13 >/dev/null 2>&1 || true
14 done
15 }
16
17 case "$1" in
18 triggered)
19 if [ "$2" = twisted-plugins-cache ]; then
20 rebuild_cache
21 fi
22 ;;
23
24 configure)
25 rebuild_cache
26 ;;
27 esac
28
29 exit 0