#!/usr/bin/make -f

PYTHON3:=$(shell py3versions -r)
py3sdo=set -ex; $(foreach py, $(PYTHON3), $(py) $(1);)

UPSTREAM_GIT = git://github.com/openstack-dev/pbr.git
include /usr/share/openstack-pkg-tools/pkgos.make

export OSLO_PACKAGE_VERSION=$(VERSION)

%:
	dh $@  --with python2,python3

override_dh_clean:
	dh_clean
	# This is for a cowbuilder, as it's downloading this on clean
	# there...
	rm -rf d2to1-*-py*egg

override_dh_auto_build:
	dh_auto_build
	$(call py3sdo, setup.py build)

override_dh_auto_install:
	dh_auto_install
	$(call py3sdo, setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb)

override_dh_auto_clean:
	dh_auto_clean
	rm -rf build
	rm -rf *.egg-info __pycache__
