From f0bd3e0e1afe0d3b19efdcf5fc4b5712a6a1a381 Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Mon, 19 Sep 2016 20:15:58 +0100 Subject: [PATCH] Use the same sphinx config for dev and Read The Docs --- README.md | 3 +-- docs/conf.py | 11 ++++------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 7db8996a..8eb9bc7e 100644 --- a/README.md +++ b/README.md @@ -55,10 +55,9 @@ The GUI's HTML file is automatically built when building the LOOT GUI binary, bu ## Building The Documentation -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 them (Breathe and Sphinx support Python 2 and 3) and make sure they're accessible from your `PATH`, then: +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 them (Breathe and Sphinx support Python 2 and 3) and make sure they're accessible from your `PATH`, then run: ``` -doxygen docs/api/Doxyfile sphinx-build -b html docs build/docs/sphinx ``` diff --git a/docs/conf.py b/docs/conf.py index dcd45f98..fd1d47bd 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -22,14 +22,11 @@ import subprocess, os -read_the_docs_build = os.environ.get('READTHEDOCS', None) == 'True' +output_directory = os.path.join('..', 'build', 'docs') +if not os.path.exists(output_directory): + os.makedirs(output_directory) -if read_the_docs_build: - output_directory = '../build/docs' - if not os.path.exists(output_directory): - os.makedirs(output_directory) - - subprocess.call('doxygen', shell=True, cwd='..') +subprocess.call(['doxygen', 'docs/api/Doxyfile'], cwd='..') # -- General configuration ------------------------------------------------