#!/usr/bin/make -f

#export DH_VERBOSE=1
export PYBUILD_NAME=rst2pdf

# skip tests currently failing due to threshold breached; https://github.com/rst2pdf/rst2pdf/issues/1186
export PYBUILD_TEST_ARGS = -v \
                           -k "not test-referencing-an-aliased-font \
			   and not test_aafigure \
			   and not test_aafigure_extra \
			   and not test_blockquotes_in_table \
			   and not test_docutils_math \
			   and not test_issue_231 \
			   and not test_issue_349 \
			   and not test_issue_363 \
			   and not test_issue_73_unicode_box_drawing_characters_renders_without_errors \
			   and not test_issue_785 \
			   and not test_math \
			   and not test_raw_html \
			   and not test_slides \
			   and not sphinx-issue252 \
			   and not sphinx-issue257 \
			   "

# build HTML doc and manpage after package build
export PYBUILD_AFTER_BUILD=cd doc ; \
                           PYTHONPATH={build_dir} {interpreter} rst2html-manual.py --stylesheet=assets/manual.css manual.rst output/html/manual.html ; \
                           rst2man rst2pdf.rst output/rst2pdf.1

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

override_dh_auto_test:
	echo Tests are temporarily disabled due to pymupdf being in a bad state.
