From 49cbc34ff2db2c9fe4ee70777fd6d66e7629a81f Mon Sep 17 00:00:00 2001 From: BlackAngelTV Date: Wed, 11 Nov 2026 19:38:09 +0100 Subject: [PATCH] build(docs): use the checkout tool environment when it exists The documentation needs extensions that are not installed system-wide, so make html failed on a fresh shell even though the project already keeps them in the root tool environment. Falling back to sphinx-build keeps the target working when no environment is present. --- docs/Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/Makefile b/docs/Makefile index 9fe0af4..049c645 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -16,9 +16,12 @@ override OPTS= endif # You can set these variables from the command line. +# Prefer the tool environment kept at the root of the checkout, so that the +# documentation builds without installing its extensions system-wide. +VENV ?= ../.venv SPHINXOPTS = -n -q -j auto -T $(FAIL_WARN) $(OPTS) -SPHINXBUILD = sphinx-build -SPHINXAUTOBUILD = sphinx-autobuild +SPHINXBUILD ?= $(if $(wildcard $(VENV)/bin/sphinx-build),$(VENV)/bin/sphinx-build,sphinx-build) +SPHINXAUTOBUILD ?= $(if $(wildcard $(VENV)/bin/sphinx-autobuild),$(VENV)/bin/sphinx-autobuild,sphinx-autobuild) SPHINXPROJ = kitty SOURCEDIR = . BUILDDIR = _build