Merge "Update the sphinx python package sets"

This commit is contained in:
Zuul 2019-07-08 18:34:43 +00:00 committed by Gerrit Code Review
commit 410907d004
6 changed files with 22 additions and 8 deletions

View File

@ -4,7 +4,6 @@
bindep_profile: doc bindep_profile: doc
bindep_dir: "{{ zuul_work_dir }}" bindep_dir: "{{ zuul_work_dir }}"
- role: ensure-sphinx - role: ensure-sphinx
doc_building_packages: doc_building_extra_packages:
- sphinx
- reno - reno
- revoke-sudo - revoke-sudo

View File

@ -12,9 +12,16 @@ All pip installs are done with a provided constraints file, if given.
Optional path to a pip constraints file for installing python libraries. Optional path to a pip constraints file for installing python libraries.
.. zuul:rolevar:: doc_building_packages .. zuul:rolevar:: doc_building_packages
:default: ['sphinx'] :default: ``list``
List of python packages to install for building docs. List of python packages to install for building docs. The default
package list is based on the python version in use.
.. zuul:rolevar:: doc_building_extra_packages
:default: ``list``
List of python additional packages to install for building docs.
By default this list is empty.
.. zuul:rolevar:: sphinx_python .. zuul:rolevar:: sphinx_python
:default: python2 :default: python2

View File

@ -1,5 +1,5 @@
zuul_work_dir: "{{ zuul.project.src_dir }}" zuul_work_dir: "{{ zuul.project.src_dir }}"
zuul_work_virtualenv: "{{ ansible_user_dir }}/.venv" zuul_work_virtualenv: "{{ ansible_user_dir }}/.venv"
sphinx_python: python2 sphinx_python: python2
doc_building_packages: doc_building_packages: "{{ _doc_building_packages | default([]) }}"
- sphinx doc_building_extra_packages: []

View File

@ -1,3 +1,5 @@
---
# NOTE: gettext command is provided by gettext-base package, # NOTE: gettext command is provided by gettext-base package,
# so we need to check a command provided by gettext package. # so we need to check a command provided by gettext package.
- name: Check for gettext installed - name: Check for gettext installed
@ -33,15 +35,17 @@
done done
register: requirements_file register: requirements_file
- name: Gather python version variables
include_vars: "{{ sphinx_python.split('.')[0] }}.yaml"
# TODO(dmsimard) Don't assume virtualenv is installed # TODO(dmsimard) Don't assume virtualenv is installed
- name: Install base doc building packages - name: Install base doc building packages
pip: pip:
name: "{{ item }}" name: "{{ doc_building_packages | union(doc_building_extra_packages) }}"
chdir: "{{ zuul_work_dir }}" chdir: "{{ zuul_work_dir }}"
virtualenv: "{{ zuul_work_virtualenv }}" virtualenv: "{{ zuul_work_virtualenv }}"
virtualenv_python: "{{ sphinx_python }}" virtualenv_python: "{{ sphinx_python }}"
extra_args: "{{ upper_constraints | default(omit) }}" extra_args: "{{ upper_constraints | default(omit) }}"
with_items: "{{ doc_building_packages }}"
# TODO(dmsimard) Don't assume virtualenv is installed # TODO(dmsimard) Don't assume virtualenv is installed
- name: Install found doc requirements - name: Install found doc requirements

View File

@ -0,0 +1,2 @@
_doc_building_packages:
- sphinx<2.0

View File

@ -0,0 +1,2 @@
_doc_building_packages:
- sphinx