From c3144fb8c2793793e80ff415f03f47810795e1ce Mon Sep 17 00:00:00 2001 From: Dave Johansen Date: Sat, 5 Aug 2017 07:42:53 -0600 Subject: [PATCH] Fix for node without parent --- python-breathe.spec | 6 +++++- python-breathe_node_without_parent.patch | 27 ++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 python-breathe_node_without_parent.patch diff --git a/python-breathe.spec b/python-breathe.spec index 7ea1d9f..2d83217 100644 --- a/python-breathe.spec +++ b/python-breathe.spec @@ -7,12 +7,13 @@ render the Doxygen xml output. Name: python-%{srcname} Version: 4.6.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Adds support for Doxygen xml output to reStructuredText and Sphinx License: BSD URL: https://github.com/%{owner}/%{srcname} Source0: https://github.com/%{owner}/%{srcname}/archive/%{commit0}.tar.gz#/%{srcname}-%{commit0}.tar.gz +Patch0: python-breathe_node_without_parent.patch BuildArch: noarch @@ -85,6 +86,9 @@ rm documentation/build/html/.buildinfo %license LICENSE %changelog +* Sat Aug 05 2017 Dave Johansen - 4.6.0-3 +- Fix for node without parent + * Thu Jul 27 2017 Fedora Release Engineering - 4.6.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild diff --git a/python-breathe_node_without_parent.patch b/python-breathe_node_without_parent.patch new file mode 100644 index 0000000..40df5d3 --- /dev/null +++ b/python-breathe_node_without_parent.patch @@ -0,0 +1,27 @@ +From 2af44a0d9f40e672dd1989b67d0e90a61deba77e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Juan=20Pedro=20Bol=C3=ADvar=20Puente?= +Date: Sat, 6 May 2017 18:31:12 +0200 +Subject: [PATCH] Fix sometimes nodes without a parent would be generated + +This fixes the bug discussed here, where sometimes doc compilation would +crash when using recent Sphinx: + + https://github.com/sphinx-doc/sphinx/issues/3709 +--- + breathe/renderer/sphinxrenderer.py | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/breathe/renderer/sphinxrenderer.py b/breathe/renderer/sphinxrenderer.py +index 911f5ed..16415dc 100644 +--- a/breathe/renderer/sphinxrenderer.py ++++ b/breathe/renderer/sphinxrenderer.py +@@ -1100,7 +1100,8 @@ def visit_docparamlistitem(self, node): + # + # If there is no description then render then term by itself + if nodelist: +- nodelist[0].children = [term, separator] + nodelist[0].children ++ nodelist[0].insert(0, term) ++ nodelist[0].insert(1, separator) + else: + nodelist = [term] +