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
This commit is contained in:
Antoine Musso 2014-01-10 16:36:44 +01:00
parent dda083b9fb
commit d70f3d82a2
1 changed files with 3 additions and 0 deletions

View File

@ -26,6 +26,9 @@ commands = flake8
commands =
python setup.py testr --coverage
[testenv:doc]
commands = python setup.py build_sphinx
[testenv:venv]
commands = {posargs}