#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk

build3vers := $(shell py3versions -sv)

export PYBUILD_NAME = filelock

%:
	dh $@ --with python3 --buildsystem=pybuild

# workaround for https://github.com/tox-dev/py-filelock/issues/133
override_dh_auto_configure:
	sed -i "9i version = $(DEB_VERSION_UPSTREAM)" setup.cfg
	dh_auto_configure

override_dh_clean:
	dh_clean
	(grep 'version =' setup.cfg && sed -i '9d' setup.cfg) || true
