[tilestache] 01/05: Add patch by Eric Soroos for Pillow 3.0.0 support.
Sebastiaan Couwenberg
sebastic at moszumanska.debian.org
Fri Dec 18 13:01:40 UTC 2015
This is an automated email from the git hooks/post-receive script.
sebastic pushed a commit to branch master
in repository tilestache.
commit 77c8b15b059237ea09b86aace86f81051811095e
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date: Fri Dec 18 13:07:13 2015 +0100
Add patch by Eric Soroos for Pillow 3.0.0 support.
---
debian/changelog | 7 +++++++
debian/patches/pillow-3.0.0.patch | 38 ++++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 46 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 37be91b..693cb49 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+tilestache (1.49.8-2) UNRELEASED; urgency=medium
+
+ * Add patch by Eric Soroos for Pillow 3.0.0 support.
+ (closes: #808279)
+
+ -- Bas Couwenberg <sebastic at debian.org> Fri, 18 Dec 2015 13:06:22 +0100
+
tilestache (1.49.8-1) unstable; urgency=medium
[ Andrew Harvey ]
diff --git a/debian/patches/pillow-3.0.0.patch b/debian/patches/pillow-3.0.0.patch
new file mode 100644
index 0000000..460ece5
--- /dev/null
+++ b/debian/patches/pillow-3.0.0.patch
@@ -0,0 +1,38 @@
+Description: Add support for Pillow 3.0.0.
+ Tilestache uses PIL.Image.fromstring, which has been deprecated in Pillow since 2.0.0, and has now been removed in 3.0.0.
+Author: Eric Soroos <eric-debian at soroos.net>
+Bug-Debian: https://bugs.debian.org/808279
+
+--- a/TileStache/Mapnik.py
++++ b/TileStache/Mapnik.py
+@@ -128,7 +128,12 @@ class ImageProvider:
+ # always release the lock
+ global_mapnik_lock.release()
+
+- img = Image.fromstring('RGBA', (width, height), img.tostring())
++ if hasattr(Image, 'frombytes'):
++ # Image.fromstring is deprecated past Pillow 2.0
++ img = Image.frombytes('RGBA', (width, height), img.tostring())
++ else:
++ # PIL still uses Image.fromstring
++ img = Image.fromstring('RGBA', (width, height), img.tostring()
+
+ logging.debug('TileStache.Mapnik.ImageProvider.renderArea() %dx%d in %.3f from %s', width, height, time() - start_time, self.mapfile)
+
+--- a/TileStache/Pixels.py
++++ b/TileStache/Pixels.py
+@@ -100,7 +100,13 @@ def apply_palette(image, palette, t_inde
+
+ indexes.append(mapping[(r, g, b)])
+
+- output = Image.fromstring('P', image.size, ''.join(indexes))
++ if hasattr(Image, 'frombytes'):
++ # Image.fromstring is deprecated past Pillow 2.0
++ output = Image.frombytes('P', image.size, ''.join(indexes))
++ else:
++ # PIL still uses Image.fromstring
++ output = Image.fromstring('P', image.size, ''.join(indexes))
++
+ bits = int(ceil(log(len(palette)) / log(2)))
+
+ palette += [(0, 0, 0)] * (256 - len(palette))
diff --git a/debian/patches/series b/debian/patches/series
index 74ebdf9..0b75c5e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@
01-fix_manpages.patch
03-use_system_modestmaps.patch
04-fix_for_newer_modestmaps.patch
+pillow-3.0.0.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/tilestache.git
More information about the Pkg-grass-devel
mailing list