#! /bin/sh
set -e

VERSION=${2#python}
if which py3compile >/dev/null 2>&1; then
    py3compile -V $VERSION /usr/lib/python3/dist-packages
else
    echo >&2 "py3compile not found in $(basename $0) hook."
    exit 1
fi
