[Python-modules-commits] r13661 - in packages/pythonmagickwand/trunk (11 files)

azatoth-guest at users.alioth.debian.org azatoth-guest at users.alioth.debian.org
Sat Jun 26 13:23:57 UTC 2010


    Date: Saturday, June 26, 2010 @ 13:23:54
  Author: azatoth-guest
Revision: 13661

[svn-inject] Applying Debian modifications to trunk

Added:
  packages/pythonmagickwand/trunk/debian/
  packages/pythonmagickwand/trunk/debian/changelog
  packages/pythonmagickwand/trunk/debian/compat
  packages/pythonmagickwand/trunk/debian/control
  packages/pythonmagickwand/trunk/debian/copyright
  packages/pythonmagickwand/trunk/debian/patches/
  packages/pythonmagickwand/trunk/debian/patches/debian-changes-0.1-1
  packages/pythonmagickwand/trunk/debian/patches/series
  packages/pythonmagickwand/trunk/debian/rules
  packages/pythonmagickwand/trunk/debian/source/
  packages/pythonmagickwand/trunk/debian/source/format


Property changes on: packages/pythonmagickwand/trunk/debian
___________________________________________________________________
Added: mergeWithUpstream
   + 1

Added: packages/pythonmagickwand/trunk/debian/changelog
===================================================================
--- packages/pythonmagickwand/trunk/debian/changelog	                        (rev 0)
+++ packages/pythonmagickwand/trunk/debian/changelog	2010-06-26 13:23:54 UTC (rev 13661)
@@ -0,0 +1,5 @@
+pythonmagickwand (0.1-1) UNRELEASED; urgency=low
+
+  * Initial release.
+
+ -- Carl Fürstenberg <azatoth at gmail.com>  Sat, 26 Jun 2010 14:53:06 +0200

Added: packages/pythonmagickwand/trunk/debian/compat
===================================================================
--- packages/pythonmagickwand/trunk/debian/compat	                        (rev 0)
+++ packages/pythonmagickwand/trunk/debian/compat	2010-06-26 13:23:54 UTC (rev 13661)
@@ -0,0 +1 @@
+7

Added: packages/pythonmagickwand/trunk/debian/control
===================================================================
--- packages/pythonmagickwand/trunk/debian/control	                        (rev 0)
+++ packages/pythonmagickwand/trunk/debian/control	2010-06-26 13:23:54 UTC (rev 13661)
@@ -0,0 +1,15 @@
+Source: pythonmagickwand
+Priority: extra
+Maintainer: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
+Uploaders: Carl Fürstenberg <azatoth at gmail.com>
+Build-Depends: debhelper (>= 7.2)
+Standards-Version: 3.8.4
+Section: libs
+Homepage: http://www.assembla.com/wiki/show/pythonmagickwand
+
+Package: python-pythonmagickwand
+Section: python
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Python bindings for the ImageMagick MagickWand C-API
+ bla bla bla....

