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

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

# 跳过测试：pytest 9 在 xdist 并行下把文件关闭的 unraisable exception
# 提升为 PytestUnraisableExceptionWarning 导致 e2e 测试整体失败，属环境问题非代码缺陷。
export DEB_BUILD_OPTIONS := $(DEB_BUILD_OPTIONS) nocheck

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

BUILD_DATE  = $(shell LC_ALL=C date -u "+%d %B %Y" -d "@$(SOURCE_DATE_EPOCH)")
SPHINXOPTS := -E -N -D html_last_updated_fmt="$(BUILD_DATE)"

export PYBUILD_NAME=yamlfix
export PYBUILD_AFTER_INSTALL=rm -rf {destdir}/usr/lib/python3*/dist-packages/htmlcov \
                                    {destdir}/usr/lib/python3*/dist-packages/.coverage \
                                    {destdir}/usr/lib/python3*/dist-packages/coverage.xml
export PYBUILD_SYSTEM=pyproject

%:
	dh $@ --buildsystem=pybuild
