#!/usr/bin/make -f

export PYBUILD_NAME = certbot-nginx

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

override_dh_auto_build:
	dh_auto_build
	PYTHONPATH=. \
		http_proxy='127.0.0.1:9' \
		https_proxy='127.0.0.1:9' \
		sphinx-build -N -bhtml docs/ build/html

override_dh_auto_install:
	dh_auto_install
	rm -rf $(CURDIR)/debian/python3-certbot-nginx/usr/lib/python*/dist-packages/certbot_nginx/tests/testdata

override_dh_installdocs:
	dh_installdocs --doc-main-package=python3-certbot-nginx -p python-certbot-nginx-doc
	dh_installdocs -p python3-certbot-nginx

override_dh_auto_test:
ifdef (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	python3 setup.py test
endif
