Accepting request 536558 from GNOME:Next

- Switch to python3 version:
  + Add python3-base BuildRequires: unlike python2, py3 is not
    implicit in the buildroot yet.
  + Export PYTHON=python3 before configure.
  + Replace libxml2-python (Build)?Requires with
    python3-libxml2-python.

- Update to version 2.0.4:
  + Fixed a massive performance issue.
- Add itstool-2.0.4-no-freedoc.patch: Do not free xmlDocs, avoid
  crashes (gh#itstool/itstool#17).

- Update to version 2.0.3:
  + Added:
    - Python 3 support. Keeping Python 2 support for now.
    - --path option for extra paths for ITS files.
  + Fixed:
    - --keep-entities mode after some libxml2 changes.
    - UTF-8 handling for translated attributes.
  + Don't error out (except under -s) for mismatched placeholders.

OBS-URL: https://build.opensuse.org/request/show/536558
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/itstool?expand=0&rev=24
This commit is contained in:
Dominique Leuenberger 2017-10-30 10:35:03 +00:00 committed by Git OBS Bridge
parent a596e3e278
commit ab804fb655
5 changed files with 66 additions and 7 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bf909fb59b11a646681a8534d5700fec99be83bb2c57badf8c1844512227033a
size 96748

View File

@ -0,0 +1,22 @@
Index: itstool-2.0.4/itstool.in
===================================================================
--- itstool-2.0.4.orig/itstool.in
+++ itstool-2.0.4/itstool.in
@@ -553,9 +553,6 @@ class Document (object):
self._itst_credits = None
self._its_externals = {}
- def __del__ (self):
- self._doc.freeDoc()
-
def _check_errors(self):
if self._xml_err:
raise libxml2.parserError(self._xml_err)
@@ -1088,7 +1085,6 @@ class Document (object):
retnode = node.copyNode(2)
for child in xml_child_iter(trnode):
retnode.addChild(child.copyNode(1))
- ctxt.doc().freeDoc()
return retnode
def generate_messages(self, comments=True):

3
itstool-2.0.4.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:97c208b51da33e0b553e830b92655f8deb9132f8fbe9a646771f95c33226eb60
size 102107

View File

@ -1,3 +1,33 @@
-------------------------------------------------------------------
Tue Oct 24 14:17:44 UTC 2017 - dimstar@opensuse.org
- Switch to python3 version:
+ Add python3-base BuildRequires: unlike python2, py3 is not
implicit in the buildroot yet.
+ Export PYTHON=python3 before configure.
+ Replace libxml2-python (Build)?Requires with
python3-libxml2-python.
-------------------------------------------------------------------
Tue Oct 24 13:56:35 UTC 2017 - dimstar@opensuse.org
- Update to version 2.0.4:
+ Fixed a massive performance issue.
- Add itstool-2.0.4-no-freedoc.patch: Do not free xmlDocs, avoid
crashes (gh#itstool/itstool#17).
-------------------------------------------------------------------
Thu Oct 5 23:06:10 UTC 2017 - luc14n0@linuxmail.org
- Update to version 2.0.3:
+ Added:
- Python 3 support. Keeping Python 2 support for now.
- --path option for extra paths for ITS files.
+ Fixed:
- --keep-entities mode after some libxml2 changes.
- UTF-8 handling for translated attributes.
+ Don't error out (except under -s) for mismatched placeholders.
-------------------------------------------------------------------
Tue Dec 24 19:28:51 UTC 2013 - dimstar@opensuse.org

View File

@ -1,7 +1,7 @@
#
# spec file for package itstool
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -17,15 +17,18 @@
Name: itstool
Version: 2.0.2
Version: 2.0.4
Release: 0
Summary: Tool to translate XML documents using PO files
License: GPL-3.0+
Group: Development/Tools/Other
Url: http://itstool.org
Source: http://files.itstool.org/itstool/%{name}-%{version}.tar.bz2
BuildRequires: libxml2-python
Requires: libxml2-python
# PATCH-FIX-UPSTREAM itstool-2.0.4-no-freedoc.patch boo#1064286 gh#itstool/itstool#17 jmatejek@suse.com -- Do not double free
Patch0: itstool-2.0.4-no-freedoc.patch
BuildRequires: python3-base
BuildRequires: python3-libxml2-python
Requires: python3-libxml2-python
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
@ -37,8 +40,12 @@ Internationalization Tag Set (ITS).
%prep
%setup -q
# remove itstool - we patch itstool.in and want to ensure we get the right version
rm itstool
%patch0 -p1
%build
export PYTHON=%{_bindir}/python3
%configure
make %{?_smp_mflags}