1f8c473765
Some projects, such as Zuul itself, need to use python3 to build docs. This adds a new parameter, sphinx_python, which defines the version of python to build documentation with. The default is python2 and projects can choose python3 on a need basis. Remove the comment about the need for a leading comment, since there is now a real need for the leading comment anyway. Replace a few direct references to {{ ansible_user_dir }}/.venv that should have been using zuul_work_virtualenv. Update sphinx invocation to source the virtualenv activate first. Some sphinx modules, such as sphinxcontrib.programoutput, attempt to execute programs and only invoking sphinx-build with the relative path causes the paths to not be set up properly. Co-Authored-By: David Moreau Simard <dmsimard@redhat.com> Change-Id: Ie5e2c93f88465f4aa746827ff88a585dbaa44fd5
33 lines
820 B
ReStructuredText
33 lines
820 B
ReStructuredText
Ensure sphinx is installed
|
|
|
|
Installs sphinx. Also installs any dependencies needed in the first of
|
|
doc/requirements.txt and test-requirements.txt to be found.
|
|
|
|
All pip installs are done with a provided constraints file, if given.
|
|
|
|
**Role Variables**
|
|
|
|
.. zuul:rolevar:: constraints_file
|
|
|
|
Optional path to a pip constraints file for installing python libraries.
|
|
|
|
.. zuul:rolevar:: doc_building_packages
|
|
:default: ['sphinx']
|
|
|
|
List of python packages to install for building docs.
|
|
|
|
.. zuul:rolevar:: sphinx_python
|
|
:default: python2
|
|
|
|
Version of python to use, either ``python2`` or ``python3``.
|
|
|
|
.. zuul:rolevar:: zuul_work_virtualenv
|
|
:default: ~/.venv
|
|
|
|
Virtualenv location in which to install things.
|
|
|
|
.. zuul:rolevar:: zuul_work_dir
|
|
:default: {{ zuul.project.src_dir }}
|
|
|
|
Directory to operate in.
|