#! /usr/bin/make -f
export PYBUILD_NAME=sphinx-autoapi

# disable test_integration tests:
# - GoTests.test_integration requires sphinxcontrib.golangdomain (not available
#   yet in Debian)
# - DotNetTests.test_integration requires sphinxcontrib.dotnetdomain (not
#   available yet in Debian)
# TODO: package sphinxcontrib.golangdomain and sphinxcontrib.dotnetdomain and
#       re-enable the tests
export PYBUILD_TEST_ARGS="-k not test_integration"

%:
	dh $@ --buildsystem=pybuild

ifeq (,$(filter nodoc, $(DEB_BUILD_OPTIONS)))
execute_after_dh_auto_build:
	PYTHONPATH=. sphinx-build docs build/sphinx/html
	PYTHONPATH=. sphinx-build -b text docs build/sphinx/text
	rm -rf build/sphinx/text/.doctrees
endif
