- update to 1.0.1: * Remove self.pre_run calls in packaging.py * Update hacking to 0.10.x series * Teach pbr to read extras and env markers * Bump integration test timeouts * Finish removing invocations of pip * Advertise support for Python3.4 * Issue #1451976: handle commits with non-utf8 text * Parallelise integration tests - Removed pbr-0.10.8-fix-sphinx-init_values.patch . Replaced upstream with 0001-Remove-sphinx_config.init_values-manual-call.patch - Added 0001-Remove-sphinx_config.init_values-manual-call.patch OBS-URL: https://build.opensuse.org/request/show/311126 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pbr?expand=0&rev=29
57 lines
1.9 KiB
Diff
57 lines
1.9 KiB
Diff
From 1dfe9ef348c777bef67b2c2b1d35e50ebc720333 Mon Sep 17 00:00:00 2001
|
|
From: Thomas Bechtold <tbechtold@suse.com>
|
|
Date: Tue, 2 Jun 2015 18:40:38 +0200
|
|
Subject: [PATCH] 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
|
|
---
|
|
pbr/builddoc.py | 9 ++++-----
|
|
1 file 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:
|
|
--
|
|
2.4.2
|
|
|