#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk

export PYBUILD_NAME=ufo-tofu

export QT_API=pyqt5
export PYTEST_QT_API=pyqt5
# insists on a writable home during testing
export HOME=$(CURDIR)/debian/.home
export QT_QPA_PLATFORM=offscreen

export PYBUILD_TEST_ARGS = -k '\
  not test_setup_ufo_graph and \
  not test_run_ufo_graph and \
  not test_run and \
  not test_on_import_composites and \
  not test_get_simple_node_graphs \
  ' \
  --pyargs tofu

%:
	dh $@ --buildsystem=pybuild

execute_after_dh_auto_install:
	for i in bin/* ; do PYTHONPATH=$(CURDIR) HOME=$(CURDIR) PATH=_build/bin:$$PATH help2man --output=$$(basename $$i).1 -N --version-string=$(DEB_VERSION_UPSTREAM) --help-option --help --no-discard-stderr --name "toolkit for tomographic data reconstruction" $$i ; done
