From 7fcdacbe0cdbde62254c2e34d6734ae738ecfe79 Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Fri, 9 Aug 2024 19:14:52 +0100 Subject: [PATCH] Install docs dependencies in a virtual env --- .gitignore | 1 + README.md | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/.gitignore b/.gitignore index cb041e47..eb2682d6 100644 --- a/.gitignore +++ b/.gitignore @@ -49,4 +49,5 @@ Thumbs.db *.sdf *.opensdf build +.venv/ .vscode/ diff --git a/README.md b/README.md index cc049eb1..78ff1ccb 100644 --- a/README.md +++ b/README.md @@ -65,8 +65,12 @@ You may also need to set `BOOST_ROOT` if CMake cannot find Boost. The documentation is built using [Doxygen](http://www.stack.nl/~dimitri/doxygen/), [Breathe](https://breathe.readthedocs.io/en/latest/) and [Sphinx](http://www.sphinx-doc.org/en/stable/). Install Doxygen and Python and make sure they're accessible from your `PATH`, then run: ``` +py -m venv .venv +.venv\Scripts\activate pip install -r docs/requirements.txt sphinx-build -b html docs build/docs/html ``` +If running on Linux, replace `.venv\Scripts\activate` with `.venv/bin/activate`. + Alternatively, you can use Docker to avoid changing your development environment, by running `docker run -it --rm -v ${PWD}/docs:/docs/docs -v ${PWD}/build:/docs/build -v ${PWD}/include:/docs/include sphinxdoc/sphinx:7.3.7 bash` to obtain a shell that you can use to run `apt-get update && apt-get install -y doxygen` and then the two commands above.