From b7538471ce1a306122abb4901ff8e97eed699b64d2ddd5a92d25239aae5d99be Mon Sep 17 00:00:00 2001
From: Denisart Benjamin
Date: Wed, 29 Oct 2014 17:19:48 +0000
Subject: [PATCH] Accepting request 258645 from Cloud:OpenStack:Master
- add 0001-Allow-overwriting-sphinx-builder-list-from-command-l.patch
0001-use-get_boolean_option-for-warnerrors.patch
OBS-URL: https://build.opensuse.org/request/show/258645
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pbr?expand=0&rev=22
---
...g-sphinx-builder-list-from-command-l.patch | 32 +++++++++++++++++++
...se-get_boolean_option-for-warnerrors.patch | 28 ++++++++++++++++
python-pbr.changes | 6 ++++
python-pbr.spec | 4 +++
4 files changed, 70 insertions(+)
create mode 100644 0001-Allow-overwriting-sphinx-builder-list-from-command-l.patch
create mode 100644 0001-use-get_boolean_option-for-warnerrors.patch
diff --git a/0001-Allow-overwriting-sphinx-builder-list-from-command-l.patch b/0001-Allow-overwriting-sphinx-builder-list-from-command-l.patch
new file mode 100644
index 0000000..108cfcd
--- /dev/null
+++ b/0001-Allow-overwriting-sphinx-builder-list-from-command-l.patch
@@ -0,0 +1,32 @@
+From 0a56da8b582842e767046977e61a7021ab279f44 Mon Sep 17 00:00:00 2001
+From: Dirk Mueller
+Date: Thu, 28 Aug 2014 12:42:56 +0200
+Subject: [PATCH] Allow overwriting sphinx builder list from command line
+
+This restores the behavior of being able to explicitely select
+only one builder via "python setup.py build_sphinx -b man".
+
+Change-Id: I4c7ddcaf413e1bcc72550b3d920f8a777a710c97
+---
+ pbr/packaging.py | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/pbr/packaging.py b/pbr/packaging.py
+index a57b453..b910587 100644
+--- a/pbr/packaging.py
++++ b/pbr/packaging.py
+@@ -761,6 +761,11 @@ try:
+ # Allow builders to be configurable - as a comma separated list.
+ if not isinstance(self.builders, list) and self.builders:
+ self.builders = self.builders.split(',')
++ # Handle builder option from command line
++ option_dict = self.distribution.get_option_dict('build_sphinx')
++ if 'command line' in option_dict.get('builder', [[]])[0]:
++ self.builders = [x for x in self.builders
++ if x == option_dict['builder'][1]]
+
+ class LocalBuildLatex(LocalBuildDoc):
+ builders = ['latex']
+--
+2.0.4
+
diff --git a/0001-use-get_boolean_option-for-warnerrors.patch b/0001-use-get_boolean_option-for-warnerrors.patch
new file mode 100644
index 0000000..c86c79c
--- /dev/null
+++ b/0001-use-get_boolean_option-for-warnerrors.patch
@@ -0,0 +1,28 @@
+From 2a31f03dc32a7f07059d3e4e3f918474c4af2669 Mon Sep 17 00:00:00 2001
+From: Dirk Mueller
+Date: Thu, 28 Aug 2014 12:28:15 +0200
+Subject: [PATCH] use get_boolean_option for warnerrors
+
+This way even warnerrors = 0 is handled properly.
+
+Change-Id: I83d2eb105d07fd65ebc720c63038fc3c542b7f90
+---
+ pbr/packaging.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/pbr/packaging.py b/pbr/packaging.py
+index a57b453..0f31950 100644
+--- a/pbr/packaging.py
++++ b/pbr/packaging.py
+@@ -750,7 +750,7 @@ try:
+ self.project = self.distribution.get_name()
+ self.version = self.distribution.get_version()
+ self.release = self.distribution.get_version()
+- if 'warnerrors' in option_dict:
++ if get_boolean_option(option_dict, 'warnerrors', 'WARNERRORS'):
+ self._sphinx_run()
+ else:
+ setup_command.BuildDoc.run(self)
+--
+2.0.4
+
diff --git a/python-pbr.changes b/python-pbr.changes
index 6bfda1d..5d7419d 100644
--- a/python-pbr.changes
+++ b/python-pbr.changes
@@ -3,6 +3,12 @@ Fri Oct 24 09:38:37 UTC 2014 - toddrme2178@gmail.com
- Add python-pip from requires to buildrequires
+-------------------------------------------------------------------
+Thu Aug 28 10:48:07 UTC 2014 - dmueller@suse.com
+
+- add 0001-Allow-overwriting-sphinx-builder-list-from-command-l.patch
+ 0001-use-get_boolean_option-for-warnerrors.patch
+
-------------------------------------------------------------------
Thu Jul 31 16:25:10 UTC 2014 - dimstar@opensuse.org
diff --git a/python-pbr.spec b/python-pbr.spec
index f3dd8b5..1bdcf26 100644
--- a/python-pbr.spec
+++ b/python-pbr.spec
@@ -29,6 +29,8 @@ Group: Development/Languages/Python
Url: http://pypi.python.org/pypi/pbr
Source: https://pypi.python.org/packages/source/p/pbr/pbr-%{version}.tar.gz
Source1: python-pbr-rpmlintrc
+Patch0: 0001-use-get_boolean_option-for-warnerrors.patch
+Patch1: 0001-Allow-overwriting-sphinx-builder-list-from-command-l.patch
BuildRequires: python-devel
BuildRequires: python-pip >= 1.4
# Documentation requirements:
@@ -65,6 +67,8 @@ information.
%prep
%setup -q -n pbr-%{version}
+%patch0 -p1
+%patch1 -p1
# Get rid of ugly build-time deps that require network:
sed -i "s/, 'sphinx\.ext\.intersphinx'//" doc/source/conf.py