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

#export DH_VERBOSE = 1

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

export PYBUILD_NAME=griffe
export PYBUILD_SYSTEM=pyproject
export PYBUILD_TEST_ARGS=\
 --ignore tests/test_api.py \
 -k 'not test_editables_file_handling \
 and not test_load_git \
 and not test_load_git_errors \
 and not test_meson_python_file_handling \
 '
export PYBUILD_BEFORE_TEST=cp -r {dir}/logo.svg {dir}/docs {build_dir}
export PYBUILD_AFTER_TEST=rm -rf {build_dir}/logo.svg {build_dir}/docs
export PYBUILD_AFTER_INSTALL=rm -rf {destdir}/usr/lib/python*/dist-packages/griffe-*.dist-info/licenses
export PDM_BUILD_SCM_VERSION = $(DEB_VERSION_UPSTREAM)

%:
	dh $@ --buildsystem=pybuild

override_dh_clean:
	dh_clean
	rm -rf .pdm-build
