#!/usr/bin/make -f

export PYBUILD_NAME=pyqtgraph


# run tests in xvfb with suitable options
export PYOPENGL_PLATFORM = glx
export QT_QPA_PLATFORM = xcb

XVFB_OPTS = --server-args="-screen 0, 1920x1200x24 -ac +extension GLX +render -noreset"

export PYBUILD_TEST_CUSTOM = 1
export PYBUILD_TEST_ARGS = xvfb-run $(XVFB_OPTS) python{version} -m pytest -v -n auto --pyargs tests pyqtgraph.examples

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


execute_before_dh_auto_clean:
	rm -rf doc/build

execute_before_dh_auto_build:
	cd doc && $(MAKE) html
