#!/usr/bin/make -f

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

%:
	dh $@  --with python3

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

override_dh_auto_build:
	echo "Do nothing..."

override_dh_auto_install:
	pkgos-dh_auto_install --no-py2 --in-tmp

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages pkgos-dh_auto_test --no-py2
endif

override_dh_auto_test:
	echo "Do nothing..."

override_dh_install:
	dh_install
	rm -rf $(CURDIR)/debian/python3-heatclient/usr/heatclient
	install -D -m 0644 tools/heat.bash_completion $(CURDIR)/debian/python3-neutronclient/usr/share/bash-completion/completions/heat

override_dh_python3:
	dh_python3 --shebang=/usr/bin/python3
