From 5edc82dfdff764da4d61534bbaa8c2e963ec577d Mon Sep 17 00:00:00 2001 From: Dave Johansen Date: Fri, 13 May 2016 21:49:02 -0700 Subject: [PATCH] Fix for Python 3 --- breathe_python3.patch | 59 +++++++++++++++++++++++++++++++++++++++++++ python-breathe.spec | 8 ++++-- 2 files changed, 65 insertions(+), 2 deletions(-) create mode 100644 breathe_python3.patch diff --git a/breathe_python3.patch b/breathe_python3.patch new file mode 100644 index 0000000..7b7d66a --- /dev/null +++ b/breathe_python3.patch @@ -0,0 +1,59 @@ +From a0587f035202e4f6b4eb02ad5a2f33ce93bd0f25 Mon Sep 17 00:00:00 2001 +From: Victor Zverovich +Date: Fri, 29 Apr 2016 08:13:44 -0700 +Subject: [PATCH] Fix compatibility with Python 3 + +--- + breathe/renderer/filter.py | 2 +- + breathe/renderer/mask.py | 4 +++- + breathe/renderer/target.py | 2 +- + 3 files changed, 5 insertions(+), 3 deletions(-) + +diff --git a/breathe/renderer/filter.py b/breathe/renderer/filter.py +index d04a94f..e26a2e8 100644 +--- a/breathe/renderer/filter.py ++++ b/breathe/renderer/filter.py +@@ -673,7 +673,7 @@ def create_innerclass_filter(self, options, outerclass=''): + 'private-members': 'private', + } + +- for option, scope in all_options.iteritems(): ++ for option, scope in all_options.items(): + if option in options: + allowed.add(scope) + +diff --git a/breathe/renderer/mask.py b/breathe/renderer/mask.py +index 254fa10..ed6a17c 100644 +--- a/breathe/renderer/mask.py ++++ b/breathe/renderer/mask.py +@@ -18,6 +18,8 @@ + + """ + ++import six ++ + class NoParameterNamesMask(object): + + def __init__(self, data_object): +@@ -43,7 +45,7 @@ def mask(self, data_object): + + # Horrible hack to silence errors on filtering unicode objects + # until we fix the parsing +- if type(data_object) == unicode: ++ if isinstance(data_object, six.text_type): + node_type = "unicode" + else: + raise e +diff --git a/breathe/renderer/target.py b/breathe/renderer/target.py +index 754f260..1709839 100644 +--- a/breathe/renderer/target.py ++++ b/breathe/renderer/target.py +@@ -33,7 +33,7 @@ def __init__(self, node_factory): + + def create_target_handler(self, options, project_info, document): + +- if options.has_key("no-link"): ++ if "no-link" in options: + return NullTargetHandler() + + return TargetHandler(project_info, self.node_factory, document) diff --git a/python-breathe.spec b/python-breathe.spec index 3f3703b..854c351 100644 --- a/python-breathe.spec +++ b/python-breathe.spec @@ -7,12 +7,13 @@ render the Doxygen xml output. Name: python-%{srcname} Version: 4.2.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: breathe_python3.patch BuildArch: noarch @@ -57,7 +58,7 @@ License: BSD and zlib This package contains documentation for developer documentation for %{srcname}. %prep -%autosetup -n %{srcname}-%{commit0} +%autosetup -n %{srcname}-%{commit0} -p1 %build %py2_build @@ -85,6 +86,9 @@ rm documentation/build/html/.buildinfo %license LICENSE %changelog +* Fri May 13 2016 Dave Johansen - 4.2.0-3 +- Fix for Python 3 + * Sun Apr 10 2016 Orion Poplawski - 4.2.0-2 - Fix BR/Rs