- Upgrade to 4.35:

* Pull lone literal blocks in paragraphs up to produce correct doctree.
  * Fix tests for changes in Sphinx 5.3.
  * Bump Python requirement to 3.7.
  * Support Sphinx 6.
  * Support sort option to sort sections by name.
- Drop patch Fix-tests-for-Sphinx-5.3.0.patch, included upstream.
- Add patch support-sphinx-7.2.patch:
  * Support Sphinx 7.2 changes.
- Switch to pyproject macros.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-breathe?expand=0&rev=50
This commit is contained in:
Steve Kowalik 2023-08-29 02:52:18 +00:00 committed by Git OBS Bridge
parent ccc2100de9
commit 0e41328d90
6 changed files with 50 additions and 53 deletions

View File

@ -1,43 +0,0 @@
From de3504c81c7cefc87c8229743f93232ca00a685d Mon Sep 17 00:00:00 2001
From: Daniel Garcia Moreno <daniel.garcia@suse.com>
Date: Fri, 28 Oct 2022 08:45:33 +0200
Subject: [PATCH] Fix tests for Sphinx 5.3.0
Fix https://github.com/breathe-doc/breathe/issues/863
---
tests/test_renderer.py | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/tests/test_renderer.py b/tests/test_renderer.py
index 1688981..a858c65 100644
--- a/tests/test_renderer.py
+++ b/tests/test_renderer.py
@@ -109,6 +109,12 @@ class WrappedCompoundDef(compounddefTypeSub, WrappedDoxygenNode):
WrappedDoxygenNode.__init__(self, compounddefTypeSub, **kwargs)
+class MockMemo:
+ def __init__(self):
+ self.title_styles = ""
+ self.section_level = ""
+
+
class MockState:
def __init__(self, app):
from breathe.project import ProjectInfoFactory
@@ -123,7 +129,11 @@ class MockState:
settings.env = env
self.document = utils.new_document("", settings)
- def nested_parse(self, content, content_offset, contentnode):
+ # In sphinx 5.3.0 the method state.nested_parse is not called directly
+ # so this memo object should exists here
+ self.memo = MockMemo()
+
+ def nested_parse(self, content, content_offset, contentnode, match_titles=1):
pass
--
2.38.0

View File

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

BIN
breathe-4.35.0.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -1,3 +1,17 @@
-------------------------------------------------------------------
Tue Aug 29 02:48:53 UTC 2023 - Steve Kowalik <steven.kowalik@suse.com>
- Upgrade to 4.35:
* Pull lone literal blocks in paragraphs up to produce correct doctree.
* Fix tests for changes in Sphinx 5.3.
* Bump Python requirement to 3.7.
* Support Sphinx 6.
* Support sort option to sort sections by name.
- Drop patch Fix-tests-for-Sphinx-5.3.0.patch, included upstream.
- Add patch support-sphinx-7.2.patch:
* Support Sphinx 7.2 changes.
- Switch to pyproject macros.
-------------------------------------------------------------------
Thu Jul 6 10:23:41 UTC 2023 - ecsos <ecsos@opensuse.org>

View File

@ -16,22 +16,22 @@
#
%define skip_python2 1
%define modname breathe
%{?sle15_python_module_pythons}
Name: python-breathe
Version: 4.34.0
Version: 4.35.0
Release: 0
Summary: Sphinx Doxygen renderer
License: BSD-3-Clause
URL: https://github.com/michaeljones/breathe
Source: https://github.com/michaeljones/%{modname}/archive/v%{version}.tar.gz#/%{modname}-%{version}.tar.gz
# PATCH-FIX-UPSTREAM Fix-tests-for-Sphinx-5.3.0.patch gh#breathe-doc/breathe#865
Patch0: Fix-tests-for-Sphinx-5.3.0.patch
Patch0: support-sphinx-7.2.patch
BuildRequires: %{python_module Sphinx >= 4.0}
BuildRequires: %{python_module docutils >= 0.12}
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
@ -51,13 +51,13 @@ able to read and render Doxygen xml output.
%autosetup -p1 -n breathe-%{version}
%build
%python_build
%pyproject_wheel
%check
%pytest
%install
%python_install
%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/breathe-apidoc
%python_expand %fdupes %{buildroot}%{$python_sitelib}
@ -72,6 +72,6 @@ able to read and render Doxygen xml output.
%license LICENSE
%python_alternative %{_bindir}/breathe-apidoc
%{python_sitelib}/breathe
%{python_sitelib}/breathe-%{version}-py*.egg-info
%{python_sitelib}/breathe-%{version}.dist-info
%changelog

26
support-sphinx-7.2.patch Normal file
View File

@ -0,0 +1,26 @@
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,7 @@ def app(test_params, app_params, make_ap
"""
args, kwargs = app_params
assert "srcdir" in kwargs
- kwargs["srcdir"].makedirs(exist_ok=True)
+ kwargs["srcdir"].mkdir(parents=True, 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] = {}