#! /usr/bin/make -f

export PYBUILD_NAME=napari
export PYBUILD_TEST_ARGS=-m 'not needs_network'

%:
	dh $@ --buildsystem=pybuild

export DISPLAY=:99.0
execute_before_dh_auto_test:
	/sbin/start-stop-daemon --start --quiet --pidfile $(CURDIR)/custom_xvfb.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99
	sleep 5
	/sbin/start-stop-daemon --start --quiet --pidfile $(CURDIR)/custom_herbstluftwm.pid --make-pidfile --background --exec /usr/bin/herbstluftwm -- --replace
	sleep 5

execute_after_dh_auto_test:
	/sbin/start-stop-daemon --stop --quiet --pidfile $(CURDIR)/custom_herbstluftwm.pid --remove-pidfile || true
	/sbin/start-stop-daemon --stop --quiet --pidfile $(CURDIR)/custom_xvfb.pid --remove-pidfile || true
