#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1

export PYBUILD_NAME=pcbasic

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

override_dh_auto_build:
	dh_auto_build
	PYTHONPATH=. http_proxy='127.0.0.1:9' python3 -m make docs

override_dh_auto_test:
	mkdir -p $(CURDIR)/tests/unit/output/single
	XDG_RUNTIME_DIR=`mktemp -d` screen -D -m -L -Logfile dh_auto_test.log $(CURDIR)/debian/dh_auto_test_wrapper -- --test-args="$(CURDIR)"
	cat dh_auto_test.log
	@echo 0 > dh_auto_test.cmp1
	@cmp dh_auto_test.cmp1 dh_auto_test.retval

override_dh_auto_clean:
	dh_auto_clean
	rm -rf $(CURDIR)/tests/unit/output
