#!/usr/bin/make -f

#export DH_VERBOSE=1

MANIFEST_EXCLUDE_STANDARD := glanceclient

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

export OSLO_PACKAGE_VERSION=$(VERSION)

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

override_dh_auto_configure:
	echo $(VERSION) > glanceclient/versioninfo
	dh_auto_configure -O--buildsystem=python_distutils

override_dh_auto_clean:
	echo $(VERSION) > glanceclient/versioninfo
	dh_auto_clean -O--buildsystem=python_distutils
	rm -f glanceclient/versioninfo
	rm -f ChangeLog
	rm -rf setuptools_git-*-py*.egg/
	rm -rf .tox python_glanceclient.egg-info

override_dh_install:
	dh_install -O--buildsystem=python_distutils
	rm -rf $(CURDIR)/debian/python-glanceclient/usr/glanceclient

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	python setup.py testr
#	./run_tests.sh -N -P
#	set -e ; for pyversion in $(shell pyversions -r); do $$pyversion setup.py test; done
endif
