Skip to content

Commit

Permalink
doc: work around circular dependency
Browse files Browse the repository at this point in the history
Manually install gitpython, because it must be available to
generate the requirements.txt file, which is before the venv is
created.

Issue for this is here:
canonical/sphinx-docs-starter-pack#197

Signed-off-by: Ruth Fuchss <[email protected]>
  • Loading branch information
ru-fu committed Mar 13, 2024
1 parent 62afeb0 commit 798dcb4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ update-metadata: build
.PHONY: doc-setup
doc-setup: client
@echo "Setting up documentation build environment"
pip3 install gitpython
cd doc; LOCAL_SPHINX_BUILD=True python3 .sphinx/build_requirements.py
python3 -m venv doc/.sphinx/venv
. $(SPHINXENV) ; pip install --require-virtualenv --upgrade -r doc/.sphinx/requirements.txt --log doc/.sphinx/venv/pip_install.log
Expand Down
6 changes: 5 additions & 1 deletion doc/.readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@ build:
tools:
golang: "1.21"
python: "3.11"
apt_packages:
- python3-pip
jobs:
post_checkout:
pre_install:
- apt list --installed
- pip install gitpython
- cd doc; python3 .sphinx/build_requirements.py
pre_build:
- go build -ldflags "-s -w" -o trimpath -o lxc.bin ./lxc
Expand Down

0 comments on commit 798dcb4

Please sign in to comment.