#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1

PYTHON2=$(shell pyversions -vr)
PYTHON3=$(shell py3versions -vr)

# magic debhelper rule
%:
	dh $@ --with python3  --buildsystem=pybuild

build-python%:
	python$* setup.py build

override_dh_auto_build: $(PYTHON3:%=build-python%)
	dh_auto_build

install-python%:
	python$* setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb

override_dh_auto_install: $(PYTHON3:%=install-python%)
	dh_auto_install

override_dh_auto_test:
	@echo Disabling auto tests via pybuild - needs network connection

override_dh_auto_clean:
	dh_auto_clean
	rm -rf build
	rm -rf *.egg-info
