From 8391df793baad91f53ef94ffd8f4b2c6ba63525f Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Thu, 19 Sep 2024 09:28:44 +0300 Subject: [PATCH 1/4] Update to match CPython/Docs and devguide --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 8bd40edb6c3..2c9da21252e 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,7 @@ ensure-sphinx-autobuild: venv ## htmllive to rebuild and reload HTML files in your browser .PHONY: htmllive -htmllive: SPHINXBUILD = $(VENVDIR)/bin/sphinx-autobuild +htmllive: SPHINXBUILD = PATH=$(VENVDIR)/bin:$$PATH sphinx-autobuild # Arbitrarily selected ephemeral port between 49152–65535 # to avoid conflicts with other processes: htmllive: SPHINXERRORHANDLING = --re-ignore="/\.idea/|/venv/|/pep-0000.rst|/topic/" --open-browser --delay 0 --port 55302 @@ -53,7 +53,7 @@ linkcheck: html ## clean to remove the venv and build files .PHONY: clean clean: clean-venv - -rm -rf build topic + -rm -rf $(BUILDDIR) topic ## clean-venv to remove the venv .PHONY: clean-venv @@ -89,11 +89,11 @@ _ensure-package: venv .PHONY: _ensure-pre-commit _ensure-pre-commit: - make _ensure-package PACKAGE=pre-commit + $(MAKE) _ensure-package PACKAGE=pre-commit .PHONY: _ensure-sphinx-autobuild _ensure-sphinx-autobuild: - make _ensure-package PACKAGE=sphinx-autobuild + $(MAKE) _ensure-package PACKAGE=sphinx-autobuild ## lint to lint all the files .PHONY: lint From 7218af386aaccf1f982f2ce2209a8ba8e902d72a Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Thu, 19 Sep 2024 09:34:47 +0300 Subject: [PATCH 2/4] Remove unused target, real one is _ensure-sphinx-autobuild with underscore --- Makefile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Makefile b/Makefile index 2c9da21252e..b23de443dc6 100644 --- a/Makefile +++ b/Makefile @@ -28,10 +28,6 @@ html: venv htmlview: html $(PYTHON) -c "import os, webbrowser; webbrowser.open('file://' + os.path.realpath('build/index.html'))" -.PHONY: ensure-sphinx-autobuild -ensure-sphinx-autobuild: venv - $(call ensure_package,sphinx-autobuild) - ## htmllive to rebuild and reload HTML files in your browser .PHONY: htmllive htmllive: SPHINXBUILD = PATH=$(VENVDIR)/bin:$$PATH sphinx-autobuild From 1c34f69d2b897ccccd96f496a809d145afb9bf14 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Fri, 20 Sep 2024 10:53:18 +0300 Subject: [PATCH 3/4] The topic dir is inside the build dir --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b23de443dc6..de01ed5bcc7 100644 --- a/Makefile +++ b/Makefile @@ -49,7 +49,7 @@ linkcheck: html ## clean to remove the venv and build files .PHONY: clean clean: clean-venv - -rm -rf $(BUILDDIR) topic + -rm -rf $(BUILDDIR) ## clean-venv to remove the venv .PHONY: clean-venv From 4eec05b61eca39d8da7d2639b86cfdfb1727b4ab Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Fri, 20 Sep 2024 11:01:41 +0300 Subject: [PATCH 4/4] Fix 'make spellcheck' to match 'make lint' --- Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile b/Makefile index de01ed5bcc7..446dcb4187c 100644 --- a/Makefile +++ b/Makefile @@ -103,8 +103,7 @@ test: venv ## spellcheck to check spelling .PHONY: spellcheck -spellcheck: venv - $(call ensure_package,pre_commit) +spellcheck: _ensure-pre-commit $(VENVDIR)/bin/python3 -m pre_commit run --all-files --hook-stage manual codespell .PHONY: help