#!/usr/bin/make -f

export PYBUILD_NAME=vermin
export PYBUILD_TEST_CUSTOM=1
export PYBUILD_TEST_ARGS=\
  {interpreter} runtests.py

# Work-around for python-module-in-wrong-location when multiple
# python3 versions are available. The build directory isn't
# cleaned between invocations of `pythonX.Y -m build`, resulting
# in a build/ directory that causes later builds to have a different
# top_level.txt.
export PYBUILD_BEFORE_BUILD=rm -rf build/

%:
	dh $@ --buildsystem=pybuild

execute_before_dh_auto_build:
	help2man -n 'Detect minimum Python versions needed to run code' --no-info 'python3 ./vermin.py' > debian/vermin.1
