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

export PYBUILD_NAME=yapf
export PYBUILD_DESTDIR_python2=debian/python-${PYBUILD_NAME}
export PYBUILD_DESTDIR_python3=debian/python3-${PYBUILD_NAME}
export PYBUILD_TEST_NOSE=1
export PYBUILD_TEST_ARGS_python2=--exclude "yapftests.pytree_unwrapper_test.MatchBracketsTest"
%:
	dh $@  --with python2,python3 --buildsystem=pybuild

override_dh_auto_install:
	dh_auto_install
	dh_movefiles --package=yapf --sourcedir=$(PYBUILD_DESTDIR_python2) usr/bin
	dh_movefiles --package=yapf3 --sourcedir=$(PYBUILD_DESTDIR_python3) usr/bin
	(cd $(CURDIR)/debian/yapf3 && mv ./usr/bin/yapf ./usr/bin/yapf3)
