#!/usr/bin/make -f

#export DH_VERBOSE=1
# TODO: see if we can rm this work around after
# https://github.com/jupyter/nbformat/issues/76 is fixed
# Generally, it's an upstream bug if we need to set this for the whole build.
export LC_ALL=C.UTF-8

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

override_dh_auto_install:
	dh_auto_install
	rm -r `find debian/tmp -name tests -type d`

override_dh_sphinxdoc:
ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
	PYTHONPATH=. sphinx-build -b html docs debian/python-nbformat-doc/usr/share/doc/python-nbformat-doc/html
	dh_sphinxdoc -O--buildsystem=pybuild
endif
