From 67bf6fe27d5eac02c019ef14446a41f4590cd0b2 Mon Sep 17 00:00:00 2001 From: Rolf Krahl Date: Wed, 2 Oct 2024 15:23:17 +0200 Subject: [PATCH 1/4] Set html_baseurl and html_context from environment variables --- conf.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/conf.py b/conf.py index e46c42a..70ab042 100644 --- a/conf.py +++ b/conf.py @@ -6,6 +6,7 @@ # full list see the documentation: # http://www.sphinx-doc.org/en/master/config +import os from pathlib import Path import sys @@ -90,6 +91,15 @@ # # html_theme_options = {} +# Define the canonical URL if you are using a custom domain on Read the Docs +html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "") + +# Tell Jinja2 templates the build is running on Read the Docs +if os.environ.get("READTHEDOCS", "") == "True": + if "html_context" not in globals(): + html_context = {} + html_context["READTHEDOCS"] = True + # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". From 5be8e3dc70ae72a61498ae9d1c09d79efdfabe07 Mon Sep 17 00:00:00 2001 From: Rolf Krahl Date: Thu, 3 Oct 2024 14:48:06 +0200 Subject: [PATCH 2/4] Update doc8-action to v5 --- .github/workflows/rst-lint.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rst-lint.yaml b/.github/workflows/rst-lint.yaml index 1effab7..72a4da5 100644 --- a/.github/workflows/rst-lint.yaml +++ b/.github/workflows/rst-lint.yaml @@ -12,4 +12,4 @@ jobs: - name: Check out repository code uses: actions/checkout@v4 - name: doc8-check - uses: deep-entertainment/doc8-action@v4 + uses: deep-entertainment/doc8-action@v5 From a91ce3932c962635aafe2bc2bcc626ac7b0a4dfc Mon Sep 17 00:00:00 2001 From: Rolf Krahl Date: Wed, 9 Oct 2024 11:39:35 +0200 Subject: [PATCH 3/4] Make python command to create _meta.py configurable using a variable in the Makefile --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c7579a8..2d57278 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,4 @@ +PYTHON = python3 SPHINXOPTS = SPHINXBUILD = sphinx-build SPHINXPROJ = PIDINST @@ -18,7 +19,7 @@ $(BUILDERS): $(STATIC_SOURCEDIRS) _meta.py $(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) _meta.py: - python3 setup.py meta + $(PYTHON) setup.py meta clean: rm -rf __pycache__ From 4ec4be7109de0e87ffba62f809b639c828c5a196 Mon Sep 17 00:00:00 2001 From: Rolf Krahl Date: Wed, 9 Oct 2024 11:52:58 +0200 Subject: [PATCH 4/4] Fixup 2f62ecf: drop unused imports in setup.py --- setup.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/setup.py b/setup.py index 74950b8..7e8f474 100644 --- a/setup.py +++ b/setup.py @@ -5,10 +5,7 @@ from setuptools import setup import setuptools.command.install from distutils import log -import datetime -import os from pathlib import Path -import subprocess import gitprops version = str(gitprops.get_version())