#!/usr/bin/make -f

export PYBUILD_NAME=fastjsonschema

export PYBUILD_BEFORE_TEST=cp -r /usr/share/json-schema-test-suite/ {build_dir}/JSON-Schema-Test-Suite
export PYBUILD_AFTER_TEST=rm -rf {build_dir}/JSON-Schema-Test-Suite

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

override_dh_auto_clean:
	dh_auto_clean
	rm -rf .pytest_cache

override_dh_auto_build:
	dh_auto_build
ifeq ($(filter nodoc,$(DEB_BUILD_PROFILES)),)
	PYTHONPATH=. http_proxy='127.0.0.1:9' sphinx-build -N -bhtml docs/ build/html
endif

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