From b6b083745a9e59d9bf37b2945891810a8e758677d50fb2b2f122745294d5dbcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Tue, 13 Jul 2021 06:59:21 +0000 Subject: [PATCH] Accepting request 906026 from home:mcalabkova:branches:devel:languages:python - Add sphinx41.patch to fix build with Sphinx 4.1.0 OBS-URL: https://build.opensuse.org/request/show/906026 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-sphinx_rtd_theme?expand=0&rev=27 --- python-sphinx_rtd_theme.changes | 5 +++++ python-sphinx_rtd_theme.spec | 4 +++- sphinx41.patch | 17 +++++++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 sphinx41.patch diff --git a/python-sphinx_rtd_theme.changes b/python-sphinx_rtd_theme.changes index b2200ba..e31fc99 100644 --- a/python-sphinx_rtd_theme.changes +++ b/python-sphinx_rtd_theme.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jul 13 06:56:38 UTC 2021 - Markéta Machová + +- Add sphinx41.patch to fix build with Sphinx 4.1.0 + ------------------------------------------------------------------- Tue Apr 20 09:50:10 UTC 2021 - Matthias Fehring diff --git a/python-sphinx_rtd_theme.spec b/python-sphinx_rtd_theme.spec index efea8c5..d25985c 100644 --- a/python-sphinx_rtd_theme.spec +++ b/python-sphinx_rtd_theme.spec @@ -1,5 +1,5 @@ # -# spec file for package python-sphinx_rtd_theme-test +# spec file # # Copyright (c) 2021 SUSE LLC # @@ -33,6 +33,7 @@ License: Apache-2.0 AND MIT AND OFL-1.1 Group: Development/Languages/Python URL: https://github.com/snide/sphinx_rtd_theme/ Source: https://files.pythonhosted.org/packages/source/s/sphinx_rtd_theme/sphinx_rtd_theme-%{version}.tar.gz +Patch0: sphinx41.patch BuildRequires: %{python_module setuptools} BuildRequires: dos2unix BuildRequires: fdupes @@ -54,6 +55,7 @@ if you're just trying to use it on your project outside of that site. %prep %setup -q -n sphinx_rtd_theme-%{version} +%patch0 -p1 dos2unix OFL-License.txt # We cannot build the Javascript from source at this time, due to many missing diff --git a/sphinx41.patch b/sphinx41.patch new file mode 100644 index 0000000..55b09ce --- /dev/null +++ b/sphinx41.patch @@ -0,0 +1,17 @@ +Index: sphinx_rtd_theme-0.5.2/tests/test_builders.py +=================================================================== +--- sphinx_rtd_theme-0.5.2.orig/tests/test_builders.py ++++ sphinx_rtd_theme-0.5.2/tests/test_builders.py +@@ -3,7 +3,11 @@ import os + import pytest + import sphinx + from sphinx import addnodes +-from sphinx.builders.html import SingleFileHTMLBuilder, DirectoryHTMLBuilder ++try: ++ from sphinx.builders.html import SingleFileHTMLBuilder, DirectoryHTMLBuilder ++except ImportError: ++ from sphinx.builders.singlehtml import SingleFileHTMLBuilder ++ from sphinx.builders.dirhtml import DirectoryHTMLBuilder + + from .util import build_all +