summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bechtold <tbechtold@suse.com>2015-06-02 18:40:38 +0200
committerThomas Bechtold <tbechtold@suse.com>2015-06-02 18:40:38 +0200
commit1dfe9ef348c777bef67b2c2b1d35e50ebc720333 (patch)
treecefb32071ae4c691fae01a9d16515829cb19b1fe
parentbb838190eebbaf11887f89d8ef265f0924f19ae4 (diff)
downloadpbr-1dfe9ef348c777bef67b2c2b1d35e50ebc720333.tar.gz
Remove sphinx_config.init_values() manual call
The function signature for Sphinx's config.init_values() changed since version 1.3. That leads to: TypeError: init_values() takes exactly 2 arguments (1 given) But the function is already correctly called from application.Sphinx()'s constructor. So use the configuration object from the application instead of creating an own config object. Change-Id: I343c26560bfe5116d5348b50b1890b3442ed845a Closes-Bug: #1379998
-rw-r--r--pbr/builddoc.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/pbr/builddoc.py b/pbr/builddoc.py
index 7c9916b..60f2afd 100644
--- a/pbr/builddoc.py
+++ b/pbr/builddoc.py
@@ -26,7 +26,6 @@ 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
@@ -126,16 +125,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: