#!/usr/bin/make -f

export DH_VERBOSE=1
export PYBUILD_NAME=limnoria

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

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	LC_ALL=C.UTF-8 \
	PYBUILD_SYSTEM=custom \
	PYBUILD_TEST_ARGS="PYTHONPATH={build_dir} \
		build/scripts-{version}/supybot-test \
		test \
		--no-setuid \
		--no-network \
		--disable-multiprocessing \
		--plugins-dir={build_dir}/supybot/plugins/" \
	dh_auto_test
else
	@echo "Skipping test suite as DEB_BUILD_OPTIONS=nocheck is set"
endif
