#!/usr/bin/make -f

export PYBUILD_NAME=textparser

%:
	dh $@ --buildsystem=pybuild

execute_after_dh_auto_build:
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES)))
	PYTHONPATH=$(CURDIR) python3 -m sphinx -N -E -bhtml docs/ $(CURDIR)/build/html
endif

execute_after_dh_fixperms:
	# Examples are documentation, they must not be installed executable
	chmod -x $(CURDIR)/debian/python3-textparser/usr/share/doc/python3-textparser/examples/benchmarks/json/parsers/*.py
