#!/usr/bin/make -f

#export DH_VERBOSE=1

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

export OSLO_PACKAGE_VERSION=$(VERSION)

%:
	dh $@  --with python2,sphinxdoc

override_dh_auto_clean:
	dh_auto_clean
	rm -fr swiftclient/versioninfo

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	python setup.py testr --slowest --testr-args='--subunit  '
endif

override_dh_sphinxdoc:
ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
	sphinx-build -b html doc/source $(CURDIR)/debian/python-swiftclient/usr/share/doc/python-swiftclient/html
	dh_sphinxdoc -O--buildsystem=python_distutils
endif
