From 33cf3dbd1a2a8d1a7b5834e6ea8861442647546b Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Fri, 15 Oct 2021 01:12:38 +0900 Subject: [PATCH] Fix on xml2po -o -p option for python 3 --- gnome-doc-utils-0.20.10-python3.patch | 20 ++++++++++++++++++++ gnome-doc-utils.spec | 5 ++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/gnome-doc-utils-0.20.10-python3.patch b/gnome-doc-utils-0.20.10-python3.patch index 2c48369..bf9614f 100644 --- a/gnome-doc-utils-0.20.10-python3.patch +++ b/gnome-doc-utils-0.20.10-python3.patch @@ -518,3 +518,23 @@ diff -U3 -r gnome-doc-utils-0.20.10.orig/xml2po/xml2po/xml2po.py.in gnome-doc-ut # -*- encoding: utf-8 -*- # Copyright (c) 2004, 2005, 2006 Danilo Ĺ egan . # Copyright (c) 2009 Claude Paroz . +--- gnome-doc-utils-0.20.10.old/xml2po/xml2po/__init__.py 2021-10-14 16:54:33.332661817 +0900 ++++ gnome-doc-utils-0.20.10/xml2po/xml2po/__init__.py 2021-10-14 17:06:31.006607987 +0900 +@@ -504,7 +504,7 @@ + # !!! This is not very nice thing to do, but I don't know if + # raising an exception is any better + return False +- return tmpstr.find('EXTERNAL_GENERAL_PARSED_ENTITY') != -1 ++ return tmpstr.find(b'EXTERNAL_GENERAL_PARSED_ENTITY') != -1 + + def doSerialize(self, node): + """Serializes a node and its children, emitting PO messages along the way. +@@ -556,7 +556,7 @@ + elif output == '-': + self.out = sys.stdout + else: +- self.out = file(output, 'w') ++ self.out = open(output, 'w') + + def load_mode(self, modename): + try: diff --git a/gnome-doc-utils.spec b/gnome-doc-utils.spec index 062567a..916468a 100644 --- a/gnome-doc-utils.spec +++ b/gnome-doc-utils.spec @@ -1,6 +1,6 @@ Name: gnome-doc-utils Version: 0.20.10 -Release: 26%{?dist} +Release: 27%{?dist} Summary: Documentation utilities for GNOME License: GPLv2+ and LGPLv2+ and GFDL @@ -90,6 +90,9 @@ sed -i -e '/^Requires:/d' %{buildroot}%{_datadir}/pkgconfig/xml2po.pc %{_datadir}/xml/mallard %changelog +* Thu Oct 14 2021 Mamoru TASAKA - 0.20.10-27 +- Fix on xml2po -o -p option for python 3 + * Thu Jul 22 2021 Fedora Release Engineering - 0.20.10-26 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild