#!/usr/bin/make -f
# -*- makefile -*-

export DH_VERBOSE=1
export PYBUILD_NAME=qwt

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

override_dh_clean:
	rm -rf build/html
	dh_clean

override_dh_auto_install:
	dh_auto_install
	dh_numpy3

override_dh_auto_build:
	dh_auto_build
	# do not build the doc for now, it hang on the CI
	PYTHONPATH=. http_proxy='127.0.0.1:9' sphinx-build -vvv -N -bhtml doc/ build/html # HTML generator

override_dh_auto_test: export PYTHONQWT_UNATTENDED_TESTS=1
override_dh_auto_test:
	# use the next line to debug unittest without xvfb
	# dh_auto_test -- -s custom --test-args="{interpreter} -m qwt.tests.__init__"
	dh_auto_test -- -s custom --test-args="xvfb-run -a --server-args=\"-screen 0 1024x768x24\" {interpreter} -m qwt.tests.__init__"
