summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2019-04-21 14:18:59 +0200
committerDavid Seifert <soap@gentoo.org>2019-04-21 14:18:59 +0200
commit757121ce5abed563609610918426879c3235f60a (patch)
tree5afca97e08d0043db6c05a5a9e3d66d9180d2324 /dev-python
parentdev-libs/icu-layoutex: Bump to version 64.2 (diff)
downloadgentoo-757121ce5abed563609610918426879c3235f60a.tar.gz
gentoo-757121ce5abed563609610918426879c3235f60a.tar.bz2
gentoo-757121ce5abed563609610918426879c3235f60a.zip
dev-python/reportlab: Add patch for >=pillow-6
Package-Manager: Portage-2.3.62, Repoman-2.3.12 Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/reportlab/files/reportlab-3.5.13-pillow-VERSION.patch17
-rw-r--r--dev-python/reportlab/reportlab-3.5.13-r1.ebuild (renamed from dev-python/reportlab/reportlab-3.5.13.ebuild)1
2 files changed, 18 insertions, 0 deletions
diff --git a/dev-python/reportlab/files/reportlab-3.5.13-pillow-VERSION.patch b/dev-python/reportlab/files/reportlab-3.5.13-pillow-VERSION.patch
new file mode 100644
index 000000000000..3b2093d9a8c5
--- /dev/null
+++ b/dev-python/reportlab/files/reportlab-3.5.13-pillow-VERSION.patch
@@ -0,0 +1,17 @@
+--- a/src/reportlab/lib/utils.py
++++ b/src/reportlab/lib/utils.py
+@@ -883,7 +883,13 @@
+ im = self._image
+ mode = self.mode = im.mode
+ if mode in ('LA','RGBA'):
+- if Image.VERSION.startswith('1.1.7'): im.load()
++ # Pillow 6.0.0 and above have removed the 'VERSION' attribute
++ # https://bitbucket.org/rptlab/reportlab/issues/176/incompatibility-with-pillow-600
++ try:
++ im_ver = Image.__version__
++ except AttributeError:
++ im_ver = Image.VERSION
++ if im_ver.startswith('1.1.7'): im.load()
+ self._dataA = ImageReader(im.split()[3 if mode=='RGBA' else 1])
+ nm = mode[:-1]
+ im = im.convert(nm)
diff --git a/dev-python/reportlab/reportlab-3.5.13.ebuild b/dev-python/reportlab/reportlab-3.5.13-r1.ebuild
index 26d754790dd7..77800e21ecca 100644
--- a/dev-python/reportlab/reportlab-3.5.13.ebuild
+++ b/dev-python/reportlab/reportlab-3.5.13-r1.ebuild
@@ -29,6 +29,7 @@ DEPEND="${RDEPEND}
PATCHES=(
"${FILESDIR}/${PN}-3.5.13-disable-network-tests.patch"
+ "${FILESDIR}/${PN}-3.5.13-pillow-VERSION.patch"
)
src_unpack() {