tag 840181 + patch
thanks

Please find attached here a patch that should fix this bug.

Cheers,

Laurent Bigonville
diff -Nru scour-0.32/debian/cmpsvg scour-0.32/debian/cmpsvg
--- scour-0.32/debian/cmpsvg	2016-06-30 18:56:54.000000000 +0200
+++ scour-0.32/debian/cmpsvg	2016-10-09 13:09:11.000000000 +0200
@@ -9,9 +9,11 @@
 
 import sys
 try:
-    import rsvg
+    import gi
+    gi.require_version('Rsvg', '2.0')
+    from gi.repository import Rsvg
 except ImportError:
-    print >> sys.stderr, 'cmpsvg: python-rsvg not installed, cannot compare SVG images'
+    print >> sys.stderr, 'cmpsvg: gir1.2-rsvg-2.0 or python-gi not installed, cannot compare SVG images'
     sys.exit(0)
 try:
     import cairo
@@ -36,7 +38,7 @@
 
     Return a tuple (width, height, data).
     '''
-    svg = rsvg.Handle(file=svgfile)
+    svg = Rsvg.Handle.new_from_file(svgfile)
     s = cairo.ImageSurface(cairo.FORMAT_ARGB32, svg.props.width,
             svg.props.height)
     svg.render_cairo(cairo.Context(s))
diff -Nru scour-0.32/debian/control scour-0.32/debian/control
--- scour-0.32/debian/control	2016-06-30 18:56:54.000000000 +0200
+++ scour-0.32/debian/control	2016-10-09 13:07:52.000000000 +0200
@@ -23,8 +23,9 @@
  ${python:Depends},
  python-pkg-resources,
 Suggests:
- python-rsvg,
- python-cairo
+ gir1.2-rsvg-2.0,
+ python-cairo,
+ python-gi
 Description: SVG scrubber and optimizer (Python 2 module)
  Scour is a Python module that aggressively cleans SVG files, removing a lot of
  unnecessary information that certain tools or authors embed into their

Reply via email to