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

#export DH_VERBOSE = 1

export PYBUILD_NAME=selectolax
export PYBUILD_AFTER_INSTALL=rm -fr {destdir}/usr/lib/python3*/dist-packages/selectolax-*/top_level.txt
export PYBUILD_TEST_ARGS=-k "\
 not test_empty_attribute_lexbor \
"

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

SPHINXOPTS := -E -N

%:
	dh $@ --buildsystem=pybuild

execute_before_dh_sphinxdoc:
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
	PYTHONPATH=. python3 -m sphinx -b html $(SPHINXOPTS) docs $(CURDIR)/debian/python-$(PYBUILD_NAME)-doc/usr/share/doc/python-$(PYBUILD_NAME)-doc/html
endif
