#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

export PYBUILD_NAME=pykka

# Skip tests on Python 2, as the Python 2 version of python-eventlet has
# already been removed from unstable. We must keep Python 2 support until all
# Mopidy packages in Debian have been upgraded to Python 3.
export PYBUILD_DISABLE_python2=test

# Skip tests that requires pytest-mock >= 1.8.0.
export PYBUILD_TEST_ARGS=-k "not noncallable_mock"

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

override_dh_installchangelogs:
	dh_installchangelogs docs/changes.rst

override_dh_installdocs:
	make -C docs/ clean html
	dh_installdocs

override_dh_auto_clean:
	dh_auto_clean
	rm -rf .pytest_cache/
	make -C docs/ clean
