forked from pool/python-sphinx-theme-builder
- Add patch support-click-8.2.patch:
* Support click 8.2 changes. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-sphinx-theme-builder?expand=0&rev=8
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Aug 4 05:30:03 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Add patch support-click-8.2.patch:
|
||||||
|
* Support click 8.2 changes.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Sep 25 05:20:18 UTC 2024 - ecsos <ecsos@opensuse.org>
|
Wed Sep 25 05:20:18 UTC 2024 - ecsos <ecsos@opensuse.org>
|
||||||
|
|
||||||
|
@@ -1,7 +1,9 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-sphinx-theme-builder
|
# spec file for package python-sphinx-theme-builder
|
||||||
#
|
#
|
||||||
# Copyright (c) 2024 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC and contributors
|
||||||
|
# Copyright (c) 2025 SUSE LLC and contributors
|
||||||
|
# Copyright (c) 2025 SUSE LLC and contributors
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -22,9 +24,10 @@ Version: 0.2.0b2
|
|||||||
Release: 0
|
Release: 0
|
||||||
Summary: A tool for authoring Sphinx themes with a simple (opinionated) workflow
|
Summary: A tool for authoring Sphinx themes with a simple (opinionated) workflow
|
||||||
License: MIT
|
License: MIT
|
||||||
Group: Development/Languages/Python
|
|
||||||
URL: https://github.com/pradyunsg/sphinx-theme-builder
|
URL: https://github.com/pradyunsg/sphinx-theme-builder
|
||||||
Source: https://github.com/pradyunsg/sphinx-theme-builder/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
Source: https://github.com/pradyunsg/sphinx-theme-builder/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||||
|
# PATCH-FIX-OPENSUSE Support click 8.2 changes
|
||||||
|
Patch0: support-click-8.2.patch
|
||||||
BuildRequires: %{python_module click}
|
BuildRequires: %{python_module click}
|
||||||
BuildRequires: %{python_module flit-core}
|
BuildRequires: %{python_module flit-core}
|
||||||
BuildRequires: %{python_module packaging}
|
BuildRequires: %{python_module packaging}
|
||||||
@@ -38,15 +41,17 @@ BuildRequires: %{python_module tomli >= 1.0.0 if %python-base < 3.11}
|
|||||||
BuildRequires: %{python_module wheel}
|
BuildRequires: %{python_module wheel}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
|
Requires: python-build
|
||||||
Requires: python-click
|
Requires: python-click
|
||||||
Requires: python-nodeenv
|
Requires: python-nodeenv
|
||||||
Requires: python-packaging
|
Requires: python-packaging
|
||||||
Requires: python-pyproject-metadata
|
Requires: python-pyproject-metadata
|
||||||
Requires: python-rich
|
Requires: python-rich
|
||||||
Requires: python-setuptools
|
Requires: python-setuptools
|
||||||
|
Requires: python-sphinx-autobuild
|
||||||
Requires: (python-tomli if python-base < 3.11)
|
Requires: (python-tomli if python-base < 3.11)
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(postun):update-alternatives
|
Requires(postun): update-alternatives
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
@@ -85,6 +90,6 @@ existing standardised tools.
|
|||||||
%doc README.md
|
%doc README.md
|
||||||
%python_alternative %{_bindir}/stb
|
%python_alternative %{_bindir}/stb
|
||||||
%{python_sitelib}/sphinx_theme_builder
|
%{python_sitelib}/sphinx_theme_builder
|
||||||
%{python_sitelib}/sphinx_theme_builder-%{version}*-info
|
%{python_sitelib}/sphinx_theme_builder-%{version}.dist-info
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
65
support-click-8.2.patch
Normal file
65
support-click-8.2.patch
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
Index: sphinx-theme-builder-0.2.0b2/tests/conftest.py
|
||||||
|
===================================================================
|
||||||
|
--- sphinx-theme-builder-0.2.0b2.orig/tests/conftest.py
|
||||||
|
+++ sphinx-theme-builder-0.2.0b2/tests/conftest.py
|
||||||
|
@@ -1,5 +1,6 @@
|
||||||
|
import contextlib
|
||||||
|
import errno
|
||||||
|
+import inspect
|
||||||
|
import os
|
||||||
|
import shutil
|
||||||
|
import stat
|
||||||
|
@@ -17,7 +18,10 @@ from click.testing import CliRunner
|
||||||
|
# Fixtures
|
||||||
|
@pytest.fixture
|
||||||
|
def runner() -> CliRunner:
|
||||||
|
- return CliRunner(mix_stderr=False)
|
||||||
|
+ if inspect.signature(click.testing.CliRunner).parameters.get("mix_stderr"):
|
||||||
|
+ return click.testing.CliRunner(mix_stderr=False)
|
||||||
|
+ else:
|
||||||
|
+ return click.testing.CliRunner()
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture
|
||||||
|
Index: sphinx-theme-builder-0.2.0b2/tests/workflow/test_cli.py
|
||||||
|
===================================================================
|
||||||
|
--- sphinx-theme-builder-0.2.0b2.orig/tests/workflow/test_cli.py
|
||||||
|
+++ sphinx-theme-builder-0.2.0b2/tests/workflow/test_cli.py
|
||||||
|
@@ -8,8 +8,8 @@ class TestCLIRoot:
|
||||||
|
def test_no_arguments(self, runner: CliRunner, cli: Group) -> None:
|
||||||
|
process = runner.invoke(cli, [])
|
||||||
|
|
||||||
|
- assert process.exit_code == 0
|
||||||
|
- assert process.stdout
|
||||||
|
+ assert process.exit_code in (0, 2)
|
||||||
|
+ assert process.stdout == ''
|
||||||
|
|
||||||
|
def test_help(self, runner: CliRunner, cli: Group) -> None:
|
||||||
|
process = runner.invoke(cli, ["--help"])
|
||||||
|
@@ -23,4 +23,4 @@ class TestCLIRoot:
|
||||||
|
process_one = runner.invoke(cli, [])
|
||||||
|
process_two = runner.invoke(cli, ["--help"])
|
||||||
|
|
||||||
|
- assert process_one.stdout == process_two.stdout
|
||||||
|
+ assert process_two.stdout in process_one.stderr
|
||||||
|
Index: sphinx-theme-builder-0.2.0b2/tests/workflow/test_new.py
|
||||||
|
===================================================================
|
||||||
|
--- sphinx-theme-builder-0.2.0b2.orig/tests/workflow/test_new.py
|
||||||
|
+++ sphinx-theme-builder-0.2.0b2/tests/workflow/test_new.py
|
||||||
|
@@ -8,8 +8,8 @@ class TestCLINew:
|
||||||
|
def test_no_arguments(self, runner: CliRunner, cli: Group) -> None:
|
||||||
|
process = runner.invoke(cli, [])
|
||||||
|
|
||||||
|
- assert process.exit_code == 0
|
||||||
|
- assert process.stdout
|
||||||
|
+ assert process.exit_code in (0, 2)
|
||||||
|
+ assert process.stdout == ''
|
||||||
|
|
||||||
|
def test_help(self, runner: CliRunner, cli: Group) -> None:
|
||||||
|
process = runner.invoke(cli, ["--help"])
|
||||||
|
@@ -23,4 +23,4 @@ class TestCLINew:
|
||||||
|
process_one = runner.invoke(cli, [])
|
||||||
|
process_two = runner.invoke(cli, ["--help"])
|
||||||
|
|
||||||
|
- assert process_one.stdout == process_two.stdout
|
||||||
|
+ assert process_two.stdout in process_one.stderr
|
Reference in New Issue
Block a user