#!/usr/bin/make -f
#DH_VERBOSE = 1

# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk

export PYBUILD_NAME=sphinx-testing
export PYBUILD_BEFORE_TEST= cp -r {dir}/tests {build_dir};touch {build_dir}/tests/__init__.py;cd {build_dir}
export PYBUILD_TEST_NOSE=1
export PYBUILD_TEST_ARGS="tests"

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

override_dh_installchangelogs:
	dh_installchangelogs CHANGES.rst

override_dh_python3:
	dh_python3
	find $(CURDIR)/debian -name tests -type d | xargs rm -rf

override_dh_python2:
	dh_python2
	find $(CURDIR)/debian -name tests -type d | xargs rm -rf
