post_install() {
  set -e
  cd /usr/share/ad-miner
  poetry config cache-dir /usr/share/ad-miner
  poetry install --no-cache
}

post_upgrade() {
  post_install "$@"
}

post_remove() {
  # /usr/share/ad-miner/{artifacts,cache,virtualenvs}
  rm -r /usr/share/ad-miner
}
