#!/usr/bin/make -f

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

#export DH_VERBOSE=1
export PYBUILD_NAME=setuptools-scm
# the test_regressions.py test assumes the package is installed
export PYBUILD_TEST_ARGS={interpreter} -m pytest -k "not regressions"
export SETUPTOOLS_SCM_PRETEND_VERSION=$(DEB_VERSION_UPSTREAM)

%:
	dh $@ --with python2,python3,pypy --buildsystem=pybuild

override_dh_auto_test:
	python setup.py egg_info
	SETUPTOOLS_SCM_PRETEND_VERSION= PYBUILD_SYSTEM=custom dh_auto_test

override_dh_auto_install:
	python setup.py egg_info
	dh_auto_install
