#!/usr/bin/make -f
#export DH_VERBOSE=1

export PYBUILD_NAME = freecontact

Description := $(shell sed -e ':a; N; s/\n/$${Newline}/; ta' < debian/Description)

%:
	dh $@ --with python2 --buildsystem=pybuild
### once libboost-python-dev will be provided for Python3
#	dh $@ --with python2,python3 --buildsystem=pybuild

override_dh_gencontrol:
	dh_gencontrol -- '-VDescription=$(Description)'

get-orig-source:
	uscan --verbose --force-download --destdir=..

PYVER = $(shell echo -e 'import sys\nprint(str(sys.version_info.major)+"."+str(sys.version_info.minor))' | /usr/bin/python)
PYVERBDIR = $(wildcard ./build/lib.*-2.7)

#override_dh_auto_test:
#	PYTHONPATH=$(PYVERBDIR) ./test/test01.py
override_dh_auto_test:
	PYBUILD_SYSTEM=custom \
	PYBUILD_TEST_ARGS="{interpreter} $(CURDIR)/test/test01.py" \
	    dh_auto_test

