#!/usr/bin/make -f

PYTHONS:=$(shell pyversions -vr)

include /usr/share/openstack-pkg-tools/pkgos.make
export OSLO_PACKAGE_VERSION=$(VERSION)

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

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	make test || true
endif

override_dh_clean:
	dh_clean -O--buildsystem=python_distutils

override_dh_auto_install:
	set -e && for pyvers in $(PYTHONS); do \
		python$$pyvers setup.py install --install-layout=deb \
			--root $(CURDIR)/debian/python-tripleo-heat-templates; \
	done

#	cp -auxf examples *.yaml $(CURDIR)/debian/tripleo-heat-templates/usr/share/tripleo-heat-templates
#	dh_auto_install -O--buildsystem=python_distutils
