From d70f3d82a27d5111ea4b2907e34bbaf16b4240de Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Fri, 10 Jan 2014 16:36:44 +0100 Subject: [PATCH] Use venv to build documentation The Sphinx documentation now make use of the `program-output` plugin which would invoke commands to generate inline documentation. Ex: program-output:: zuul --help program-output:: zuul enqueue --help We want the resulting output to correspond to Zuul source code, not the command which is currently installed on the host running the doc. On my setup sphinx would die out because it cant find the command 'zuul'. The new tox environement 'doc' runs sphinx in a virtual env which will have the proper zuul command. The generated doc is not written under the /.tox directory but to /doc/build/html for convenience. Example usage: tox -edoc && open doc/build/html/index.html Change-Id: Ib0170f94bb2c09eb60e555a32e101e2e0959b18e --- tox.ini | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tox.ini b/tox.ini index df89498a96..7a00027700 100644 --- a/tox.ini +++ b/tox.ini @@ -26,6 +26,9 @@ commands = flake8 commands = python setup.py testr --coverage +[testenv:doc] +commands = python setup.py build_sphinx + [testenv:venv] commands = {posargs}