Accepting request 1108001 from devel:languages:python

- Clean up the SPEC file
- Update to 1.0.6
  * Drop support for Python 3.5, 3.6, 3.7, and 3.8
  * Raise minimum required Sphinx version to 5.0
  * Fix tests for Sphinx 7.1 and below
- Drop upstreamed sphinx5.patch

OBS-URL: https://build.opensuse.org/request/show/1108001
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-sphinxcontrib-qthelp?expand=0&rev=5
This commit is contained in:
Ana Guerrero 2023-09-04 20:52:23 +00:00 committed by Git OBS Bridge
commit 385e32c4d9
5 changed files with 30 additions and 88 deletions

View File

@ -1,3 +1,17 @@
-------------------------------------------------------------------
Tue Aug 29 19:07:11 UTC 2023 - Matej Cepl <mcepl@suse.com>
- Clean up the SPEC file
-------------------------------------------------------------------
Mon Aug 28 11:42:00 UTC 2023 - Markéta Machová <mmachova@suse.com>
- Update to 1.0.6
* Drop support for Python 3.5, 3.6, 3.7, and 3.8
* Raise minimum required Sphinx version to 5.0
* Fix tests for Sphinx 7.1 and below
- Drop upstreamed sphinx5.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Apr 21 12:36:59 UTC 2023 - Dirk Müller <dmueller@suse.com> Fri Apr 21 12:36:59 UTC 2023 - Dirk Müller <dmueller@suse.com>

View File

@ -25,25 +25,24 @@
%define psuffix %{nil} %define psuffix %{nil}
%bcond_with test %bcond_with test
%endif %endif
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%{?sle15_python_module_pythons} %{?sle15_python_module_pythons}
Name: python-sphinxcontrib-qthelp%{psuffix} Name: python-sphinxcontrib-qthelp%{psuffix}
Version: 1.0.3 Version: 1.0.6
Release: 0 Release: 0
Summary: Sphinx extension which outputs QtHelp Summary: Sphinx extension which outputs QtHelp
License: BSD-2-Clause License: BSD-2-Clause
Group: Development/Languages/Python Group: Development/Languages/Python
URL: https://github.com/sphinx-doc/sphinxcontrib-qthelp URL: https://github.com/sphinx-doc/sphinxcontrib-qthelp
Source: https://files.pythonhosted.org/packages/source/s/sphinxcontrib-qthelp/sphinxcontrib-qthelp-%{version}.tar.gz Source: https://files.pythonhosted.org/packages/source/s/sphinxcontrib_qthelp/sphinxcontrib_qthelp-%{version}.tar.gz
# PATCH-FIX-UPSTREAM https://github.com/sphinx-doc/sphinxcontrib-qthelp/pull/14 Fix tests with Sphinx 5.0 BuildRequires: %{python_module flit-core}
Patch0: sphinx5.patch BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module wheel}
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
Requires: python-Sphinx Requires: python-Sphinx >= 5.0
BuildArch: noarch BuildArch: noarch
%if %{with test} %if %{with test}
BuildRequires: %{python_module Sphinx} BuildRequires: %{python_module Sphinx >= 5.0}
BuildRequires: %{python_module pytest} BuildRequires: %{python_module pytest}
BuildRequires: %{python_module sphinxcontrib-qthelp >= %{version}} BuildRequires: %{python_module sphinxcontrib-qthelp >= %{version}}
%endif %endif
@ -53,15 +52,15 @@ BuildRequires: %{python_module sphinxcontrib-qthelp >= %{version}}
sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp document. sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp document.
%prep %prep
%setup -q -n sphinxcontrib-qthelp-%{version} %setup -q -n sphinxcontrib_qthelp-%{version}
%autopatch -p1 %autopatch -p1
%build %build
%python_build %pyproject_wheel
%install %install
%if !%{with test} %if !%{with test}
%python_install %pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib} %python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif %endif
@ -74,7 +73,9 @@ sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp document.
%files %{python_files} %files %{python_files}
%doc README.rst CHANGES %doc README.rst CHANGES
%license LICENSE %license LICENSE
%{python_sitelib}/* %dir %{python_sitelib}/sphinxcontrib
%{python_sitelib}/sphinxcontrib/qthelp
%{python_sitelib}/sphinxcontrib_qthelp-%{version}*-info
%endif %endif
%changelog %changelog

View File

@ -1,73 +0,0 @@
Index: sphinxcontrib-qthelp-1.0.3/tests/test_qthelp.py
===================================================================
--- sphinxcontrib-qthelp-1.0.3.orig/tests/test_qthelp.py
+++ sphinxcontrib-qthelp-1.0.3/tests/test_qthelp.py
@@ -17,7 +17,7 @@ from sphinx.testing.util import etree_pa
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, warni
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, w
# 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, w
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, warni
# 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, warni
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

BIN
sphinxcontrib-qthelp-1.0.3.tar.gz (Stored with Git LFS)

Binary file not shown.

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:62b9d1a186ab7f5ee3356d906f648cacb7a6bdb94d201ee7adf26db55092982d
size 16555