#!/usr/bin/make -f

export PYBUILD_NAME=qstylizer

ifeq (,$(findstring nodoc,$(DEB_BUILD_OPTIONS)))
%:
	dh $@ --with sphinxdoc --buildsystem=pybuild

execute_after_dh_auto_build:
	PYTHONPATH=$(CURDIR) $(MAKE) -C doc SPHINXBUILD=sphinx-build html

execute_after_dh_auto_clean:
	$(MAKE) -C doc SPHINXBUILD=sphinx-build clean

override_dh_installdocs:
	dh_installdocs -ppython-qstylizer-doc --doc-main-package=python3-qstylizer
	dh_installdocs --remaining-packages

else
%:
	dh $@ --buildsystem=pybuild
endif

override_dh_auto_test:
	dh_auto_test -O--buildsystem=pybuild -- --test-pytest --test-args test
