#!/usr/bin/make -f

export PYBUILD_NAME=stemmer

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

override_dh_auto_build:
	# Rebuild from Cython source
	rm -f src/*.c
	dh_auto_build

override_dh_auto_test:
	dh_auto_test -- --test-args="-s tests"
	PYBUILD_SYSTEM=custom \
		PYBUILD_TEST_ARGS="{interpreter} runtests.py" \
		dh_auto_test

override_dh_strip:
	dh_strip -p python3-stemmer -p python3-stemmer-dbg --dbg-package=python3-stemmer-dbg

override_dh_installdocs:
	dh_installdocs -p python3-stemmer -p python3-stemmer-dbg --link-doc=python3-stemmer
	dh_installdocs --remaining-packages
