#! /bin/sh

set -e

if [ "$1" = "remove" ]; then

    if [ -f /var/lib/python/@PVER@_installed ]; then
	rm -f /var/lib/python/@PVER@_installed
	rmdir --ignore-fail-on-non-empty /var/lib/python 2>/dev/null
    fi

    rmdir --parents /usr/local/lib/@PVER@ 2>/dev/null || true
fi
