From 652e33842b9660d95b8e3f53e8f18ad21f67151d Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Fri, 23 Sep 2022 21:45:36 +1000 Subject: [PATCH 1/3] Ensure dependencies are installed when building docs --- .github/workflows/test.yml | 1 - Makefile | 4 +++- docs/Makefile | 4 ++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5614ad5f2..6abffd158 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -99,7 +99,6 @@ jobs: - name: Docs if: startsWith(matrix.os, 'ubuntu') && matrix.python-version == 3.10 run: | - python3 -m pip install furo sphinx-copybutton sphinx-issues sphinx-removed-in sphinxext-opengraph make doccheck - name: After success diff --git a/Makefile b/Makefile index 219dda1de..1388a8f03 100644 --- a/Makefile +++ b/Makefile @@ -17,11 +17,13 @@ coverage: .PHONY: doc doc: + python3 -c "import PIL" > /dev/null 2>&1 || python3 -m pip install . + python3 -c "import olefile" > /dev/null 2>&1 || python3 -m pip install olefile $(MAKE) -C docs html .PHONY: doccheck doccheck: - $(MAKE) -C docs html + $(MAKE) doc # Don't make our tests rely on the links in the docs being up every single build. # We don't control them. But do check, and update them to the target of their redirects. $(MAKE) -C docs linkcheck || true diff --git a/docs/Makefile b/docs/Makefile index f11d6b189..a153a2b4f 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -44,6 +44,10 @@ clean: install-sphinx: $(PYTHON) -c "import sphinx" > /dev/null 2>&1 || $(PYTHON) -m pip install sphinx + $(PYTHON) -c "import sphinx_copybutton" > /dev/null 2>&1 || $(PYTHON) -m pip install sphinx-copybutton + $(PYTHON) -c "import sphinx_issues" > /dev/null 2>&1 || $(PYTHON) -m pip install sphinx-issues + $(PYTHON) -c "import sphinx_removed_in" > /dev/null 2>&1 || $(PYTHON) -m pip install sphinx-removed-in + $(PYTHON) -c "import sphinxext_opengraph" > /dev/null 2>&1 || $(PYTHON) -m pip install sphinxext-opengraph $(PYTHON) -c "import furo" > /dev/null 2>&1 || $(PYTHON) -m pip install furo html: From dd941c85c72a7805a26cc2a4bb47c2c7cfadef50 Mon Sep 17 00:00:00 2001 From: Andrew Murray <3112309+radarhere@users.noreply.github.com> Date: Sat, 24 Sep 2022 19:03:32 +1000 Subject: [PATCH 2/3] Install dependencies always, but quietly Co-authored-by: Hugo van Kemenade --- docs/Makefile | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/docs/Makefile b/docs/Makefile index a153a2b4f..7e0b43a7a 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -43,12 +43,7 @@ clean: -rm -rf $(BUILDDIR)/* install-sphinx: - $(PYTHON) -c "import sphinx" > /dev/null 2>&1 || $(PYTHON) -m pip install sphinx - $(PYTHON) -c "import sphinx_copybutton" > /dev/null 2>&1 || $(PYTHON) -m pip install sphinx-copybutton - $(PYTHON) -c "import sphinx_issues" > /dev/null 2>&1 || $(PYTHON) -m pip install sphinx-issues - $(PYTHON) -c "import sphinx_removed_in" > /dev/null 2>&1 || $(PYTHON) -m pip install sphinx-removed-in - $(PYTHON) -c "import sphinxext_opengraph" > /dev/null 2>&1 || $(PYTHON) -m pip install sphinxext-opengraph - $(PYTHON) -c "import furo" > /dev/null 2>&1 || $(PYTHON) -m pip install furo + $(PYTHON) -m pip install --quiet sphinx sphinx-copybutton sphinx-issues sphinx-removed-in sphinxext-opengraph furo html: $(MAKE) install-sphinx From e129ec8db7af961d764f1ae32cef0ec879c580dd Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sat, 24 Sep 2022 19:31:16 +1000 Subject: [PATCH 3/3] Moved olefile install to docs Makefile --- Makefile | 1 - docs/Makefile | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 1388a8f03..8f2862948 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,6 @@ coverage: .PHONY: doc doc: python3 -c "import PIL" > /dev/null 2>&1 || python3 -m pip install . - python3 -c "import olefile" > /dev/null 2>&1 || python3 -m pip install olefile $(MAKE) -C docs html .PHONY: doccheck diff --git a/docs/Makefile b/docs/Makefile index 7e0b43a7a..458299aac 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -43,7 +43,7 @@ clean: -rm -rf $(BUILDDIR)/* install-sphinx: - $(PYTHON) -m pip install --quiet sphinx sphinx-copybutton sphinx-issues sphinx-removed-in sphinxext-opengraph furo + $(PYTHON) -m pip install --quiet sphinx sphinx-copybutton sphinx-issues sphinx-removed-in sphinxext-opengraph furo olefile html: $(MAKE) install-sphinx