Added: packages/pythonmagickwand/trunk/debian/copyright
===================================================================
--- packages/pythonmagickwand/trunk/debian/copyright	                        (rev 0)
+++ packages/pythonmagickwand/trunk/debian/copyright	2010-06-26 13:23:54 UTC (rev 13661)
@@ -0,0 +1,40 @@
+Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135
+Name: Pythonmagickwand
+Source: http://svn2.assembla.com/svn/pythonmagickwand/trunk
+
+Copyright: 2009, Ian Stevens and others
+License: 
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+ .
+ * Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the
+   distribution.
+ * Neither the name of Benjamin Schweizer nor the names of its
+   contributors may be used to endorse or promote products derived
+   from this software without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ NOT YET AVAILABLE
+
+Files: debian/*
+Copyright: 2009, Debian
+License:
+ Copying and distribution of this package, with or without
+ modification, are permitted in any medium without royalty
+ provided the copyright notice and this notice are
+ preserved.

Added: packages/pythonmagickwand/trunk/debian/patches/debian-changes-0.1-1
===================================================================
--- packages/pythonmagickwand/trunk/debian/patches/debian-changes-0.1-1	                        (rev 0)
+++ packages/pythonmagickwand/trunk/debian/patches/debian-changes-0.1-1	2010-06-26 13:23:54 UTC (rev 13661)
@@ -0,0 +1,317 @@
+Description: Upstream changes introduced in version 0.1-1
+ This patch has been created by dpkg-source during the package build.
+ Here's the last changelog entry, hopefully it gives details on why
+ those changes were made:
+ .
+ pythonmagickwand (0.1-1) UNRELEASED; urgency=low
+ .
+   * Initial release.
+ .
+ The person named in the Author field signed this changelog entry.
+Author: Carl Fürstenberg <azatoth at gmail.com>
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Origin: <vendor|upstream|other>, <url of original patch>
+Bug: <url in upstream bugtracker>
+Bug-Debian: http://bugs.debian.org/<bugnumber>
+Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
+Forwarded: <no|not-needed|url proving that it has been forwarded>
+Reviewed-By: <name and email of someone who approved the patch>
+Last-Update: <YYYY-MM-DD>
+
+--- /dev/null
++++ pythonmagickwand-0.1/test/wand_test.py
+@@ -0,0 +1,17 @@
++import ctypes
++from StringIO import StringIO
++from pythonmagickwand.wand import MagickWand
++from pythonmagickwand import api
++
++def test_set_size():
++    w = MagickWand()
++    w.size = (100, 100)
++    x = y = ctypes.c_ulong()
++    api.MagickGetSize(w._wand, x, y)
++    assert (100, 100) == (x.value, y.value)
++
++def test_get_size():
++    w = MagickWand()
++    assert (0, 0) == w.size
++    api.MagickSetSize(w._wand, 100, 100)
++    assert (100, 100) == w.size
+--- /dev/null
++++ pythonmagickwand-0.1/test/color_test.py
+@@ -0,0 +1,15 @@
++import ctypes
++from pythonmagickwand import api
++from pythonmagickwand.color import Color
++
++def test_init_with_color():
++    c = Color('#0000ff')
++    assert 0 == api.PixelGetRed(c._wand)
++    assert 0 == api.PixelGetGreen(c._wand)
++    assert 1 == api.PixelGetBlue(c._wand)
++
++def test_images_equal():
++    assert Color('blue') == Color('#0000ff')
++    assert Color('blue') != Color('#0001ff')
++    assert Color('blue') == Color('#0000ffff')
++    assert Color('blue') != Color('#0000ff01')
+--- /dev/null
++++ pythonmagickwand-0.1/test/image_test.py
+@@ -0,0 +1,212 @@
++import ctypes
++from StringIO import StringIO
++from pythonmagickwand.wand import PIXELS_PER_INCH, PIXELS_PER_CENTIMETER, CMYK_COLORSPACE, BZIP_COMPRESSION
++from pythonmagickwand.image import Image
++from pythonmagickwand import api, color
++
++GIF = '''\x47\x49\x46\x38\x39\x61\x01\x00\x01\x00\xf0\x00\x00\xf0\xe6\x8c\x00\x00\x00\x21\xf9\x04\x00\x00\x00\x00\x00\x2c\x00\x00\x00\x00\x01\x00\x01\x00\x00\x02\x02\x44\x01\x00\x3b\x00'''
++EPS = '''%!PS-Adobe-3.0 EPSF-3.0
++%%Creator: Ian Stevens
++%%Origin: 0 0
++%%BoundingBox: 100 100 200 200
++newpath
++100 100 moveto
++0 100 rlineto
++100 0 rlineto
++0 -100 rlineto
++-100 0 rlineto
++closepath
++gsave
++0 0 0.4 setrgbcolor
++fill
++'''
++
++def setup():
++    i = Image()
++    api.MagickNewImage(i._wand, 100, 100, api.NewPixelWand())
++    return i
++
++def test_set_format():
++    w = setup()
++    w.format = 'PNG'
++    assert 'PNG' == api.MagickGetImageFormat(w._wand)
++    w.format = None
++    assert '' == api.MagickGetImageFormat(w._wand)
++    try:
++        w.format = 'invalid image format'
++    except:
++        pass
++    else:
++        assert False
++
++def test_get_format():
++    w = Image()
++    assert None == w.format
++    api.MagickNewImage(w._wand, 100, 100, api.NewPixelWand())
++    assert None == w.format
++    api.MagickSetImageFormat(w._wand, 'PNG')
++    assert 'PNG' == w.format
++
++def test_set_units():
++    w = setup()
++    w.units = None
++    assert api.UndefinedResolution == api.MagickGetImageUnits(w._wand)
++    w.units = PIXELS_PER_INCH
++    assert PIXELS_PER_INCH == api.MagickGetImageUnits(w._wand)
++    try:
++        w.units = 12345
++    except ValueError:
++        pass
++    else:
++        assert False
++
++def test_get_units():
++    w = Image()
++    assert None == w.units
++    api.MagickNewImage(w._wand, 100, 100, api.NewPixelWand())
++    assert None == w.units
++    api.MagickSetImageUnits(w._wand, api.PixelsPerInchResolution)
++    assert PIXELS_PER_INCH == w.units
++
++def test_set_resolution():
++    w = setup()
++    w.resolution = (300, 300)
++    x = y = ctypes.c_double()
++    api.MagickGetImageResolution(w._wand, x, y)
++    assert (300, 300) == (x.value, y.value)
++
++def test_get_resolution():
++    w = setup()
++    assert (72, 72) == w.resolution
++    api.MagickSetImageResolution(w._wand, 300, 300)
++    assert (300, 300) == w.resolution
++
++def test_get_size():
++    w = setup()
++    assert (100, 100) == w.size
++
++def test_set_size():
++    w = setup()
++    w.size = (200, 200)
++    width = api.MagickGetImageWidth(w._wand)
++    height = api.MagickGetImageHeight(w._wand)
++    assert (200, 200) == (width, height)
++
++def test_set_colorspace():
++    w = setup()
++    w.colorspace = CMYK_COLORSPACE
++    assert CMYK_COLORSPACE == api.MagickGetImageColorspace(w._wand)
++
++def test_get_colorspace():
++    w = Image()
++    assert None == w.colorspace
++    w = setup()
++    api.MagickSetImageColorspace(w._wand, CMYK_COLORSPACE)
++    assert CMYK_COLORSPACE == w.colorspace
++
++def test_set_background_color():
++    w = setup()
++    c = color.PINK
++    w.background_color = c
++    c2 = api.NewPixelWand()
++    api.MagickGetImageBackgroundColor(w._wand, c2)
++    assert api.IsPixelWandSimilar(c2, c._wand, 0)
++
++def test_get_background_color():
++    w = setup()
++    pw = api.NewPixelWand()
++    api.PixelSetColor(pw, 'purple')
++    api.MagickSetImageBackgroundColor(w._wand, pw)
++    assert api.IsPixelWandSimilar(pw, w.background_color._wand, 0)
++
++def test_set_border_color():
++    w = setup()
++    c = color.PINK
++    w.border_color = c
++    c2 = api.NewPixelWand()
++    api.MagickGetImageBorderColor(w._wand, c2)
++    assert api.IsPixelWandSimilar(c2, c._wand, 0)
++
++def test_get_border_color():
++    w = setup()
++    pw = api.NewPixelWand()
++    api.PixelSetColor(pw, 'purple')
++    api.MagickSetImageBorderColor(w._wand, pw)
++    assert api.IsPixelWandSimilar(pw, w.border_color._wand, 0)
++
++def test_set_compression():
++    w = setup()
++    w.compression = BZIP_COMPRESSION
++    assert BZIP_COMPRESSION == api.MagickGetImageCompression(w._wand)
++
++def test_get_compression():
++    w = setup()
++    api.MagickSetImageCompression(w._wand, BZIP_COMPRESSION)
++    assert BZIP_COMPRESSION == w.compression
++
++def test_set_compression_quality():
++    w = setup()
++    w.compression_quality = 55
++    assert 55 == api.MagickGetImageCompressionQuality(w._wand)
++    w.compression_quality = 55.5
++    assert 56 == api.MagickGetImageCompressionQuality(w._wand)
++
++def test_get_compression_quality():
++    w = setup()
++    api.MagickSetImageCompressionQuality(w._wand, 55)
++    assert 55 == w.compression_quality
++
++def test_constructor_with_file():
++    w = Image(StringIO(GIF))
++    assert 'GIF' == w.format
++    assert (1,1) == w.size
++    size = api.size_t()
++    b = api.MagickGetImageBlob(w._wand, size)
++    assert GIF == ''.join([chr(b[i]) for i in range(0, size.value + 1)])
++
++def test_constructor_with_eps_file():
++    w = Image(StringIO(EPS))
++    assert 'EPS' == w.format
++    size = api.size_t()
++    b = api.MagickGetImageBlob(w._wand, size)
++    assert EPS == ''.join([chr(b[i]) for i in range(0, size.value + 1)])
++
++def test_scale():
++    w = setup()
++    w.scale((200, 200))
++    assert (200, 200) == w.size
++
++def test_resize():
++    w = setup()
++    w.resize((200, 200))
++    assert (200, 200) == w.size
++    w.resize((300, 300), filter=None)
++    assert (300, 300) == w.size
++
++def test_resample():
++    w = setup()
++    res = w.resolution
++    size = w.size
++    w.resample((3*res[0], 2*res[1]))
++    assert (3*size[0], 2*size[1]) == w.size
++
++def test_chop():
++    w = setup()
++    w.chop((10, 10), (50, 50))
++    assert (90, 90) == w.size
++
++def test_splice():
++    w = setup()
++    w.splice((10,10), (50,50))
++    assert (110, 110) == w.size
++
++def test_magnify():
++    w = setup()
++    w.magnify()
++    assert (200, 200) == w.size
++
++def test_minify():
++    w = setup()
++    w.minify()
++    assert (50, 50) == w.size
++
+--- /dev/null
++++ pythonmagickwand-0.1/samples/convert.py
+@@ -0,0 +1,22 @@
++#!/usr/bin/env python
++
++from pythonmagickwand.image import Image
++
++def convert(source_fh, source_type, dest_type, dest_size):
++    """somewhat like convert(1)"""
++    i = Image(source_fh, source_type)
++
++    if not i.select(dest_size):
++        print "bad size"
++        i.alpha(True)
++        i.scale(dest_size)
++
++    i.alpha(True)
++    result = i.dump(dest_type)
++
++    return result
++
++if __name__=='__main__':
++    source_fh = open('favicon.ico', 'r')
++    dest_buf = convert(source_fh, 'ico', 'png', (16,16))
++    open('favicon.png', 'wb').write(dest_buf)
+--- pythonmagickwand-0.1.orig/PythonMagickWand.egg-info/SOURCES.txt
++++ pythonmagickwand-0.1/PythonMagickWand.egg-info/SOURCES.txt
+@@ -8,4 +8,8 @@ pythonmagickwand/__init__.py
+ pythonmagickwand/api.py
+ pythonmagickwand/color.py
+ pythonmagickwand/image.py
+-pythonmagickwand/wand.py
+\ No newline at end of file
++pythonmagickwand/wand.py
++samples/convert.py
++test/color_test.py
++test/image_test.py
++test/wand_test.py
+\ No newline at end of file

Added: packages/pythonmagickwand/trunk/debian/patches/series
===================================================================
--- packages/pythonmagickwand/trunk/debian/patches/series	                        (rev 0)
+++ packages/pythonmagickwand/trunk/debian/patches/series	2010-06-26 13:23:54 UTC (rev 13661)
@@ -0,0 +1 @@
+debian-changes-0.1-1

Added: packages/pythonmagickwand/trunk/debian/rules
===================================================================
--- packages/pythonmagickwand/trunk/debian/rules	                        (rev 0)
+++ packages/pythonmagickwand/trunk/debian/rules	2010-06-26 13:23:54 UTC (rev 13661)
@@ -0,0 +1,15 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+%:
+	dh  $@
+
+get-orig-source:
+	dir=$$(mktemp -du); \
+		version=0 \
+		svn export http://svn2.assembla.com/svn/pythonmagickwand/trunk $$dir; \
+		( cd $$dir && version=$$(python setup.py --version) && python setup.py sdist ); \
+		mv $$dir/dist/* .; \
+		rm -rf $$dir;
+
+


Property changes on: packages/pythonmagickwand/trunk/debian/rules
___________________________________________________________________
Added: svn:executable
   + *

Added: packages/pythonmagickwand/trunk/debian/source/format
===================================================================
--- packages/pythonmagickwand/trunk/debian/source/format	                        (rev 0)
+++ packages/pythonmagickwand/trunk/debian/source/format	2010-06-26 13:23:54 UTC (rev 13661)
@@ -0,0 +1 @@
+3.0 (quilt)




More information about the Python-modules-commits mailing list