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
This commit is contained in:
Denisart Benjamin 2014-10-29 17:19:48 +00:00 committed by Git OBS Bridge
parent 202dd2d115
commit b7538471ce
4 changed files with 70 additions and 0 deletions

View File

@ -0,0 +1,32 @@
From 0a56da8b582842e767046977e61a7021ab279f44 Mon Sep 17 00:00:00 2001
From: Dirk Mueller <dirk@dmllr.de>
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

View File

@ -0,0 +1,28 @@
From 2a31f03dc32a7f07059d3e4e3f918474c4af2669 Mon Sep 17 00:00:00 2001
From: Dirk Mueller <dirk@dmllr.de>
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

View File

@ -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

View File

@ -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