#!/usr/bin/make -f

export LC_ALL=C.UTF-8
export PYBUILD_NAME=hypothesis
export PYBUILD_DIR=hypothesis-python
export PYBUILD_TEST_ARGS=-k 'not dateutil' tests/cover tests/nocover tests/datetime tests/numpy
# If pytest autoloads the hypothesis plugin, it interferes with the tests 
export PYTEST_DISABLE_PLUGIN_AUTOLOAD=1

%:
	dh $@ --buildsystem=pybuild

execute_after_dh_auto_build:
ifeq ($(filter nodoc,$(DEB_BUILD_PROFILES)),)
	PYTHONPATH=hypothesis-python/src \
	    http_proxy='127.0.0.1:9' \
	    https_proxy='127.0.0.1:9' \
	    python3 -m sphinx -N -b html hypothesis-python/docs/ $(CURDIR)/.pybuild/docs/html/
endif
