diff --git a/python-sphinx-theme-builder.changes b/python-sphinx-theme-builder.changes index cf3bca4..b0ca933 100644 --- a/python-sphinx-theme-builder.changes +++ b/python-sphinx-theme-builder.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Aug 4 05:30:03 UTC 2025 - Steve Kowalik + +- Add patch support-click-8.2.patch: + * Support click 8.2 changes. + ------------------------------------------------------------------- Wed Sep 25 05:20:18 UTC 2024 - ecsos diff --git a/python-sphinx-theme-builder.spec b/python-sphinx-theme-builder.spec index f4b471a..c6f5e08 100644 --- a/python-sphinx-theme-builder.spec +++ b/python-sphinx-theme-builder.spec @@ -1,7 +1,9 @@ # # 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 # remain the property of their copyright owners, unless otherwise agreed @@ -22,9 +24,10 @@ Version: 0.2.0b2 Release: 0 Summary: A tool for authoring Sphinx themes with a simple (opinionated) workflow License: MIT -Group: Development/Languages/Python URL: https://github.com/pradyunsg/sphinx-theme-builder 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 flit-core} 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: fdupes BuildRequires: python-rpm-macros +Requires: python-build Requires: python-click Requires: python-nodeenv Requires: python-packaging Requires: python-pyproject-metadata Requires: python-rich Requires: python-setuptools +Requires: python-sphinx-autobuild Requires: (python-tomli if python-base < 3.11) Requires(post): update-alternatives -Requires(postun):update-alternatives +Requires(postun): update-alternatives BuildArch: noarch %python_subpackages @@ -85,6 +90,6 @@ existing standardised tools. %doc README.md %python_alternative %{_bindir}/stb %{python_sitelib}/sphinx_theme_builder -%{python_sitelib}/sphinx_theme_builder-%{version}*-info +%{python_sitelib}/sphinx_theme_builder-%{version}.dist-info %changelog diff --git a/support-click-8.2.patch b/support-click-8.2.patch new file mode 100644 index 0000000..ce74949 --- /dev/null +++ b/support-click-8.2.patch @@ -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