From 3e94d71732dbcc6ab1caabc38bae36b4b285a259 Mon Sep 17 00:00:00 2001 From: zhurong Date: Tue, 23 Apr 2019 20:03:26 +0800 Subject: [PATCH] Fix murano-specs gate Change-Id: Ib90d89982a97692160f0ed62332953af691030ba --- doc/source/conf.py | 4 ++-- doc/source/redirect.py | 20 +++++++++----------- requirements.txt | 4 ++-- 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 2054b7d..3d261a8 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -33,12 +33,12 @@ extensions = ['redirect', 'sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.viewcode', - 'oslosphinx', + 'openstackdocstheme', 'yasfb', ] # Feed configuration for yasfb -feed_base_url = 'http://murano-specs.readthedocs.org' +feed_base_url = 'http://specs.openstack.org/openstack/murano-specs' feed_author = 'OpenStack Murano Team' todo_include_todos = True diff --git a/doc/source/redirect.py b/doc/source/redirect.py index 5f47428..56fde37 100644 --- a/doc/source/redirect.py +++ b/doc/source/redirect.py @@ -7,15 +7,9 @@ import os.path -from sphinx.application import ENV_PICKLE_FILENAME -from sphinx.util.console import bold +from sphinx.util import logging - -def setup(app): - from sphinx import application - if not isinstance(app, application.Sphinx): - return - app.connect('build-finished', emit_redirects) +LOG = logging.getLogger(__name__) def process_redirect_file(app, path, ent): @@ -37,7 +31,7 @@ def process_redirect_file(app, path, ent): def emit_redirects(app, exc): - app.builder.info(bold('scanning %s for redirects...') % app.builder.srcdir) + LOG.info('scanning %s for redirects...', app.builder.srcdir) def process_directory(path): for ent in os.listdir(path): @@ -45,8 +39,12 @@ def emit_redirects(app, exc): if os.path.isdir(p): process_directory(p) elif ent == 'redirects': - app.builder.info(' found redirects at %s' % p) + LOG.info(' found redirects at %s' % p) process_redirect_file(app, path, ent) process_directory(app.builder.srcdir) - app.builder.info('...done') + LOG.info('...done') + + +def setup(app): + app.connect('build-finished', emit_redirects) diff --git a/requirements.txt b/requirements.txt index a31d6ed..597fbcd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,8 +3,8 @@ # process, which may cause wedges in the gate later. pbr>=2.0.0,!=2.1.0 # Apache-2.0 -oslosphinx>=4.7.0 # Apache-2.0 sphinx>=1.5.1 # BSD testrepository>=0.0.18 # Apache-2.0/BSD testtools>=1.4.0 # MIT -yasfb>=0.5.1,!=0.6.0 +yasfb>=0.8.0 +openstackdocstheme>=1.19.0 # Apache-2.0