#!/usr/bin/make -f
#export DH_VERBOSE=1
#export DEB_BUILD_OPTIONS=nocheck
export PYBUILD_NAME=vcr

export http_proxy=
export https_proxy=

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

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

override_dh_auto_test:
ifeq (~nd,$(findstring ~nd,$(DEB_VERSION)))
	PYBUILD_SYSTEM=custom PYBUILD_TEST_ARGS="{interpreter} -m pytest -v -x -rs" dh_auto_test
endif
# don't run tests on Debian because they currently need net connection, cf. #795940
# but run them on Neurodebian by request of the sponsor

override_dh_installdocs:
	pandoc -f rst -t plain -o .pybuild/README README.rst
	dh_installdocs -A .pybuild/README

override_dh_installchangelogs:
	sed -n '/'Changelog'/,/'0.0.1'/p' .pybuild/README > .pybuild/changelog
	dh_installchangelogs -A .pybuild/changelog
