From 79a8fd8313644507e9b1d3c91dfe9249bfcf59f64434b4aecddbf9c23e711e69 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 30 May 2022 15:03:43 +0000 Subject: [PATCH] Accepting request 979839 from home:mcalabkova:branches:devel:languages:python - Add upstream patch sphinx5.patch to fix build with the new Sphinx OBS-URL: https://build.opensuse.org/request/show/979839 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-sphinxcontrib-htmlhelp?expand=0&rev=9 --- python-sphinxcontrib-htmlhelp.changes | 5 +++++ python-sphinxcontrib-htmlhelp.spec | 5 ++++- sphinx5.patch | 22 ++++++++++++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 sphinx5.patch diff --git a/python-sphinxcontrib-htmlhelp.changes b/python-sphinxcontrib-htmlhelp.changes index e11a452..b850e9c 100644 --- a/python-sphinxcontrib-htmlhelp.changes +++ b/python-sphinxcontrib-htmlhelp.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon May 30 10:38:17 UTC 2022 - Markéta Machová + +- Add upstream patch sphinx5.patch to fix build with the new Sphinx + ------------------------------------------------------------------- Sun Jun 6 12:12:35 UTC 2021 - Dirk Müller diff --git a/python-sphinxcontrib-htmlhelp.spec b/python-sphinxcontrib-htmlhelp.spec index 44c1695..98ebdcf 100644 --- a/python-sphinxcontrib-htmlhelp.spec +++ b/python-sphinxcontrib-htmlhelp.spec @@ -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 diff --git a/sphinx5.patch b/sphinx5.patch new file mode 100644 index 0000000..51c8273 --- /dev/null +++ b/sphinx5.patch @@ -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