#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

export PYBUILD_TEST_ARGS=-k "not test_checks_are_formatted_properly"
export PYBUILD_AFTER_TEST=rm -rf {build_dir}/.coverage {build_dir}/htmlcov {build_dir}/.pytest_cache

%:
	dh $@ --buildsystem=pybuild

execute_before_dh_installman:
	PYTHONPATH=$$(pybuild --print build_dir -p $$(python3 -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")') | awk -F ': ' 'NR==1{print $$2}') help2man --no-discard-stderr -n 'Refurbish and modernize Python codebases' $(CURDIR)/debian/tmp/usr/bin/refurb >$(CURDIR)/refurb.1
