From 2ffbcd1484a2863d0978cfdf9af373868d7803f8 Mon Sep 17 00:00:00 2001 From: wangqian Date: Tue, 14 May 2019 15:26:17 +0800 Subject: [PATCH] Move doc related modules to doc/requirements.txt Because sphinx and oslosphinx module is not for the unit test. I remove sphinx and oslosphinx from test-requirements.txt. Add doc/requirements.txt and modify doc/source/_static/conf.py Beacause of the build of py27 is failed(Zuul), I write this patch. Change-Id: I306795ca0192675d8ffb9bbc2f1fa04165a45209 --- doc/requirements.txt | 6 ++++++ doc/source/conf.py | 2 +- test-requirements.txt | 2 -- tox.ini | 7 ++++++- 4 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 doc/requirements.txt diff --git a/doc/requirements.txt b/doc/requirements.txt new file mode 100644 index 00000000..ed59bacc --- /dev/null +++ b/doc/requirements.txt @@ -0,0 +1,6 @@ +# The order of packages is significant, because pip processes them in the order +# of appearance. Changing the order has an impact on the overall integration +# process, which may cause wedges in the gate later. +openstackdocstheme>=1.18.1 # Apache-2.0 +reno>=2.5.0 # Apache-2.0 +sphinx>=1.6.2 # BSD diff --git a/doc/source/conf.py b/doc/source/conf.py index bcc392ec..b0114806 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -17,7 +17,7 @@ import os extensions = ['sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.viewcode', - 'oslosphinx' + 'openstackdocstheme' ] todo_include_todos = True diff --git a/test-requirements.txt b/test-requirements.txt index cda2e018..62ef188b 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -8,6 +8,4 @@ docutils>=0.11 # OSI-Approved Open Source, Public Domain stestr>=1.0.0 # Apache-2.0 mock>=2.0 # BSD fixtures>=3.0.0 # Apache-2.0/BSD -sphinx>=1.6.2 # BSD -oslosphinx>=4.7.0 # Apache-2.0 feedparser>=5.2.1 diff --git a/tox.ini b/tox.ini index 6ccdd9c1..925a470b 100644 --- a/tox.ini +++ b/tox.ini @@ -20,8 +20,13 @@ commands = {posargs} [testenv:docs] basepython = python3 +deps = -r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt + -r{toxinidir}/doc/requirements.txt commands = - python setup.py build_sphinx {posargs} + rm -rf doc/build + sphinx-build -W -b html doc/source doc/build/html +whitelist_externals = rm [testenv:pep8] basepython = python3