#! /usr/bin/make -f
# -*- makefile -*-

export PYBUILD_NAME=atom
export PYBUILD_TEST_PYTEST=1
export DEB_BUILD_MAINT_OPTIONS=hardening=+all

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

override_dh_sphinxdoc:
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
	http_proxy='http://127.0.0.1:9/' PYTHONPATH=$(CURDIR)/.pybuild/cpython3_$(shell py3versions -vd)_atom/build python3 -P -m sphinx -N -bhtml docs/source/ debian/python-atom-doc/usr/share/doc/python-atom-doc/html/
	dh_sphinxdoc
endif

override_dh_installexamples:
	dh_installexamples
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
	if test -d debian/python-atom-doc/usr/share/doc; then jdupes -rl debian/python-atom-doc/usr/share/doc; fi
endif
