#!/usr/bin/make -f

export PYBUILD_NAME = straight.plugin

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

override_dh_auto_build:
	dh_auto_build
	PYTHONPATH=../ $(MAKE) -C docs/ html man

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	PYBUILD_SYSTEM=custom \
	PYBUILD_TEST_ARGS="{interpreter} setup.py test" \
	dh_auto_test
else
	@echo "Skipping testsuite as DEB_BUILD_OPTIONS=nocheck is set"
endif
