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
This commit is contained in:
Markéta Machová 2021-07-13 06:59:21 +00:00 committed by Git OBS Bridge
parent 0286db108f
commit b6b083745a
3 changed files with 25 additions and 1 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Jul 13 06:56:38 UTC 2021 - Markéta Machová <mmachova@suse.com>
- Add sphinx41.patch to fix build with Sphinx 4.1.0
-------------------------------------------------------------------
Tue Apr 20 09:50:10 UTC 2021 - Matthias Fehring <buschmann23@opensuse.org>

View File

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

17
sphinx41.patch Normal file
View File

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