#!/usr/bin/make -f

#export DH_VERBOSE = 1

export PYBUILD_NAME=pipcl
export PYBUILD_SYSTEM=pyproject
export PYBUILD_TEST_ARGS = tests/test_zip.py tests/test_visual_studio.py tests/test_nogit.py

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

override_dh_sphinxdoc:
ifeq (,$(findstring nodoc,$(DEB_BUILD_OPTIONS)))
	PYTHONPATH=$(shell find $(CURDIR)/debian/python3-pipcl -type d -name dist-packages | tail -1) \
	python3 -m sphinx -b html docs $(CURDIR)/debian/python-pipcl-doc/usr/share/doc/python-pipcl-doc/html
	dh_sphinxdoc
endif
