#!/usr/bin/make -f

PYTHON2_VERSIONS=$(shell pyversions -vr)
PYTHON3_VERSIONS=$(shell py3versions -vr)
PYTHON_VERSIONS=${PYTHON2_VERSIONS} ${PYTHON3_VERSIONS}

export PYBUILD_NAME=django-debug-toolbar

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

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
override_dh_auto_test:
	PYBUILD_SYSTEM=custom \
	PYBUILD_TEST_ARGS="PYTHONPATH=. DJANGO_SETTINGS_MODULE=tests.settings django-admin test tests" \
	dh_auto_test
endif

override_dh_auto_build:
	dh_auto_build
	PYTHONPATH=. http_proxy='127.0.0.1:9' sphinx-build -N -bhtml docs/ build/html
