#!/usr/bin/make -f

# handle setup.py file provided in patch
export PYBUILD_SYSTEM = distutils
export PYBUILD_CLEAN_ARGS = $(if $(wildcard setup.py),,|| true)

# build documentation unless nodoc requested
execute_after_dh_auto_build:
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
	sphinx-build -b html docs debian/doc/html
endif

%:
	dh $@ --buildsystem=pybuild
