View | Details | Raw Unified | Return to bug 204992
Collapse All | Expand All

(-)../../home/pi/myp/devel/py-pbr/Makefile (-1 / +1 lines)
Lines 2-8 Link Here
2
# $FreeBSD: head/devel/py-pbr/Makefile 395669 2015-08-31 12:44:05Z koobs $
2
# $FreeBSD: head/devel/py-pbr/Makefile 395669 2015-08-31 12:44:05Z koobs $
3
3
4
PORTNAME=	pbr
4
PORTNAME=	pbr
5
PORTVERSION=	1.6.0
5
PORTVERSION=	1.8.1
6
CATEGORIES=	devel python
6
CATEGORIES=	devel python
7
MASTER_SITES=	CHEESESHOP
7
MASTER_SITES=	CHEESESHOP
8
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
8
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
(-)../../home/pi/myp/devel/py-pbr/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (pbr-1.6.0.tar.gz) = 4eaee8ff5544703edd1951ed1dc0b283da99a74f740d9f9055eeefcf329de1d1
1
SHA256 (pbr-1.8.1.tar.gz) = e2127626a91e6c885db89668976db31020f0af2da728924b56480fc7ccf09649
2
SIZE (pbr-1.6.0.tar.gz) = 99945
2
SIZE (pbr-1.8.1.tar.gz) = 104584
(-)../../home/pi/myp/devel/py-pbr/files/patch-pbr_builddoc.py (-59 lines)
Lines 1-59 Link Here
1
From 12e36886fe343f8103a21c60d6925115ad8dbc26 Mon Sep 17 00:00:00 2001
2
From: Thomas Bechtold <tbechtold@suse.com>
3
Date: Tue, 2 Jun 2015 18:40:38 +0200
4
Subject: [PATCH] Remove sphinx_config.init_values() manual call
5
6
The function signature for Sphinx's config.init_values() changed since
7
version 1.3. That leads to:
8
9
TypeError: init_values() takes exactly 2 arguments (1 given)
10
11
But the function is already correctly called from
12
application.Sphinx()'s constructor. So use the configuration object
13
from the application instead of creating an own config object.
14
15
Commit 1dfe9ef348c777bef67b2c2b1d35e50ebc720333 already introduced this
16
change and commit e41a9180ed3103bb45fa1d1be93ba951016b029c reverted it
17
due to build failures with Sphinx 1.1.3 . The failure occurred because
18
using the application class to detect if man pages can build raised a
19
warning which was treated as error. This case is now handled and tested
20
with Sphinx 1.1.3 and 1.3.1.
21
22
Change-Id: Idf6c7b329880c6698b61ee9e88f29c0f6e0956bf
23
Closes-Bug: #1379998
24
25
--- pbr/builddoc.py.orig	2015-08-24 21:30:59 UTC
26
+++ pbr/builddoc.py
27
@@ -27,7 +27,6 @@ except ImportError:
28
 try:
29
     from sphinx import apidoc
30
     from sphinx import application
31
-    from sphinx import config
32
     from sphinx import setup_command
33
 except Exception as e:
34
     # NOTE(dhellmann): During the installation of docutils, setuptools
35
@@ -129,10 +128,21 @@ class LocalBuildDoc(setup_command.BuildD
36
             confoverrides['release'] = self.release
37
         if self.today:
38
             confoverrides['today'] = self.today
39
-        sphinx_config = config.Config(self.config_dir, 'conf.py', {}, [])
40
-        sphinx_config.init_values()
41
-        if self.builder == 'man' and len(sphinx_config.man_pages) == 0:
42
+
43
+        # NOTE(toabctl): creating the app with "warningiserror=False" is
44
+        # used to detect if man_pages are available.Only needed for sphinx<1.3
45
+        # See also https://github.com/sphinx-doc/sphinx/issues/1933
46
+        app = application.Sphinx(
47
+            self.source_dir, self.config_dir,
48
+            self.builder_target_dir, self.doctree_dir,
49
+            self.builder, confoverrides, status_stream,
50
+            freshenv=self.fresh_env, warningiserror=False)
51
+
52
+        if self.builder == 'man' and len(app.config.man_pages) == 0:
53
             return
54
+
55
+        # NOTE(toabctl): Now create the app with "warningiserror=True for real
56
+        # usage
57
         app = application.Sphinx(
58
             self.source_dir, self.config_dir,
59
             self.builder_target_dir, self.doctree_dir,

Return to bug 204992