#!/usr/bin/make -f

export PYBUILD_NAME=pyramid-chameleon
export PYBUILD_TEST_ARGS=-k 'not test___call__spec_alreadyregistered'
PY3VERS := $(shell py3versions -sv)

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

override_dh_auto_clean:
	rm -rf docs/_build
	dh_auto_clean

override_dh_auto_build:
	dh_auto_build
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
	PYTHONPATH=$(CURDIR) $(MAKE) -C docs html
endif
	set -e && for i in $(PY3VERS); do \
		cp -r $(CURDIR)/pyramid_chameleon/tests/fixtures/ $(CURDIR)/.pybuild/cpython3_$${i}_pyramid-chameleon/build/pyramid_chameleon/tests ; \
	done
