[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#928295: unblock: pythonmagick/0.9.19-3



Control: tag -1 - moreinfo

* Paul Gevers <elbrus@debian.org> [2019-05-01 15:29]:
pythonmagick was patched to compile with ImageMagick 7 in 0.9.19-1
whereas buster is still on 6. This resulted the package failing to
import, see #928103 (missed to close this in the changelog).
I disabled the autopkgtest as it was failing because autopep8 doesn't
support module names different to packages names.

How about generating a superficial test that does the same as autodep8
(I like your typo) but with the right module name for now? The rest
looks good to me.

There was one already, but it failed as well. I uploaded a fixed version in -4. Diff against the version in buster attached.
diff --git a/debian/changelog b/debian/changelog
index 9a93a17..348c161 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,18 @@
+pythonmagick (0.9.19-4) unstable; urgency=medium
+
+  * Team upload.
+  * Fix autopkgtests
+
+ -- Jochen Sprickerhof <jspricke@debian.org>  Wed, 01 May 2019 20:33:19 +0200
+
+pythonmagick (0.9.19-3) unstable; urgency=medium
+
+  * Team upload.
+  * Disable failing autopkgtest
+  * Add patch for ImageMagick < 7
+
+ -- Jochen Sprickerhof <jspricke@debian.org>  Wed, 01 May 2019 14:45:43 +0200
+
 pythonmagick (0.9.19-2) unstable; urgency=medium
 
   * Fix debci
diff --git a/debian/patches/0002-Partly-revert-f4772d8-for-ImageMagick-7.patch b/debian/patches/0002-Partly-revert-f4772d8-for-ImageMagick-7.patch
new file mode 100644
index 0000000..25d9e84
--- /dev/null
+++ b/debian/patches/0002-Partly-revert-f4772d8-for-ImageMagick-7.patch
@@ -0,0 +1,110 @@
+From 0c0e1e9a038d7e66669f79f567714ab5054c9345 Mon Sep 17 00:00:00 2001
+From: Jochen Sprickerhof <jspricke@debian.org>
+Date: Wed, 1 May 2019 12:28:12 +0200
+Subject: [PATCH] Partly revert f4772d8 for ImageMagick < 7
+
+---
+ PythonMagick/__init__.py   |  8 ++++----
+ pythonmagick_src/_main.cpp | 16 ++++++++--------
+ 2 files changed, 12 insertions(+), 12 deletions(-)
+
+diff --git a/PythonMagick/__init__.py b/PythonMagick/__init__.py
+index 61ba8d4..6750c2e 100644
+--- a/PythonMagick/__init__.py
++++ b/PythonMagick/__init__.py
+@@ -51,10 +51,10 @@ class DrawableColor(_PythonMagick.DrawableColor):
+ class DrawableCompositeImage(_PythonMagick.DrawableCompositeImage):
+    pass
+ 
+-class DrawableStrokeDashArray(_PythonMagick.DrawableStrokeDashArray):
++class DrawableDashArray(_PythonMagick.DrawableDashArray):
+    pass
+ 
+-class DrawableStrokeDashOffset(_PythonMagick.DrawableStrokeDashOffset):
++class DrawableDashOffset(_PythonMagick.DrawableDashOffset):
+    pass
+ 
+ class DrawableEllipse(_PythonMagick.DrawableEllipse):
+@@ -78,7 +78,7 @@ class DrawableGravity(_PythonMagick.DrawableGravity):
+ class DrawableLine(_PythonMagick.DrawableLine):
+    pass
+ 
+-class DrawableAlpha(_PythonMagick.DrawableAlpha):
++class DrawableMatte(_PythonMagick.DrawableMatte):
+    pass
+ 
+ class DrawableMiterLimit(_PythonMagick.DrawableMiterLimit):
+@@ -174,7 +174,7 @@ class DrawableViewbox(_PythonMagick.DrawableViewbox):
+ class Exception(_PythonMagick.Exception):
+    pass
+ 
+-class FilterType(_PythonMagick.FilterType):
++class FilterTypes(_PythonMagick.FilterTypes):
+    pass
+ 
+ class Geometry(_PythonMagick.Geometry):
+diff --git a/pythonmagick_src/_main.cpp b/pythonmagick_src/_main.cpp
+index a7d3cce..449f0b1 100644
+--- a/pythonmagick_src/_main.cpp
++++ b/pythonmagick_src/_main.cpp
+@@ -30,7 +30,7 @@ void Export_pyste_src_PathArcAbs();
+ void Export_pyste_src_Image();
+ void Export_pyste_src_GravityType();
+ void Export_pyste_src_Geometry();
+-void Export_pyste_src_FilterType();
++void Export_pyste_src_FilterTypes();
+ void Export_pyste_src_Exception();
+ void Export_pyste_src_DrawableViewbox();
+ void Export_pyste_src_DrawableTranslation();
+@@ -62,7 +62,7 @@ void Export_pyste_src_DrawablePointSize();
+ void Export_pyste_src_DrawablePoint();
+ void Export_pyste_src_DrawablePath();
+ void Export_pyste_src_DrawableMiterLimit();
+-void Export_pyste_src_DrawableAlpha();
++void Export_pyste_src_DrawableMatte();
+ void Export_pyste_src_DrawableLine();
+ void Export_pyste_src_DrawableGravity();
+ void Export_pyste_src_DrawableFont();
+@@ -70,8 +70,8 @@ void Export_pyste_src_DrawableFillRule();
+ void Export_pyste_src_DrawableFillOpacity();
+ void Export_pyste_src_DrawableFillColor();
+ void Export_pyste_src_DrawableEllipse();
+-void Export_pyste_src_DrawableStrokeDashOffset();
+-void Export_pyste_src_DrawableStrokeDashArray();
++void Export_pyste_src_DrawableDashOffset();
++void Export_pyste_src_DrawableDashArray();
+ void Export_pyste_src_DrawableCompositeImage();
+ void Export_pyste_src_DrawableColor();
+ void Export_pyste_src_DrawableClipPath();
+@@ -119,7 +119,7 @@ BOOST_PYTHON_MODULE(_PythonMagick)
+     Export_pyste_src_Image();
+     Export_pyste_src_GravityType();
+     Export_pyste_src_Geometry();
+-    Export_pyste_src_FilterType();
++    Export_pyste_src_FilterTypes();
+     Export_pyste_src_Exception();
+     Export_pyste_src_DrawableViewbox();
+     Export_pyste_src_DrawableTranslation();
+@@ -151,7 +151,7 @@ BOOST_PYTHON_MODULE(_PythonMagick)
+     Export_pyste_src_DrawablePoint();
+     Export_pyste_src_DrawablePath();
+     Export_pyste_src_DrawableMiterLimit();
+-    Export_pyste_src_DrawableAlpha();
++    Export_pyste_src_DrawableMatte();
+     Export_pyste_src_DrawableLine();
+     Export_pyste_src_DrawableGravity();
+     Export_pyste_src_DrawableFont();
+@@ -159,8 +159,8 @@ BOOST_PYTHON_MODULE(_PythonMagick)
+     Export_pyste_src_DrawableFillOpacity();
+     Export_pyste_src_DrawableFillColor();
+     Export_pyste_src_DrawableEllipse();
+-    Export_pyste_src_DrawableStrokeDashOffset();
+-    Export_pyste_src_DrawableStrokeDashArray();
++    Export_pyste_src_DrawableDashOffset();
++    Export_pyste_src_DrawableDashArray();
+     Export_pyste_src_DrawableCompositeImage();
+     Export_pyste_src_DrawableColor();
+     Export_pyste_src_DrawableClipPath();
+-- 
+2.20.1
+
diff --git a/debian/patches/series b/debian/patches/series
index c6c3857..9a1a153 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 0001-Remove-obsolete-m4-files.patch
+0002-Partly-revert-f4772d8-for-ImageMagick-7.patch
diff --git a/debian/tests/control b/debian/tests/control
index 0e470c6..85e3466 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,6 +1,8 @@
 Tests: python2
+Restrictions: allow-stderr
 Depends: python-pythonmagick
 
 
 Tests: python3
-Depends: python3-pythonmagick
\ No newline at end of file
+Restrictions: allow-stderr
+Depends: python3-pythonmagick
diff --git a/debian/tests/python2 b/debian/tests/python2
index c089d1a..288c5bb 100755
--- a/debian/tests/python2
+++ b/debian/tests/python2
@@ -1,10 +1,13 @@
 #!/bin/sh
+set -exu
 
-PYTHON=$(basename $0)
+# pwd needs to be outside of the source folder because it contains a PythonMagick/
+cd /
+PYTHON=$(basename "$0")
 
 $PYTHON >/dev/null <<EOF
 import PythonMagick as Magick
-img = Magick.Image("rose;")
+img = Magick.Image('100x100', 'white')
 img.quality(100) #full compression
 img.magick('PNG')
 img.write("/dev/stdout")

Attachment: signature.asc
Description: PGP signature


Reply to: