Hello community,

here is the log from the commit of package inkscape for openSUSE:Factory 
checked in at 2019-08-15 15:43:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/inkscape (Old)
 and      /work/SRC/openSUSE:Factory/.inkscape.new.9556 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "inkscape"

Thu Aug 15 15:43:18 2019 rev:102 rq:722011 version:0.92.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/inkscape/inkscape.changes        2019-06-03 
18:46:08.236624404 +0200
+++ /work/SRC/openSUSE:Factory/.inkscape.new.9556/inkscape.changes      
2019-08-15 15:43:22.451195811 +0200
@@ -1,0 +2,14 @@
+Tue Jul 30 16:18:54 UTC 2019 - Stefan BrĂ¼ns <[email protected]>
+
+- Change Python dependencies to Python 3 as Python 2 will be EOL in 2020.
+- Use Python 3 to extract translations, add
+  0001-Run-python-script-for-translations-with-Python-3.patch
+- Make extensions compatible with Python 3
+  (https://bugs.launchpad.net/inkscape/+bug/1735363)
+  * Add mr_568_extensions_python3_compatibility.patch
+  * Add f5e0ea893f34_extensions_python3_compatibility.patch
+  * Add mr_582_extensions_python3_compatibility.patch
+- Some spec cleanups (buildroot, defattr)
+- Require extensions-extra for gimp extension
+
+-------------------------------------------------------------------

New:
----
  0001-Run-python-script-for-translations-with-Python-3.patch
  f5e0ea893f34_extensions_python3_compatibility.patch
  mr_568_extensions_python3_compatibility.patch
  mr_582_extensions_python3_compatibility.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ inkscape.spec ++++++
--- /var/tmp/diff_new_pack.Zz2L12/_old  2019-08-15 15:43:26.563194860 +0200
+++ /var/tmp/diff_new_pack.Zz2L12/_new  2019-08-15 15:43:26.563194860 +0200
@@ -37,6 +37,14 @@
 Patch2:         fix_install_targets.patch
 # PATCH-FIX-UPSTREAM inkscape-fix-for-poppler-0.76.patch -- Fix build with 
poppler 0.76
 Patch3:         inkscape-fix-for-poppler-0.76.patch
+# PATCH-FIX-OPENSUSE -- run i18n string extraction with python3
+Patch4:         0001-Run-python-script-for-translations-with-Python-3.patch
+# PATCH-FIX-UPSTREAM 
https://gitlab.com/inkscape/inkscape/merge_requests/568.patch -- fixed in 0.92.5
+Patch5:         mr_568_extensions_python3_compatibility.patch
+# PATCH-FIX-UPSTREAM 
https://gitlab.com/inkscape/inkscape/commit/f5e0ea893f34c91f25d4781b37ee6eff15a7e213
+Patch6:         f5e0ea893f34_extensions_python3_compatibility.patch
+# PATCH-FIX-UPSTREAM 
https://gitlab.com/inkscape/inkscape/merge_requests/582.patch -- fixed in 0.92.5
+Patch7:         mr_582_extensions_python3_compatibility.patch
 
 BuildRequires:  gtkspell-devel
 %if 0%{?suse_version} > 1325
@@ -60,9 +68,9 @@
 BuildRequires:  perl
 BuildRequires:  popt-devel
 BuildRequires:  potrace-devel
-BuildRequires:  python-devel
-BuildRequires:  python-gtk-devel
-BuildRequires:  python2-xml
+BuildRequires:  python3-devel
+BuildRequires:  python3-gobject-devel
+BuildRequires:  python3-xml
 BuildRequires:  update-desktop-files
 BuildRequires:  pkgconfig(dbus-glib-1)
 BuildRequires:  pkgconfig(libcdr-0.1)
@@ -72,11 +80,10 @@
 BuildRequires:  pkgconfig(librevenge-0.0)
 BuildRequires:  pkgconfig(libvisio-0.1)
 BuildRequires:  pkgconfig(libwpg-0.3)
-Requires:       python-gtk
+Requires:       python3-gobject
 Recommends:     %{name}-lang
-Recommends:     python-lxml
-Recommends:     python-scour
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
+Recommends:     python3-lxml
+Recommends:     python3-scour
 
 %description
 Inkscape is a vector graphics editor.
@@ -87,15 +94,15 @@
 Requires:       %{name} = %{version}
 # ps2pdf-ext.py is a wrapper around ps2pdf, which lives in ghostscript package.
 Requires:       ghostscript
-Requires:       python-lxml
-Requires:       python-xml
+Requires:       python3-lxml
+Requires:       python3-xml
 # for cdr and wmf modules
 Recommends:     yudit
 # dxf_output.inx, eqtexsvg.inx:
 Requires:       pstoedit
 Enhances:       %{name}
-# python-xml is already likely installed, so the big dependency is 
python-lxml. Hence this supplements.
-Supplements:    packageand(%{name}:python-lxml)
+# python3-xml is already likely installed, so the big dependency is 
python3-lxml. Hence this supplements.
+Supplements:    packageand(%{name}:python3-lxml)
 
 %description extensions-extra
 Extra extensions for Inkscape. Recommended for everybody who wants to
@@ -134,6 +141,7 @@
 Summary:        GIMP extensions for Inkscape
 Group:          Productivity/Graphics/Vector Editors
 Requires:       %{name} = %{version}
+Requires:       %{name}-extensions-extra = %{version}
 Requires:       gimp
 Enhances:       %{name}
 Supplements:    packageand(%{name}:gimp)
@@ -209,7 +217,7 @@
 # split extensions
 bash %{SOURCE2} %{buildroot}%{_datadir}/inkscape/extensions 
"%%{_datadir}/inkscape/extensions/"
 
-sed -i -e "1 s,#! */usr/bin/env python,#!/usr/bin/python2," 
%{buildroot}%{_datadir}/inkscape/extensions/*.py
+sed -i -e "1 s,#! */usr/bin/env python,#!/usr/bin/python3," 
%{buildroot}%{_datadir}/inkscape/extensions/*.py
 
 # Localized man pages, correct install path
 for man in %{buildroot}%{_mandir}/man1/inkscape.*.1; do
@@ -240,7 +248,6 @@
 # create a conflict between the lang subpackage and bundles
 
 %files -f inkscape.lst -f %{name}.man-lang
-%defattr(-,root,root)
 %{_bindir}/*
 %{_libdir}/libinkscape_base.so
 %{_datadir}/applications/inkscape.desktop
@@ -285,7 +292,6 @@
 %exclude %{_datadir}/inkscape/extensions/ps2pdf-ext.py
 
 %files extensions-extra -f inkscape-extensions-extra.lst
-%defattr(-,root,root)
 %{_datadir}/inkscape/extensions/Barcode
 # ps2pdf-ext is a wrapper around ps2pdf binary (part of ghostscript)
 %{_datadir}/inkscape/extensions/ps_input.inx
@@ -299,23 +305,18 @@
 %exclude %{_datadir}/inkscape/extensions/sk*
 
 %files extensions-dia
-%defattr(-,root,root)
 %{_datadir}/inkscape/extensions/dia*
 
 %files extensions-fig
-%defattr(-,root,root)
 %{_datadir}/inkscape/extensions/fig*
 
 %files extensions-gimp
-%defattr(-,root,root)
 # NOTE: export_gimp_palette* does not depend on gimp, but belongs here 
logically:
 %{_datadir}/inkscape/extensions/*gimp*
 
 %files extensions-skencil
-%defattr(-,root,root)
 %{_datadir}/inkscape/extensions/sk*
 
 %files lang -f %{name}.lang
-%defattr(-,root,root)
 
 %changelog

++++++ 0001-Run-python-script-for-translations-with-Python-3.patch ++++++
>From 5d0de061d393cc0aa134708a7482e9913a0d0736 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <[email protected]>
Date: Tue, 30 Jul 2019 16:02:49 +0200
Subject: [PATCH] Run python script for translations with Python 3

---
 share/filters/CMakeLists.txt   | 2 +-
 share/palettes/CMakeLists.txt  | 2 +-
 share/patterns/CMakeLists.txt  | 2 +-
 share/symbols/CMakeLists.txt   | 2 +-
 share/templates/CMakeLists.txt | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/share/filters/CMakeLists.txt b/share/filters/CMakeLists.txt
index bfcdd78..17cb98f 100644
--- a/share/filters/CMakeLists.txt
+++ b/share/filters/CMakeLists.txt
@@ -1,6 +1,6 @@
 add_custom_command(
   OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/filters.svg.h
-  COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py 
${CMAKE_CURRENT_SOURCE_DIR}/filters.svg > 
${CMAKE_CURRENT_SOURCE_DIR}/filters.svg.h
+  COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py 
${CMAKE_CURRENT_SOURCE_DIR}/filters.svg > 
${CMAKE_CURRENT_SOURCE_DIR}/filters.svg.h
   MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/filters.svg
   DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py
 )
diff --git a/share/palettes/CMakeLists.txt b/share/palettes/CMakeLists.txt
index 49b1b5e..ef6f501 100644
--- a/share/palettes/CMakeLists.txt
+++ b/share/palettes/CMakeLists.txt
@@ -2,7 +2,7 @@ set(I18N_FILES "inkscape.gpl" "svg.gpl" "Tango-Palette.gpl")
 
 add_custom_command(
   OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/palettes.h
-  COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py ${I18N_FILES} > 
${CMAKE_CURRENT_SOURCE_DIR}/palettes.h
+  COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py ${I18N_FILES} > 
${CMAKE_CURRENT_SOURCE_DIR}/palettes.h
   WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py ${I18N_FILES}
 )
diff --git a/share/patterns/CMakeLists.txt b/share/patterns/CMakeLists.txt
index 4dd4153..4d63fc0 100644
--- a/share/patterns/CMakeLists.txt
+++ b/share/patterns/CMakeLists.txt
@@ -1,6 +1,6 @@
 add_custom_command(
   OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/patterns.svg.h
-  COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py 
${CMAKE_CURRENT_SOURCE_DIR}/patterns.svg > 
${CMAKE_CURRENT_SOURCE_DIR}/patterns.svg.h
+  COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py 
${CMAKE_CURRENT_SOURCE_DIR}/patterns.svg > 
${CMAKE_CURRENT_SOURCE_DIR}/patterns.svg.h
   MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/patterns.svg
   DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py
 )
diff --git a/share/symbols/CMakeLists.txt b/share/symbols/CMakeLists.txt
index 36f7564..ed0bc43 100644
--- a/share/symbols/CMakeLists.txt
+++ b/share/symbols/CMakeLists.txt
@@ -2,7 +2,7 @@ file(GLOB _FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.svg")
 
 add_custom_command(
   OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/symbols.h
-  COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py ${_FILES} > 
${CMAKE_CURRENT_SOURCE_DIR}/symbols.h
+  COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py ${_FILES} > 
${CMAKE_CURRENT_SOURCE_DIR}/symbols.h
   WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py ${_FILES}
 )
diff --git a/share/templates/CMakeLists.txt b/share/templates/CMakeLists.txt
index a267e43..8a95704 100644
--- a/share/templates/CMakeLists.txt
+++ b/share/templates/CMakeLists.txt
@@ -2,7 +2,7 @@ file(GLOB _FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.svg")
 
 add_custom_command(
   OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/templates.h
-  COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py ${_FILES} > 
${CMAKE_CURRENT_SOURCE_DIR}/templates.h
+  COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py ${_FILES} > 
${CMAKE_CURRENT_SOURCE_DIR}/templates.h
   WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py ${_FILES}
 )
-- 
2.22.0

++++++ f5e0ea893f34_extensions_python3_compatibility.patch ++++++
>From f5e0ea893f34c91f25d4781b37ee6eff15a7e213 Mon Sep 17 00:00:00 2001
From: Thomas Holder <[email protected]>
Date: Thu, 7 Mar 2019 21:48:37 +0100
Subject: [PATCH] extensions 2to3: fix dxf_outlines

---
 share/extensions/dxf_outlines.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/share/extensions/dxf_outlines.py b/share/extensions/dxf_outlines.py
index 63d813f94c..e07681bbba 100755
--- a/share/extensions/dxf_outlines.py
+++ b/share/extensions/dxf_outlines.py
@@ -31,6 +31,7 @@ along with this program; if not, write to the Free Software
 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 '''
 # standard library
+import sys
 import math
 # local library
 import inkex
@@ -101,7 +102,8 @@ class MyEffect(inkex.Effect):
         self.d = array([0], float)              # knot vector
         self.poly = [[0.0,0.0]]                 # LWPOLYLINE data
     def output(self):
-        print(b''.join(self.dxf))
+        stdout = sys.stdout if sys.version_info[0] < 3 else sys.stdout.buffer
+        stdout.write(b''.join(self.dxf))
     def dxf_add(self, str):
         self.dxf.append(str.encode(self.options.char_encode))
     def dxf_line(self,csp):
-- 
2.21.0

++++++ mr_568_extensions_python3_compatibility.patch ++++++
++++ 4914 lines (skipped)

++++++ mr_582_extensions_python3_compatibility.patch ++++++
>From d3ed2703736d9157b2cdadd4b5a95324aacc6191 Mon Sep 17 00:00:00 2001
From: Thomas Holder <[email protected]>
Date: Tue, 12 Mar 2019 16:29:56 +0100
Subject: [PATCH] extensions 2to3: follow-up

---
 share/extensions/color_desaturate.py |  2 +-
 share/extensions/dxf_input.py        |  2 +-
 share/extensions/dxf_outlines.py     |  2 +-
 share/extensions/ink2canvas/svg.py   |  6 +++++-
 share/extensions/voronoi.py          | 12 +++++++++---
 5 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/share/extensions/color_desaturate.py 
b/share/extensions/color_desaturate.py
index a2350a4d32..978e199a29 100755
--- a/share/extensions/color_desaturate.py
+++ b/share/extensions/color_desaturate.py
@@ -3,7 +3,7 @@ import coloreffect
 
 class C(coloreffect.ColorEffect):
   def colmod(self,r,g,b):
-    l = (max(r,g,b)+min(r,g,b))/2
+    l = (max(r,g,b)+min(r,g,b)) // 2
     ig=int(round(l))
     return '%02x%02x%02x' % (ig,ig,ig)
 
diff --git a/share/extensions/dxf_input.py b/share/extensions/dxf_input.py
index 3e15c0b8fd..8754e7cb63 100755
--- a/share/extensions/dxf_input.py
+++ b/share/extensions/dxf_input.py
@@ -109,7 +109,7 @@ def export_SPLINE():
                         vals[groups['20']].insert(i-1, (1.0 - 
a1)*vals[groups['20']][i-2] + a1*vals[groups['20']][i-1])
             ctrls = len(vals[groups['10']])
             path = 'M %f,%f' % (vals[groups['10']][0], vals[groups['20']][0])
-            for i in range (0, (ctrls - 1)/3):
+            for i in range (0, (ctrls - 1) // 3):
                 path += ' C %f,%f %f,%f %f,%f' % (vals[groups['10']][3*i + 1], 
vals[groups['20']][3*i + 1], vals[groups['10']][3*i + 2], 
vals[groups['20']][3*i + 2], vals[groups['10']][3*i + 3], 
vals[groups['20']][3*i + 3])
             if vals[groups['70']][0] & 1:       # closed path
                 path += ' z'
diff --git a/share/extensions/dxf_outlines.py b/share/extensions/dxf_outlines.py
index e07681bbba..53c1a523e6 100755
--- a/share/extensions/dxf_outlines.py
+++ b/share/extensions/dxf_outlines.py
@@ -103,7 +103,7 @@ class MyEffect(inkex.Effect):
         self.poly = [[0.0,0.0]]                 # LWPOLYLINE data
     def output(self):
         stdout = sys.stdout if sys.version_info[0] < 3 else sys.stdout.buffer
-        stdout.write(b''.join(self.dxf))
+        stdout.write(b''.join(self.dxf) + b'\n')
     def dxf_add(self, str):
         self.dxf.append(str.encode(self.options.char_encode))
     def dxf_line(self,csp):
diff --git a/share/extensions/ink2canvas/svg.py 
b/share/extensions/ink2canvas/svg.py
index f4dca8279d..8d1402b7b0 100644
--- a/share/extensions/ink2canvas/svg.py
+++ b/share/extensions/ink2canvas/svg.py
@@ -16,6 +16,10 @@ along with this program; if not, write to the Free Software
 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 '''
 
+import sys
+if sys.version_info[0] > 2:
+    unicode = lambda s: s.decode() if isinstance(s, bytes) else str(s)
+
 import inkex
 import simplestyle
 from simplepath import parsePath
@@ -326,7 +330,7 @@ class Polygon(Path):
         points = map(lambda x: x.split(","), points)
         comm = []
         for pt in points:           # creating path command similar
-            pt = map(float, pt)
+            pt = list(map(float, pt))
             comm.append(["L", pt])
         comm[0][0] = "M"            # first command must be a 'M' => moveTo
         return comm
diff --git a/share/extensions/voronoi.py b/share/extensions/voronoi.py
index af83007f1a..d3e9b124df 100644
--- a/share/extensions/voronoi.py
+++ b/share/extensions/voronoi.py
@@ -189,7 +189,7 @@ def voronoi(siteList,context):
         if not priorityQ.isEmpty():
             minpt = priorityQ.getMinPt()
 
-        if (newsite and (priorityQ.isEmpty() or cmp(newsite,minpt) < 0)):
+        if (newsite and (priorityQ.isEmpty() or newsite < minpt)):
             # newsite is smallest -  this is a site event
             context.outSite(newsite)
             
@@ -341,6 +341,9 @@ class Site(object):
         else:
             return 0
 
+    def __lt__(self, other):
+        return self.__cmp__(other) < 0
+
     def distance(self,other):
         dx = self.x - other.x
         dy = self.y - other.y
@@ -442,6 +445,9 @@ class Halfedge(object):
         else:
             return 0
 
+    def __lt__(self, other):
+        return self.__cmp__(other) < 0
+
     def leftreg(self,default):
         if not self.edge: 
             return default
@@ -519,7 +525,7 @@ class Halfedge(object):
 
         xint = (e1.c*e2.b - e2.c*e1.b) / d
         yint = (e2.c*e1.a - e1.c*e2.a) / d
-        if(cmp(e1.reg[1],e2.reg[1]) < 0):
+        if e1.reg[1] < e2.reg[1]:
             he = self
             e = e1
         else:
@@ -637,7 +643,7 @@ class PriorityQueue(object):
         he.ystar  = site.y + offset
         last = self.hash[self.getBucket(he)]
         next = last.qnext
-        while((next is not None) and cmp(he,next) > 0):
+        while((next is not None) and he > next):
             last = next
             next = last.qnext
         he.qnext = last.qnext
-- 
2.21.0


Reply via email to