#!/usr/bin/make -f
# -*- makefile -*-

#export DH_VERBOSE = 1

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

export PYBUILD_NAME=mkdocstrings
export PYBUILD_SYSTEM=pyproject
export PYBUILD_BEFORE_TEST=cp -r {dir}/docs {dir}/mkdocs.yml {build_dir}
export PYBUILD_AFTER_TEST=rm -rf {build_dir}/docs {build_dir}/mkdocs.yml
export PYBUILD_TEST_ARGS=-k 'not test_sphinx_load_mkdocstrings_inventory_file'

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

override_dh_auto_build:
	# Adjust version information
	sed -i 's/@@DEB_VERSION_UPSTREAM@@/$(DEB_VERSION_UPSTREAM)/g' pyproject.toml
	dh_auto_build
