#!/usr/bin/make -f

UPSTREAM_GIT := https://github.com/openstack/xstatic-mdi.git
include /usr/share/openstack-pkg-tools/pkgos.make

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

override_dh_auto_clean:
	rm -rf build
	find . -type d -name __pycache__ -exec rm -r {} \+

override_dh_auto_build:
	echo "Do nothing..."

override_dh_auto_install:
	pkgos-dh_auto_install --no-py2
	rm -rf $(CURDIR)/debian/python*-xstatic-*/usr/lib/python*/dist-packages/xstatic/pkg/*/data

override_dh_auto_test:
ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
	set -e ; for pyvers in $(PYTHONS) $(PYTHON3S); do \
		python$$pyvers setup.py test ; \
	done
endif

override_dh_clean:
	dh_clean -O--buildsystem=python_distutils
	rm -rf build
