diff --git a/gnome-doc-utils-0.20.10-python3-issues.patch b/gnome-doc-utils-0.20.10-python3-issues.patch new file mode 100644 index 0000000..f79a8a9 --- /dev/null +++ b/gnome-doc-utils-0.20.10-python3-issues.patch @@ -0,0 +1,22 @@ +diff --git a/xml2po/xml2po/__init__.py b/xml2po/xml2po/__init__.py +index 00f4bbd..100f19b 100644 +--- a/xml2po/xml2po/__init__.py ++++ b/xml2po/xml2po/__init__.py +@@ -464,7 +464,7 @@ class XMLDocument(object): + norm_outtxt = self.normalizeString(outtxt, self.app.isSpacePreserveNode(node)) + translation = self.app.getTranslation(norm_outtxt) + else: +- translation = outtxt.decode('utf-8') ++ translation = outtxt.encode('utf-8').decode('utf-8') + + starttag = self.startTagForNode(node) + endtag = self.endTagForNode(node) +@@ -556,7 +556,7 @@ class Main(object): + 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 d0b7c9e..425cafa 100644 --- a/gnome-doc-utils.spec +++ b/gnome-doc-utils.spec @@ -1,12 +1,13 @@ Name: gnome-doc-utils Version: 0.20.10 -Release: 20 +Release: 21 Summary: A collection of documentation utilities for the Gnome project License: GPL-2.0-or-later and LGPL-2.0-or-later and GFDL-1.1-only URL: https://wiki.gnome.org/Projects/GnomeDocUtils Source: https://download.gnome.org/sources/%{name}/0.20/%{name}-%{version}.tar.xz Patch0001: gnome-doc-utils-0.14.0-package.patch Patch0002: gnome-doc-utils-0.20.10-python3.patch +Patch0003: gnome-doc-utils-0.20.10-python3-issues.patch BuildArch: noarch BuildRequires: gcc @@ -65,6 +66,9 @@ sed -i -e '/^Requires:/d' %{buildroot}%{_datadir}/pkgconfig/xml2po.pc %{_mandir}/man1/xml2po.1* %changelog +* Mon Jan 30 2023 xuxiangxiang -0.20.10-21 +- Solve the problem of upgrading to python3 + * Tue Jul 26 2022 yaoxin - 0.20.10-20 - License compliance rectification