#!/usr/bin/make -f

export PYBUILD_INSTALL_ARGS=--install-lib=/usr/share/command-not-found/ --install-scripts=/usr/share/command-not-found/

%:
	dh $@ --with=python3 --buildsystem=pybuild

override_dh_auto_install:
	dh_auto_install
	find debian/command-not-found -name __pycache__ | xargs rm -r
	# Get rid of bash integration script, got merged to bash
	rm $(CURDIR)/debian/command-not-found/etc/bash_command_not_found

override_dh_auto_test:
	python3 -m unittest discover