#!/usr/bin/make -f
# -*- makefile -*-
#export DH_VERBOSE=1

PYVER := $(shell pyversions -d)
export PYBUILD_NAME=djangorestframework

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

override_dh_auto_build:
	dh_auto_build

	# Build the HTML documentation.
	mkdir $(CURDIR)/docs.debian
	LC_ALL=C.UTF-8 PYTHONPATH=/usr/share/mkdocs/themes mkdocs build && mv site docs.debian/html

override_dh_auto_test:
	PYBUILD_SYSTEM=custom \
	PYBUILD_TEST_ARGS="{interpreter} $(CURDIR)/runtests.py --nolint" \
	dh_auto_test

override_dh_auto_clean:
	dh_auto_clean
	rm -rf docs.debian
