#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

%:
	dh $@ --with python2,python3

override_dh_auto_build:
	set -e ; \
	for py in 2.7 $(shell py3versions -vr); do \
		python$$py setup.py build --build-base=build$$py; \
	done

override_dh_auto_test:
	set -e ; \
	python2.7 build2.7/lib.*-2.7/shortuuid/tests.py
	for py in $(shell py3versions -vr); do \
		python$$py build$$py/lib/shortuuid/tests.py; \
	done

override_dh_auto_install:
	python setup.py install --no-compile -O0 --install-layout=deb \
		--root $(CURDIR)/debian/python-shortuuid && \
	python3 setup.py install --no-compile -O0 --install-layout=deb \
		--root $(CURDIR)/debian/python3-shortuuid

override_dh_auto_clean:
	dh_clean
	for py in 2.7 $(shell py3versions -vr); do \
		python$$py setup.py clean --build-temp=build && \
		python$$py setup.py clean --build-temp=build$$py; \
	done
	find $(CURDIR) -name "*.pyc" -delete

