#!/usr/bin/make -f

%:
	dh "$@" --with python3,translations --buildsystem pybuild

override_dh_auto_test:
ifeq (, $(findstring nocheck, $(DEB_BUILD_OPTIONS)))
	tests/run-linters --errors-only
	python3 -m pytest -ra -v tests/unit/ tests/integration/
endif

override_dh_installinit:
	dh_installinit -papport-core-dump-handler --name=apport --error-handler=true --only-scripts

override_dh_install:
	dh_install -X.pyc -X.egg-info
	pod2man -c Debhelper -r "$(DEB_VERSION)" debhelper/dh_apport debhelper/dh_apport.1

override_dh_python3:
	dh_python3 --skip-private
