#!/usr/bin/make -f

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

export PYBUILD_NAME=h5netcdf
export PYBUILD_TEST_ARGS=-v

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

execute_after_dh_auto_build:
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
	PYTHONPATH=. sphinx-build -b html -N doc/ $(CURDIR)/.pybuild/docs/html
	rm -r $(CURDIR)/.pybuild/docs/html/_static/__pycache__
endif
