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 +