#!/usr/bin/make -f

#export DH_VERBOSE=1


%:
	dh $@  --with python2,sphinxdoc

override_dh_auto_clean:
	dh_auto_clean
	rm -f heatclient/versioninfo
	rm -rf setuptools_git-*-py*.egg/

override_dh_install:
	dh_install
	rm -rf $(CURDIR)/debian/python-heatclient/usr/heatclient

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	testr init && testr run
endif

override_dh_sphinxdoc:
ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
	python setup.py build_sphinx
	cp -rf doc/build/html $(CURDIR)/debian/python-heatclient-doc/usr/share/doc/python-heatclient-doc
	dh_sphinxdoc -O--buildsystem=python_distutils
endif