Dominique Leuenberger 2022-05-31 13:47:03 +00:00 committed by Git OBS Bridge
commit 174ae336eb
3 changed files with 31 additions and 1 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon May 30 10:38:17 UTC 2022 - Markéta Machová <mmachova@suse.com>
- Add upstream patch sphinx5.patch to fix build with the new Sphinx
-------------------------------------------------------------------
Sun Jun 6 12:12:35 UTC 2021 - Dirk Müller <dmueller@suse.com>

View File

@ -1,7 +1,7 @@
#
# spec file
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -34,6 +34,8 @@ License: BSD-2-Clause
Group: Development/Languages/Python
URL: https://github.com/sphinx-doc/sphinxcontrib-htmlhelp
Source: https://files.pythonhosted.org/packages/source/s/sphinxcontrib-htmlhelp/sphinxcontrib-htmlhelp-%{version}.tar.gz
# PATCH-FIX-UPSTREAM https://github.com/sphinx-doc/sphinxcontrib-htmlhelp/commit/248ff52b3c3d39c20cdaef3052ac7507a407733a Fix #9457: RemovedInSphinx50Warning on testing
Patch0: sphinx5.patch
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
@ -52,6 +54,7 @@ Html help generating extension.
%prep
%setup -q -n sphinxcontrib-htmlhelp-%{version}
%autopatch -p1
%build
%python_build

22
sphinx5.patch Normal file
View File

@ -0,0 +1,22 @@
Index: sphinxcontrib-htmlhelp-2.0.0/tests/test_htmlhelp.py
===================================================================
--- sphinxcontrib-htmlhelp-2.0.0.orig/tests/test_htmlhelp.py
+++ sphinxcontrib-htmlhelp-2.0.0/tests/test_htmlhelp.py
@@ -21,7 +21,7 @@ from sphinx.config import Config
def test_build_htmlhelp(app, status, warning):
app.build()
- hhp = (app.outdir / 'pythondoc.hhp').text()
+ hhp = (app.outdir / 'pythondoc.hhp').read_text()
assert 'Compiled file=pythondoc.chm' in hhp
assert 'Contents file=pythondoc.hhc' in hhp
assert 'Default Window=pythondoc' in hhp
@@ -84,7 +84,7 @@ def test_htmlhelp_hhc(app):
assert node[1].attrib == {'name': 'Local', 'value': filename}
# .hhc file
- hhc = (app.outdir / 'pythondoc.hhc').text()
+ hhc = (app.outdir / 'pythondoc.hhc').read_text()
tree = HTMLParser(namespaceHTMLElements=False).parse(hhc)
items = tree.find('.//body/ul')
assert len(items) == 4