Update python-saharaclient to 1.6.0 and include patch for newer Sphinx

1.6.0 needs a backport of a fix to build with an already deprecated
part of Sphinx, so to build with Sphinx 1.7.x this patch is required

Depends-on: I0dbf9b9c574bac7b40998c8774e6882b674f3fa5
Change-Id: Ia4ceed4553ccc92886661b7893384a9b0812fa6c
This commit is contained in:
Dirk Mueller
2018-07-26 21:19:19 +02:00
committed by Sumit Jamgade
parent a0ac085153
commit 72ff9a3426
2 changed files with 37 additions and 3 deletions

View File

@@ -0,0 +1,32 @@
From a54d23542406d35d266a708f362024691209abd5 Mon Sep 17 00:00:00 2001
From: Thomas Goirand <zigo@debian.org>
Date: Wed, 25 Apr 2018 10:41:23 +0200
Subject: [PATCH 01/18] Fix build with Sphinx 1.7.x
In sphinx 1.7, the sphinx.util.compat.Directive class doesn't exist
anymore, it's available in docutils.parsers.rst.Directive instead,
and it was deprecated in Sphinx 1.6 already. This patch makes it
therefore work in both version 1.6 and 1.7 just by using the new
module path docutils.parsers.rst.Directive.
Change-Id: I2e05c1612c687c029174f045d3ea0fec83e1119a
---
doc/ext/ext.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/ext/ext.py b/doc/ext/ext.py
index 9b07ab1..e0bf27b 100644
--- a/doc/ext/ext.py
+++ b/doc/ext/ext.py
@@ -19,7 +19,7 @@ import os
from docutils import nodes
from docutils.statemachine import StringList
from docutils.parsers.rst.directives import flag, unchanged
-from sphinx.util.compat import Directive
+from docutils.parsers.rst import Directive
from sphinx.util.nodes import nested_parse_with_titles
from .parser import parse_parser, parser_navigate
--
2.10.2

View File

@@ -1,12 +1,14 @@
{% set upstream_version = upstream_version('1.6.0') %}
%global sname saharaclient
Name: {{ py2name('python-saharaclient') }}
Version: 1.5.0
Version: {{ py2rpmversion() }}
Release: 0
Summary: Client library for OpenStack Sahara API
License: {{ license('Apache-2.0') }}
Group: Development/Languages/Python
URL: https://launchpad.net/%{name}
Source0: https://files.pythonhosted.org/packages/source/p/%{name}/%{name}-%{version}.tar.gz
Patch0: 0001-Fix-build-with-Sphinx-1.7.x.patch
BuildRequires: openstack-macros
BuildRequires: {{ py2pkg('devel') }}
BuildRequires: {{ py2pkg('python-keystoneclient') }}
@@ -50,7 +52,7 @@ BuildRequires: {{ py2pkg('openstackdocstheme') }}
Python client library for interacting with OpenStack Sahara API.
%prep
%autosetup -n %{name}-%{version}
%autosetup -p1 -n %{name}-%{version}
%py_req_cleanup
# FIXME: can be removed when https://review.openstack.org/#/c/363681/ is merged
sed -i -e 's/^\s\{4\}git_cmd\(.*\)/ "\/usr\/bin\/true"\1/' doc/source/conf.py
@@ -63,7 +65,7 @@ sed -i 's/^warning-is-error.*/warning-is-error = 0/g' setup.cfg
%py2_install
# Build HTML docs and man page
%{__python2} setup.py build_sphinx
PBR_VERSION={{ upstream_version }} PYTHONPATH=%{buildroot}%{python2_sitelib} sphinx-build -b html doc/source doc/build/html
# remove the sphinx-build leftovers
rm -rf doc/build/html/.{doctrees,buildinfo}