#!/usr/bin/make -f
# -*- makefile -*-

#export DH_VERBOSE=1

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

export OSLO_PACKAGE_VERSION=$(VERSION)

override_dh_auto_clean:
	echo $(VERSION) > cinderclient/versioninfo
	dh_auto_clean
	rm -f cinderclient/versioninfo
	rm -rf setuptools_git-*.egg
	rm -rf build

override_dh_auto_configure:
	echo $(VERSION) > cinderclient/versioninfo
	dh_auto_configure

override_dh_install:
	dh_install
	install -D -m 0644 tools/cinder.bash_completion $(CURDIR)/debian/python-cinderclient/etc/bash_completion.d/cinder.bash_completion

%:
	dh $@  --with python2

ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
override_dh_auto_test:
	./run_tests.sh -P -N || true
	#python setup.py testr --slowest --testr-args='--subunit  '
endif
