#!/usr/bin/make -f

# The setup.py uses vcversioner, so it either expects a git repository
# or a proper dist tarball with a version.txt. As the upstream source
# tarball is neither, we need to trick things into working by creating
# version.txt ourselves.

VERSION := $(shell dpkg-parsechangelog -S version | sed 's,-[^-]*$$,,')

%: version.txt
	dh $@ --with python2,python3 --buildsystem=pybuild

version.txt:
	echo $(VERSION)-0-0 > $@

override_dh_auto_clean:
	dh_auto_clean
	rm version.txt
