#!/usr/bin/make -f

export PYBUILD_NAME=jose
export PYBUILD_TEST_ARGS=-v -k-"ECDSAECKey-BadDigestError" # This test is failing
export PYBUILD_AFTER_TEST=rm -rf {build_dir}/.coverage

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

override_dh_auto_clean:
	rm -rf .pytest_cache
	dh_auto_clean

override_dh_sphinxdoc:
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
	python3 -m sphinx -b html -d docs/.build/.doctrees -N docs $(CURDIR)/debian/python-jose-doc/usr/share/doc/python-jose-doc/html
endif
	dh_sphinxdoc

execute_after_dh_clean:
	rm -rf docs/.build

override_dh_auto_test:
ifeq ($(filter nocheck,$(DEB_BUILD_PROFILES)),)
	dh_auto_test
endif
