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

python3_all = py3versions -s | xargs -n1 | xargs -t -I {} env {}

%:
	dh $@ --parallel --with python2,python3

override_dh_auto_configure:
	dh_auto_configure
	dh_auto_configure --sourcedirectory=bindings/python --buildsystem=python_distutils

override_dh_auto_build:
	dh_auto_build
	dh_auto_build --sourcedirectory=bindings/python --buildsystem=python_distutils
	cd bindings/python && $(python3_all) setup.py build

override_dh_auto_install:
	dh_auto_install
	dh_auto_install --sourcedirectory=bindings/python --buildsystem=python_distutils
	cd bindings/python && $(python3_all) setup.py install --install-layout=deb --root=$(CURDIR)/debian/tmp

override_dh_install:
	dh_install --fail-missing
