#!/usr/bin/make -f

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

ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
CONCURRENCY = BZR_CONCURRENCY=$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
endif

ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
override_dh_auto_test:
	$(CONCURRENCY) BZR_PLUGINS_AT=loom@$(CURDIR) /usr/bin/bzr selftest -s bp.loom \
	  -v --parallel=fork
endif
