Skip to content

Commit

Permalink
Makefile: simplify doc-setup
Browse files Browse the repository at this point in the history
Only source SPHINXENV file once and consistently use pip while working around
canonical/sphinx-docs-starter-pack#197

Signed-off-by: Simon Deziel <[email protected]>
  • Loading branch information
simondeziel committed Mar 13, 2024
1 parent 1f95a14 commit 6d4598b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,10 @@ update-metadata: build
doc-setup: client
@echo "Setting up documentation build environment"
python3 -m venv doc/.sphinx/venv
. $(SPHINXENV) ; pip3 install gitpython pyyaml
. $(SPHINXENV) ; cd doc && LOCAL_SPHINX_BUILD=True python3 .sphinx/build_requirements.py
. $(SPHINXENV) ; pip install --require-virtualenv --upgrade -r doc/.sphinx/requirements.txt --log doc/.sphinx/venv/pip_install.log
. $(SPHINXENV)
pip install --require-virtualenv gitpython pyyaml # Workaround for https://github.com/canonical/sphinx-docs-starter-pack/issues/197
cd doc && LOCAL_SPHINX_BUILD=True python3 .sphinx/build_requirements.py
pip install --require-virtualenv --upgrade -r doc/.sphinx/requirements.txt --log doc/.sphinx/venv/pip_install.log
@test ! -f doc/.sphinx/venv/pip_list.txt || \
mv doc/.sphinx/venv/pip_list.txt doc/.sphinx/venv/pip_list.txt.bak
$(SPHINXPIPPATH) list --local --format=freeze > doc/.sphinx/venv/pip_list.txt
Expand Down

0 comments on commit 6d4598b

Please sign in to comment.