15
0

Accepting request 1253338 from devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/1253338
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-breathe?expand=0&rev=26
This commit is contained in:
2025-03-16 17:58:26 +00:00
committed by Git OBS Bridge
6 changed files with 21 additions and 114 deletions

Binary file not shown.

BIN
breathe-4.36.0.tar.gz LFS Normal file

Binary file not shown.

View File

@@ -1,3 +1,17 @@
-------------------------------------------------------------------
Fri Mar 14 12:59:04 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Update to 4.36:
* Update test_renderer so that tests pass with Sphinx 7.2.
* Fix PosixPath issue with Sphinx 7.2.
* Avoid RemovedInSphinx80Warning in path-manipulation code.
* Require Sphinx 7.2 or later, Python 3.9 or later
and Doxygen 1.9.2 or later.
* Begin to use pathlib.
* Insert signature name for use with Sphinx Table of Contents.
* Fix error in template specialization with qualified arguments.
- Drop merged support-sphinx-7.2.patch and support-sphinx-7.4.patch.
-------------------------------------------------------------------
Sat Jan 18 10:37:41 UTC 2025 - Matej Cepl <mcepl@cepl.eu>

View File

@@ -18,26 +18,21 @@
%{?sle15_python_module_pythons}
Name: python-breathe
Version: 4.35.0
Version: 4.36.0
Release: 0
Summary: Sphinx Doxygen renderer
License: BSD-3-Clause
URL: https://github.com/michaeljones/breathe
Source: https://github.com/michaeljones/breathe/archive/v%{version}.tar.gz#/breathe-%{version}.tar.gz
Patch0: support-sphinx-7.2.patch
# PATCH-FIX-UPSTREAM support-sphinx-7.4.patch gh#breathe-doc/breathe!1007 mcepl@suse.com
# fix the test suite
Patch1: support-sphinx-7.4.patch
BuildRequires: %{python_module Sphinx >= 4.0}
BuildRequires: %{python_module docutils >= 0.12}
BuildRequires: %{python_module Sphinx >= 7.2}
BuildRequires: %{python_module flit-core}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-Sphinx >= 4.0
Requires: python-docutils >= 0.12
Requires: python-Sphinx >= 7.2
Requires(post): update-alternatives
Requires(postun): update-alternatives
Provides: python-sphinxcontrib-breathe = %{version}

View File

@@ -1,30 +0,0 @@
Index: breathe-4.35.0/tests/test_renderer.py
===================================================================
--- breathe-4.35.0.orig/tests/test_renderer.py
+++ breathe-4.35.0/tests/test_renderer.py
@@ -35,7 +35,11 @@ def app(test_params, app_params, make_ap
"""
args, kwargs = app_params
assert "srcdir" in kwargs
- kwargs["srcdir"].makedirs(exist_ok=True)
+ try:
+ kwargs["srcdir"].mkdir(parents=True, exist_ok=True)
+ except AttributeError:
+ # old version of Sphinx
+ kwargs["srcdir"].makedirs(exist_ok=True)
(kwargs["srcdir"] / "conf.py").write_text("")
app_ = make_app(*args, **kwargs)
yield app_
Index: breathe-4.35.0/breathe/project.py
===================================================================
--- breathe-4.35.0.orig/breathe/project.py
+++ breathe-4.35.0/breathe/project.py
@@ -113,7 +113,7 @@ class ProjectInfoFactory:
# Assume general build directory is the doctree directory without the last component.
# We strip off any trailing slashes so that dirname correctly drops the last part.
# This can be overridden with the breathe_build_directory config variable
- self._default_build_dir = os.path.dirname(app.doctreedir.rstrip(os.sep))
+ self._default_build_dir = app.doctreedir.parent
self.project_count = 0
self.project_info_store: Dict[str, ProjectInfo] = {}
self.project_info_for_auto_store: Dict[str, AutoProjectInfo] = {}

View File

@@ -1,72 +0,0 @@
From 44c113677bbb5c5292f6e69fb9f614334eedcb3e Mon Sep 17 00:00:00 2001
From: "Eric T. Johnson" <yut23@users.noreply.github.com>
Date: Thu, 16 Jan 2025 11:49:54 -0500
Subject: [PATCH] Fix tests for Sphinx 7.4 (#1007)
---
breathe/file_state_cache.py | 2 ++
breathe/process.py | 2 ++
tests/test_renderer.py | 9 +++++----
3 files changed, 9 insertions(+), 4 deletions(-)
--- a/breathe/file_state_cache.py
+++ b/breathe/file_state_cache.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from sphinx.application import Sphinx
from sphinx.environment import BuildEnvironment
--- a/breathe/process.py
+++ b/breathe/process.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from breathe.project import AutoProjectInfo, ProjectInfoFactory
import os
--- a/tests/test_renderer.py
+++ b/tests/test_renderer.py
@@ -40,7 +40,7 @@ def app(test_params, app_params, make_ap
except AttributeError:
# old version of Sphinx
kwargs["srcdir"].makedirs(exist_ok=True)
- (kwargs["srcdir"] / "conf.py").write_text("")
+ (kwargs["srcdir"] / "conf.py").write_text("", encoding="ascii")
app_ = make_app(*args, **kwargs)
yield app_
@@ -129,7 +129,7 @@ class MockState:
env.temp_data["docname"] = "mock-doc"
env.temp_data["breathe_project_info_factory"] = ProjectInfoFactory(app)
env.temp_data["breathe_parser_factory"] = DoxygenParserFactory(app)
- settings = frontend.OptionParser(components=(parsers.rst.Parser,)).get_default_values()
+ settings = frontend.get_default_settings(parsers.rst.Parser)
settings.env = env
self.document = utils.new_document("", settings)
@@ -172,13 +172,14 @@ class MockMaskFactory:
class MockContext:
def __init__(self, app, node_stack, domain=None, options=[]):
+ from docutils.statemachine import StringList
self.domain = domain
self.node_stack = node_stack
self.directive_args = [
None, # name
None, # arguments
options, # options
- None, # content
+ StringList([], items=[]), # content
None, # lineno
None, # content_offset
None, # block_text
@@ -564,7 +565,7 @@ def get_matches(datafile):
from xml.dom import minidom
argsstrings = []
- with open(os.path.join(os.path.dirname(__file__), "data", datafile)) as fid:
+ with open(os.path.join(os.path.dirname(__file__), "data", datafile), encoding="utf-8") as fid:
xml = fid.read()
doc = minidom.parseString(xml)