From 0e41328d9036026b9052b0b1f061cd54a1ea9947996abfdbadea444bdd07e47f Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Tue, 29 Aug 2023 02:52:18 +0000 Subject: [PATCH] - 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 --- Fix-tests-for-Sphinx-5.3.0.patch | 43 -------------------------------- breathe-4.34.0.tar.gz | 3 --- breathe-4.35.0.tar.gz | 3 +++ python-breathe.changes | 14 +++++++++++ python-breathe.spec | 14 +++++------ support-sphinx-7.2.patch | 26 +++++++++++++++++++ 6 files changed, 50 insertions(+), 53 deletions(-) delete mode 100644 Fix-tests-for-Sphinx-5.3.0.patch delete mode 100644 breathe-4.34.0.tar.gz create mode 100644 breathe-4.35.0.tar.gz create mode 100644 support-sphinx-7.2.patch diff --git a/Fix-tests-for-Sphinx-5.3.0.patch b/Fix-tests-for-Sphinx-5.3.0.patch deleted file mode 100644 index aee427f..0000000 --- a/Fix-tests-for-Sphinx-5.3.0.patch +++ /dev/null @@ -1,43 +0,0 @@ -From de3504c81c7cefc87c8229743f93232ca00a685d Mon Sep 17 00:00:00 2001 -From: Daniel Garcia Moreno -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 - diff --git a/breathe-4.34.0.tar.gz b/breathe-4.34.0.tar.gz deleted file mode 100644 index 6a35ae4..0000000 --- a/breathe-4.34.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b22e70eb4000492508d687d71f258c8f9678398e277bcee0daf34cd438a46e25 -size 206989 diff --git a/breathe-4.35.0.tar.gz b/breathe-4.35.0.tar.gz new file mode 100644 index 0000000..c3c562d --- /dev/null +++ b/breathe-4.35.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:55b54723752fc04b892a0f868782b1df65e69db6ca94fb32cf04be495bfd7841 +size 212932 diff --git a/python-breathe.changes b/python-breathe.changes index 7b288f1..427a089 100644 --- a/python-breathe.changes +++ b/python-breathe.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Tue Aug 29 02:48:53 UTC 2023 - Steve Kowalik + +- 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 diff --git a/python-breathe.spec b/python-breathe.spec index c1fa7f6..b8d4775 100644 --- a/python-breathe.spec +++ b/python-breathe.spec @@ -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 diff --git a/support-sphinx-7.2.patch b/support-sphinx-7.2.patch new file mode 100644 index 0000000..8c8e6a8 --- /dev/null +++ b/support-sphinx-7.2.patch @@ -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] = {}