#!/usr/bin/make -f
# -*- makefile -*-

PY2VERS := $(shell pyversions -s)
PY3VERS := $(shell py3versions -s)

%:
	dh $@ --with python2,python3

override_dh_auto_build:
	set -e ; \
	for python in $(PY2VERS) $(PY3VERS); do \
		$$python setup.py build ; \
	done

override_dh_auto_install:
	set -e ; \
	for python in $(PY2VERS); do \
		$$python setup.py install --install-layout=deb --root $(CURDIR)/debian/python-progressbar; \
	done
	set -e ; \
	for python in $(PY3VERS); do \
		$$python setup.py install --install-layout=deb --root $(CURDIR)/debian/python3-progressbar; \
	done

override_dh_installdocs:
	dh_installdocs		README.txt

override_dh_installexamples:
	dh_installexamples	examples.py

override_dh_compress:
	dh_compress -X.py
