#!/usr/bin/make -f

#export DH_VERBOSE = 1

export PYBUILD_NAME=superqt

# tests need a display to run
# make it easy to exclude some tests later on
XVFB_OPTS=--auto-servernum --server-num=20 -s "-screen 0 1024x768x24 -ac +extension GLX +render -noreset"
EXCLUDED_TESTS :=
# EXCLUDED_TESTS += not foobar
EXCLUDED_TEST_GROUPS :=
# EXCLUDED_TEST_GROUPS += --ignore=test/foobar

export PYBUILD_TEST_CUSTOM = 1
export PYBUILD_TEST_ARGS = xvfb-run $(XVFB_OPTS) python{version} -m pytest -v -k "$(EXCLUDED_TESTS)" $(EXCLUDED_TEST_GROUPS)

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

# before we can build the docs, we also need:
# - newer mkdocs in Debian (> 1.7)
# - mkdocs-macros https://mkdocs-macros-plugin.readthedocs.io/en/latest/
# - fonticon_fa5
# When those are in place the docs can be built (below) and the tidied with
# a "dh ... --with mkdocs" and a dh_mkdocs call to be explicit about themes.
#
# execute_after_dh_auto_build:
# ifeq ($(filter nodoc,$(DEB_BUILD_OPTIONS)),)
# 	LC_ALL=C.UTF-8 mkdocs build -d build/docs
# endif
