Gentoo Archives: gentoo-commits

From: "Robin H. Johnson (robbat2)" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sci-geosciences/tilecache/files: tilecache-2.11-pil.patch
Date: Sat, 09 Nov 2013 19:22:04
Message-Id: 20131109192159.6A7F22004B@flycatcher.gentoo.org
1 robbat2 13/11/09 19:21:59
2
3 Added: tilecache-2.11-pil.patch
4 Log:
5 Bug #471550: Fix PIL usage. Also migrate from dev-python/imaging to virtual/python-imaging and to distutils-r1 & EAPI5.
6
7 (Portage version: 2.2.7/cvs/Linux x86_64, unsigned Manifest commit)
8
9 Revision Changes Path
10 1.1 sci-geosciences/tilecache/files/tilecache-2.11-pil.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-geosciences/tilecache/files/tilecache-2.11-pil.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-geosciences/tilecache/files/tilecache-2.11-pil.patch?rev=1.1&content-type=text/plain
14
15 Index: tilecache-2.11-pil.patch
16 ===================================================================
17 diff -Nuar tilecache-2.11.orig/TileCache/Layer.py tilecache-2.11/TileCache/Layer.py
18 --- tilecache-2.11.orig/TileCache/Layer.py 2010-10-15 04:00:18.000000000 -0700
19 +++ tilecache-2.11/TileCache/Layer.py 2013-11-09 11:05:17.620475332 -0800
20 @@ -391,7 +391,7 @@
21 return MetaTile(self, x, y, tile.z)
22
23 def renderMetaTile (self, metatile, tile):
24 - import StringIO, Image
25 + import StringIO, PIL.Image as Image
26
27 data = self.renderTile(metatile)
28 image = Image.open( StringIO.StringIO(data) )
29 @@ -444,7 +444,7 @@
30 return self.renderTile(tile)
31
32 def watermark (self, img):
33 - import StringIO, Image, ImageEnhance
34 + import StringIO, PIL.Image as Image, PIL.ImageEnhance as ImageEnhance
35 tileImage = Image.open( StringIO.StringIO(img) )
36 wmark = Image.open(self.watermarkimage)
37 assert self.watermarkopacity >= 0 and self.watermarkopacity <= 1