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

#export DH_VERBOSE=1
export DH_OPTIONS

export PYBUILD_NAME=gpiozero

# Don't run test_real_pins even if we're running on a Pi; it expects GPIOs to
# be bridged for functional testing
export PYBUILD_TEST_ARGS=-k-test_real_pins.py

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

override_dh_auto_test:
	python3 setup.py sdist
	dh_auto_test

override_dh_auto_build:
	dh_auto_build
	PYTHONPATH=. sphinx-build -N -bhtml docs/ build/html
	PYTHONPATH=. sphinx-build -N -bman docs/ build/man

override_dh_installdocs:
	dh_installdocs --doc-main-package=python3-gpiozero -ppython-gpiozero-doc
	dh_installdocs -ppython3-gpiozero
