#! /usr/bin/make -f

export PYBUILD_NAME=cattr
export PYBUILD_TEST_ARGS=-v --ignore tests/test_unstructure_collections.py -k 'not test_orjson'

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

execute_after_dh_auto_build-indep:
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
	cd docs && \
	PYTHONPATH=$(shell pybuild -p `py3versions -dv` --print {build_dir}) http_proxy='http://127.0.0.1:9/' https_proxy='https://127.0.0.1:9/' \
	sphinx-build -N -E -T -b html . $(CURDIR)/.pybuild/docs/html/
	rm -rf $(CURDIR)/.pybuild/docs/html/.doctrees
endif
