post_install() {
  set -e
  cd /usr/share/certipy
  python -m venv venv
  source venv/bin/activate &&
    pip install --isolated --root="/usr/share/certipy" --prefix='venv' .
}

post_upgrade() {
  post_install "$@"
}

post_remove() {
  # /usr/share/certipy/venv
  rm -r /usr/share/certipy
}

