#!/usr/bin/make -f
# -*- makefile -*-

#export DH_VERBOSE=1
export PYBUILD_NAME=dugong
export PYBUILD_TEST_PYTEST=1
export PYBUILD_TEST_ARGS="{dir}/test/"

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

.PHONY: override_dh_auto_build
override_dh_auto_build:
	dh_auto_build

	# Build docs
	python3 setup.py build_sphinx

.PHONY: override_dh_auto_clean
override_dh_auto_clean:
	dh_auto_clean
	rm -rf doc/html doc/doctrees

.PHONY: update_intersphinx
update_intersphinx:
	wget http://docs.python.org/3/objects.inv -O debian/python.inv

.PHONY: get-orig-source
get-orig-source:
	uscan --rename --destdir=$(CURDIR) --repack --force-download \
	      --download-current-version
