From 96da61cc6d42594316f2051d93738bea817a7bb2 Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Thu, 24 Aug 2023 16:34:43 +0200 Subject: [PATCH] Update to 1.0.6 --- .gitignore | 1 + 14.patch | 82 ------------------- Prevent-circular-dependency-with-Sphinx.patch | 32 ++++++++ python-sphinxcontrib-qthelp.spec | 34 ++++---- sources | 2 +- 5 files changed, 53 insertions(+), 98 deletions(-) delete mode 100644 14.patch create mode 100644 Prevent-circular-dependency-with-Sphinx.patch diff --git a/.gitignore b/.gitignore index 8922f41..40a39d0 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /sphinxcontrib-qthelp-*.tar.gz +/sphinxcontrib_qthelp-*.tar.gz diff --git a/14.patch b/14.patch deleted file mode 100644 index f65375b..0000000 --- a/14.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 40f9dc8921486b7fd8ac84964f1e45103b540b81 Mon Sep 17 00:00:00 2001 -From: MeggyCal -Date: Wed, 1 Jun 2022 10:35:11 +0200 -Subject: [PATCH] Fix tests with Sphinx 5.0 - ---- - tests/test_qthelp.py | 20 ++++++++++---------- - 1 file changed, 10 insertions(+), 10 deletions(-) - -diff --git a/tests/test_qthelp.py b/tests/test_qthelp.py -index fd83241..4c5f77d 100644 ---- a/tests/test_qthelp.py -+++ b/tests/test_qthelp.py -@@ -17,7 +17,7 @@ - def test_qthelp_basic(app, status, warning): - app.builder.build_all() - -- qhp = (app.outdir / 'Python.qhp').text() -+ qhp = (app.outdir / 'Python.qhp').read_text() - assert '' in qhp - assert 'Python' in qhp - assert '' in qhp -@@ -26,7 +26,7 @@ def test_qthelp_basic(app, status, warning): - assert 'index.html' in qhp - assert '_static/basic.css' in qhp - -- qhcp = (app.outdir / 'Python.qhcp').text() -+ qhcp = (app.outdir / 'Python.qhcp').read_text() - assert 'Python documentation' in qhcp - assert 'qthelp://org.sphinx.python/doc/index.html' in qhcp - assert 'qthelp://org.sphinx.python/doc/index.html' in qhcp -@@ -91,10 +91,10 @@ def test_qthelp_namespace(app, status, warning): - # default namespace - app.builder.build_all() - -- qhp = (app.outdir / 'Python.qhp').text() -+ qhp = (app.outdir / 'Python.qhp').read_text() - assert 'org.sphinx.python' in qhp - -- qhcp = (app.outdir / 'Python.qhcp').text() -+ qhcp = (app.outdir / 'Python.qhcp').read_text() - assert 'qthelp://org.sphinx.python/doc/index.html' in qhcp - assert 'qthelp://org.sphinx.python/doc/index.html' in qhcp - -@@ -102,10 +102,10 @@ def test_qthelp_namespace(app, status, warning): - app.config.qthelp_namespace = 'org.sphinx-doc.sphinx' - app.builder.build_all() - -- qhp = (app.outdir / 'Python.qhp').text() -+ qhp = (app.outdir / 'Python.qhp').read_text() - assert 'org.sphinx-doc.sphinx' in qhp - -- qhcp = (app.outdir / 'Python.qhcp').text() -+ qhcp = (app.outdir / 'Python.qhcp').read_text() - assert 'qthelp://org.sphinx-doc.sphinx/doc/index.html' in qhcp - assert 'qthelp://org.sphinx-doc.sphinx/doc/index.html' in qhcp - -@@ -115,10 +115,10 @@ def test_qthelp_title(app, status, warning): - # default title - app.builder.build_all() - -- qhp = (app.outdir / 'Python.qhp').text() -+ qhp = (app.outdir / 'Python.qhp').read_text() - assert '
' in qhp - -- qhcp = (app.outdir / 'Python.qhcp').text() -+ qhcp = (app.outdir / 'Python.qhcp').read_text() - assert 'Python documentation' in qhcp - - # give a title -@@ -126,9 +126,9 @@ def test_qthelp_title(app, status, warning): - app.config.html_short_title = 'Sphinx "short" title' - app.builder.build_all() - -- qhp = (app.outdir / 'Python.qhp').text() -+ qhp = (app.outdir / 'Python.qhp').read_text() - assert ('
' - in qhp) - -- qhcp = (app.outdir / 'Python.qhcp').text() -+ qhcp = (app.outdir / 'Python.qhcp').read_text() - assert 'Sphinx <b>"short"</b> title' in qhcp diff --git a/Prevent-circular-dependency-with-Sphinx.patch b/Prevent-circular-dependency-with-Sphinx.patch new file mode 100644 index 0000000..59693be --- /dev/null +++ b/Prevent-circular-dependency-with-Sphinx.patch @@ -0,0 +1,32 @@ +From e680b4403819e0afbf5bef6a95227899cade6ae9 Mon Sep 17 00:00:00 2001 +From: Karolina Surma +Date: Fri, 20 Oct 2023 14:03:31 +0200 +Subject: [PATCH] Prevent circular dependency with Sphinx + +--- + pyproject.toml | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/pyproject.toml b/pyproject.toml +index a8cbb00..6518bb6 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -39,14 +39,12 @@ classifiers = [ + "Topic :: Text Processing", + "Topic :: Utilities", + ] +-dependencies = [ +- "Sphinx>=5", +-] + dynamic = ["version"] + + [project.optional-dependencies] + test = [ + "pytest", ++ "Sphinx", + ] + lint = [ + "flake8", +-- +2.41.0 + diff --git a/python-sphinxcontrib-qthelp.spec b/python-sphinxcontrib-qthelp.spec index 3d2e93a..6bd2098 100644 --- a/python-sphinxcontrib-qthelp.spec +++ b/python-sphinxcontrib-qthelp.spec @@ -4,25 +4,23 @@ %bcond_without check Name: python-%{pypi_name} -Version: 1.0.3 -Release: 16%{?dist} +Version: 1.0.6 +Release: 1%{?dist} Summary: Sphinx extension for QtHelp documents License: BSD-2-Clause URL: http://sphinx-doc.org/ -Source0: %{pypi_source} +Source0: %{pypi_source sphinxcontrib_qthelp} BuildArch: noarch -# In Sphinx 5 path.read_text() replaces path.text() - compatibility fix -Patch: https://github.com/sphinx-doc/sphinxcontrib-qthelp/pull/14.patch +# Sphinx requires sphinxcontrib-* packages, they've started requiring Sphinx +# In the RPM environment the dependencies are handled correctly without it +# Remove the runtime requirement on Sphinx from this package +# See: https://github.com/sphinx-doc/sphinx/issues/11567 +Patch: Prevent-circular-dependency-with-Sphinx.patch BuildRequires: gettext BuildRequires: python%{python3_pkgversion}-devel -BuildRequires: python%{python3_pkgversion}-setuptools -%if %{with check} -BuildRequires: python%{python3_pkgversion}-pytest -BuildRequires: python%{python3_pkgversion}-sphinx >= 1:2 -%endif %description sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp document. @@ -36,8 +34,11 @@ Summary: %{summary} sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp document. +%generate_buildrequires +%pyproject_buildrequires %{?with_check: -x test} + %prep -%autosetup -p1 -n %{pypi_name}-%{version} +%autosetup -p1 -n sphinxcontrib_qthelp-%{version} find -name '*.mo' -delete @@ -45,11 +46,11 @@ find -name '*.mo' -delete for po in $(find -name '*.po'); do msgfmt --output-file=${po%.po}.mo ${po} done -%py3_build +%pyproject_wheel %install -%py3_install +%pyproject_install # Move language files to /usr/share pushd %{buildroot}%{python3_sitelib} @@ -77,11 +78,14 @@ popd %license LICENSE %doc README.rst %{python3_sitelib}/sphinxcontrib/ -%{python3_sitelib}/sphinxcontrib_qthelp-%{version}-py%{python3_version}-*.pth -%{python3_sitelib}/sphinxcontrib_qthelp-%{version}-py%{python3_version}.egg-info/ +%{python3_sitelib}/sphinxcontrib_qthelp-%{version}.dist-info/ %changelog +* Thu Aug 24 2023 Karolina Surma - 1.0.6-1 +- Update to 1.0.6 +Resolves: rhbz#2230149 + * Thu Aug 10 2023 Karolina Surma - 1.0.3-16 - Declare the license as an SPDX expression diff --git a/sources b/sources index e5f07e2..9fe3bf0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (sphinxcontrib-qthelp-1.0.3.tar.gz) = 29f77e4b3f1a4868c2a34dbd853415e5d813f482cd23b982aeed42d53acba09b896d77ba930c34cce8af043bb7d64a19acff610430e942038d95a410b6e0b5fa +SHA512 (sphinxcontrib_qthelp-1.0.6.tar.gz) = 783cd757bf262ce63f54019a5ccf1d7e6fb59e8fde07e7cfa0610bf0cd49e6e51cada9c35bf11cc5ff351904da6a69569be1d4db58d450a96375aee7bf1f34ff