From bbd64c76958f8028cd730a7a123300852e18ff92fbb301a89789b04d53cdd0c7 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Sun, 31 Jan 2021 15:52:11 +0000 Subject: [PATCH] Accepting request 867995 from Cloud:OpenStack:Factory OBS-URL: https://build.opensuse.org/request/show/867995 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-ncclient?expand=0&rev=13 --- allow_old_sphinx.patch | 11 +++++++++++ python-ncclient.changes | 6 ++++++ python-ncclient.spec | 9 ++++++++- 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 allow_old_sphinx.patch diff --git a/allow_old_sphinx.patch b/allow_old_sphinx.patch new file mode 100644 index 0000000..0dfe343 --- /dev/null +++ b/allow_old_sphinx.patch @@ -0,0 +1,11 @@ +--- a/docs/source/conf.py ++++ b/docs/source/conf.py +@@ -19,7 +19,7 @@ import sys, os + sys.path.insert(0, os.path.abspath("../..")) + + # -- General configuration ----------------------------------------------------- +-needs_sphinx = '2.0' ++# needs_sphinx = '2.0' + + # Add any Sphinx extension module names here, as strings. They can be extensions + # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. diff --git a/python-ncclient.changes b/python-ncclient.changes index 847dc62..20e6975 100644 --- a/python-ncclient.changes +++ b/python-ncclient.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jan 28 21:19:07 UTC 2021 - Matej Cepl + +- Add allow_old_sphinx.patch allowing building of documentation + on Leap 15 (bsc#1181270). + ------------------------------------------------------------------- Sun Aug 9 14:03:46 UTC 2020 - Martin Hauke diff --git a/python-ncclient.spec b/python-ncclient.spec index 93f52ba..fe7a4ed 100644 --- a/python-ncclient.spec +++ b/python-ncclient.spec @@ -1,7 +1,7 @@ # # spec file for package python-ncclient # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -25,6 +25,9 @@ License: Apache-2.0 Group: Development/Languages/Python URL: http://ncclient.org Source: https://github.com/ncclient/ncclient/archive/v%{version}.tar.gz#/ncclient-%{version}.tar.gz +# PATCH-FIX-OPENSUSE allow_old_sphinx.patch mcepl@suse.com +# Allow build with old Sphinx (< 2.0) on Leap +Patch0: allow_old_sphinx.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -62,6 +65,10 @@ This package contains documentation files for %{name}. %prep %setup -q -n ncclient-%{version} +%if 0%{?suse_version} < 1550 +%patch0 -p1 +%endif + find examples/ -name "*.py" -exec sed -i 's|#!/usr/bin/env python$|#!/usr/bin/python|g' {} \; # drop shebang find ncclient/operations/third_party/ -name "*.py" -exec sed -i '/^#!\//, 1d' {} \;