14
0

7 Commits

Author SHA256 Message Date
fa166c3714 Accepting request 1318535 from devel:languages:python
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/1318535
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-sphinx-theme-builder?expand=0&rev=5
2025-11-19 14:00:20 +00:00
5a2e5234e6 - Add patch support-python314.patch:
* Support Python 3.14 ast changes.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-sphinx-theme-builder?expand=0&rev=11
2025-11-12 01:52:38 +00:00
a6ed69d0e8 Accepting request 1297360 from devel:languages:python
- Add patch support-click-8.2.patch:
  * Support click 8.2 changes.

OBS-URL: https://build.opensuse.org/request/show/1297360
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-sphinx-theme-builder?expand=0&rev=4
2025-08-04 13:25:07 +00:00
279bcab79b sigh
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-sphinx-theme-builder?expand=0&rev=9
2025-08-04 05:31:07 +00:00
50807cf3db - 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
2025-08-04 05:30:40 +00:00
eddfc94332 Accepting request 1203335 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1203335
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-sphinx-theme-builder?expand=0&rev=3
2024-09-25 19:54:30 +00:00
ccf063e6b6 - Add %{?sle15_python_module_pythons}
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-sphinx-theme-builder?expand=0&rev=6
2024-09-25 08:05:07 +00:00
4 changed files with 118 additions and 4 deletions

View File

@@ -1,3 +1,20 @@
-------------------------------------------------------------------
Wed Nov 12 01:52:03 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
- Add patch support-python314.patch:
* Support Python 3.14 ast changes.
-------------------------------------------------------------------
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>
- Add %{?sle15_python_module_pythons}
-------------------------------------------------------------------
Sun Jan 14 10:39:25 UTC 2024 - Dirk Müller <dmueller@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-sphinx-theme-builder
#
# Copyright (c) 2024 SUSE LLC
# 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
@@ -16,14 +16,18 @@
#
%{?sle15_python_module_pythons}
Name: python-sphinx-theme-builder
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
# PATCH-FIX-UPSTREAM gh#pradyunsg/sphinx-theme-builder#51
Patch1: support-python314.patch
BuildRequires: %{python_module click}
BuildRequires: %{python_module flit-core}
BuildRequires: %{python_module packaging}
@@ -37,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
@@ -84,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

65
support-click-8.2.patch Normal file
View 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

26
support-python314.patch Normal file
View File

@@ -0,0 +1,26 @@
From bef651880a125419e5b53eb0a1b9c236d01f5228 Mon Sep 17 00:00:00 2001
From: Jerry James <loganjerry@gmail.com>
Date: Mon, 27 Jan 2025 17:04:02 -0700
Subject: [PATCH] Avoid ast.Str for python 3.14 compatibility
---
src/sphinx_theme_builder/_internal/project.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/sphinx_theme_builder/_internal/project.py b/src/sphinx_theme_builder/_internal/project.py
index b90e677..98eaf26 100644
--- a/src/sphinx_theme_builder/_internal/project.py
+++ b/src/sphinx_theme_builder/_internal/project.py
@@ -40,9 +40,10 @@ def get_version_using_ast(contents: bytes) -> Optional[str]:
and len(child.targets) == 1
and isinstance(child.targets[0], ast.Name)
and child.targets[0].id == "__version__"
- and isinstance(child.value, ast.Str)
+ and isinstance(child.value, ast.Constant)
+ and isinstance(child.value.value, str)
):
- version = child.value.s
+ version = child.value.value
break
return version