From a4449758bfcedd99be15ebbdb212746e4e2356ee Mon Sep 17 00:00:00 2001 From: Mohammed Naser Date: Mon, 14 Oct 2019 12:37:47 -0400 Subject: [PATCH] Fix documentation builds This patch does a few things to fix the documentation builds for this project - Move requirements to doc/requirements.txt for building docs to avoid installing extra dependencies. - Bump sphinx version to a newer release which is compatible with sphinxcontrib-programoutput - Remove default theme option to use the latest Sphinx theme that is shipped directly from upstream. - Bumped basepython for documentation jobs to Python 3. These are all squashed because the job is currently broken. Change-Id: Ib998923a5daaa5e9d3ddc748b76b6304e5c39b22 --- doc/requirements.txt | 2 ++ doc/source/conf.py | 4 ++-- test-requirements.txt | 2 -- tox.ini | 6 +++++- 4 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 doc/requirements.txt diff --git a/doc/requirements.txt b/doc/requirements.txt new file mode 100644 index 0000000..28a5468 --- /dev/null +++ b/doc/requirements.txt @@ -0,0 +1,2 @@ +sphinx>=1.6.1 +sphinxcontrib-programoutput \ No newline at end of file diff --git a/doc/source/conf.py b/doc/source/conf.py index 5dc2e4e..a0880b6 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -92,7 +92,7 @@ pygments_style = 'sphinx' # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'default' +#html_theme = 'default' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the @@ -121,7 +121,7 @@ html_theme = 'default' # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] +html_static_path = [] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. diff --git a/test-requirements.txt b/test-requirements.txt index 918e234..45cf7b4 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -5,9 +5,7 @@ fixtures>=0.3.12 python-subunit pyOpenSSL statsd>=1.0.0,<3.0 -sphinx>=1.1.2,<1.2 testrepository>=0.0.13 testresources testscenarios testtools>=0.9.27 -sphinxcontrib-programoutput diff --git a/tox.ini b/tox.ini index 9feb228..5984ff7 100644 --- a/tox.ini +++ b/tox.ini @@ -33,7 +33,11 @@ show-source = true ignore = E123,E125,E129,H [testenv:docs] -commands = python setup.py build_sphinx +basepython = python3 +deps = + -r{toxinidir}/doc/requirements.txt +commands = + sphinx-build -E -W -d doc/build/doctrees -b html doc/source/ doc/build/html [testenv:bindep] # Do not install any requirements. We want this to be fast and work even if