Update to 1.0.6

This commit is contained in:
Karolina Surma 2023-08-24 16:34:43 +02:00
parent 3eb4039714
commit 96da61cc6d
5 changed files with 53 additions and 98 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
/sphinxcontrib-qthelp-*.tar.gz
/sphinxcontrib_qthelp-*.tar.gz

View File

@ -1,82 +0,0 @@
From 40f9dc8921486b7fd8ac84964f1e45103b540b81 Mon Sep 17 00:00:00 2001
From: MeggyCal <MeggyCal@users.noreply.github.com>
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 '<customFilter name="Python ">' in qhp
assert '<filterAttribute>Python</filterAttribute>' in qhp
assert '<filterAttribute></filterAttribute>' in qhp
@@ -26,7 +26,7 @@ def test_qthelp_basic(app, status, warning):
assert '<file>index.html</file>' in qhp
assert '<file>_static/basic.css</file>' in qhp
- qhcp = (app.outdir / 'Python.qhcp').text()
+ qhcp = (app.outdir / 'Python.qhcp').read_text()
assert '<title>Python documentation</title>' in qhcp
assert '<homePage>qthelp://org.sphinx.python/doc/index.html</homePage>' in qhcp
assert '<startPage>qthelp://org.sphinx.python/doc/index.html</startPage>' 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 '<namespace>org.sphinx.python</namespace>' in qhp
- qhcp = (app.outdir / 'Python.qhcp').text()
+ qhcp = (app.outdir / 'Python.qhcp').read_text()
assert '<homePage>qthelp://org.sphinx.python/doc/index.html</homePage>' in qhcp
assert '<startPage>qthelp://org.sphinx.python/doc/index.html</startPage>' 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 '<namespace>org.sphinx-doc.sphinx</namespace>' in qhp
- qhcp = (app.outdir / 'Python.qhcp').text()
+ qhcp = (app.outdir / 'Python.qhcp').read_text()
assert '<homePage>qthelp://org.sphinx-doc.sphinx/doc/index.html</homePage>' in qhcp
assert '<startPage>qthelp://org.sphinx-doc.sphinx/doc/index.html</startPage>' 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 '<section title="Python documentation" ref="index.html">' in qhp
- qhcp = (app.outdir / 'Python.qhcp').text()
+ qhcp = (app.outdir / 'Python.qhcp').read_text()
assert '<title>Python documentation</title>' in qhcp
# give a title
@@ -126,9 +126,9 @@ def test_qthelp_title(app, status, warning):
app.config.html_short_title = 'Sphinx <b>"short"</b> title'
app.builder.build_all()
- qhp = (app.outdir / 'Python.qhp').text()
+ qhp = (app.outdir / 'Python.qhp').read_text()
assert ('<section title="Sphinx &lt;b&gt;&#34;full&#34;&lt;/b&gt; title" ref="index.html">'
in qhp)
- qhcp = (app.outdir / 'Python.qhcp').text()
+ qhcp = (app.outdir / 'Python.qhcp').read_text()
assert '<title>Sphinx &lt;b&gt;&#34;short&#34;&lt;/b&gt; title</title>' in qhcp

View File

@ -0,0 +1,32 @@
From e680b4403819e0afbf5bef6a95227899cade6ae9 Mon Sep 17 00:00:00 2001
From: Karolina Surma <ksurma@redhat.com>
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

View File

@ -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 <ksumra@redhat.com> - 1.0.6-1
- Update to 1.0.6
Resolves: rhbz#2230149
* Thu Aug 10 2023 Karolina Surma <ksumra@redhat.com> - 1.0.3-16
- Declare the license as an SPDX expression

View File

@ -1 +1 @@
SHA512 (sphinxcontrib-qthelp-1.0.3.tar.gz) = 29f77e4b3f1a4868c2a34dbd853415e5d813f482cd23b982aeed42d53acba09b896d77ba930c34cce8af043bb7d64a19acff610430e942038d95a410b6e0b5fa
SHA512 (sphinxcontrib_qthelp-1.0.6.tar.gz) = 783cd757bf262ce63f54019a5ccf1d7e6fb59e8fde07e7cfa0610bf0cd49e6e51cada9c35bf11cc5ff351904da6a69569be1d4db58d450a96375aee7bf1f34ff