From e41a9180ed3103bb45fa1d1be93ba951016b029c Mon Sep 17 00:00:00 2001 From: Paul Belanger Date: Tue, 9 Jun 2015 14:34:04 -0400 Subject: [PATCH] Revert "Remove sphinx_config.init_values() manual call" This caused in issue in the gate for tox -edocs builds: http://logs.openstack.org/15/187715/5/check/gate-infra-specs-docs/a8cae26/console.html This reverts commit 1dfe9ef348c777bef67b2c2b1d35e50ebc720333. Change-Id: Ia6cfbfe5b10a5b714fbb9f21ca61380aaf231638 Signed-off-by: Paul Belanger --- pbr/builddoc.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pbr/builddoc.py b/pbr/builddoc.py index 7468f310..3c9a9a14 100644 --- a/pbr/builddoc.py +++ b/pbr/builddoc.py @@ -27,6 +27,7 @@ except ImportError: try: from sphinx import apidoc from sphinx import application + from sphinx import config from sphinx import setup_command except Exception as e: # NOTE(dhellmann): During the installation of docutils, setuptools @@ -128,16 +129,16 @@ class LocalBuildDoc(setup_command.BuildDoc): confoverrides['release'] = self.release if self.today: confoverrides['today'] = self.today - + sphinx_config = config.Config(self.config_dir, 'conf.py', {}, []) + sphinx_config.init_values() + if self.builder == 'man' and len(sphinx_config.man_pages) == 0: + return app = application.Sphinx( self.source_dir, self.config_dir, self.builder_target_dir, self.doctree_dir, self.builder, confoverrides, status_stream, freshenv=self.fresh_env, warningiserror=True) - if self.builder == 'man' and len(app.config.man_pages) == 0: - return - try: app.build(force_all=self.all_files) except Exception as err: