#!/usr/bin/make -f

include /usr/share/openstack-pkg-tools/pkgos.make

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

override_dh_clean:
	dh_clean
	rm -rf cover

override_dh_auto_test:
ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
	PYTHONPATH=. nosetests -v test/unit --exe
endif

override_dh_sphinxdoc:
ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
	PYTHONPATH=. sphinx-build -b html doc/source debian/swauth-doc/usr/share/doc/swauth-doc/html
	dh_sphinxdoc -O--buildsystem=python_distutils
	rm debian/swauth-doc/usr/share/doc/swauth-doc/html/_sources/license.txt
endif

override_dh_installdocs:
	dh_installdocs

	dh_installdocs -A AUTHORS
