#!/usr/bin/make -f

%:
	dh --with python2 --buildsystem=python_distutils $*

ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
override_dh_auto_test:
	# Unfortunately, bzr-xmloutput is currently broken in non-UTF-8 locales. We
	# cannot rely on there being a UTF-8 locale available on the buildd, so we
	# make our own just for the tests.
	localedef -i POSIX -f UTF-8 -c $(CURDIR)/POSIX.utf8 || :
	LOCPATH=$(CURDIR) LC_ALL=POSIX.utf8 BZR_PLUGINS_AT=xmloutput@$(CURDIR) /usr/bin/bzr selftest -s bp.xmloutput
endif
