#!/usr/bin/make -f

export PYBUILD_NAME=django-feincms

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

override_dh_auto_build:
	dh_auto_build
	sphinx-build -vvv -b html docs debian/html

override_dh_sphinxdoc:
	dh_sphinxdoc usr/share/doc/python-django-feincms-doc/html

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	set -e; cd tests && for python in $$(pyversions -s) $$(py3versions -s); do \
		echo "——— Running tests with $$python ———"; \
		$$python ./manage.py test --settings=testapp.settings --verbosity=2; \
	done
endif
