#!/usr/bin/make -f

UPSTREAM_GIT := https://opendev.org/openstack/blazar-nova.git
include /usr/share/openstack-pkg-tools/pkgos.make

export PYBUILD_NAME=blazarnova

%:
	dh $@ --buildsystem=pybuild --with python3

override_dh_auto_clean:
	rm -rf build .stestr
	for i in $$(find . -type d -iname __pycache__) ; do rm -rf $$i ; done
	find . -iname '*.pyc' -delete

override_dh_auto_test:
	echo "Do nothing..."

override_dh_auto_install:
	echo "Do nothing..."

override_dh_install:
	set -e ; set -x ; for i in $(PYTHON3S) ; do \
		python$$i setup.py install --install-layout=deb --root $(CURDIR)/debian/tmp ; \
	done

ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
	pkgos-dh_auto_test 'blazarnova\.tests.*'
endif

	dh_install
