#!/usr/bin/make -f

%:
  # Explicitly prefer pyproject.toml over Makefile.
	dh $@ --buildsystem=pybuild

# pyproject.toml -> src/tools/setuptools_wrapper.py -> src/tools/ui_compile.py
# For some reason, this does not happen.
override_dh_auto_configure:
	python3 -m src.tools.ui_compile

ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
execute_after_dh_auto_build:
	http_proxy=127.0.0.1:9 \
	https_proxy=127.0.0.1:9 \
	make -Cdocs html BUILDDIR=../build
endif
