#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-

PYTHON3=$(shell py3versions -r)

%:
	dh $@ --with python3

override_dh_auto_clean:
	rm -rf build markups/__pycache__ tests/__pycache__

override_dh_auto_build:
	set -ex; for python in $(PYTHON3); do \
		$$python setup.py build; \
	done

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
override_dh_auto_test:
	set -ex; for python in $(PYTHON3); do \
		$$python setup.py test; \
	done
endif

override_dh_auto_install:
	set -ex; for python in $(PYTHON3); do \
		$$python setup.py install --install-layout=deb --root=debian/tmp; \
	done
