ports/graphics/py-mcomix/files/patch-mcomix_run.py
Kai Knoblich 9292818758 graphics/py-mcomix: Fix runtime with graphics/py-pillow 6.0
* Prevent runtime breakage when graphics/py-pillow is updated to 6.0 where
  the deprecated constant "Image.VERSION" is no longer available. [1]

* Add a workaround for the behavior of the "_getexif" function that is still
  buggy with PNG files that contain EXIF meta data. [2]

Also while I'm here:
* Add "gnome" to USES as using USE_GNOME alone is deprecated.

PR:		237887, 237426 (related)
Approved by:	ashish (maintainer)
Obtained from:	upstream [1], https://github.com/multiSnow/mcomix3/issues/76 [2]
2019-05-18 11:15:00 +00:00

15 lines
522 B
Python

--- mcomix/run.py.orig 2016-02-12 18:52:12 UTC
+++ mcomix/run.py
@@ -203,7 +203,11 @@ def run():
try:
import PIL.Image
- assert PIL.Image.VERSION >= '1.1.5'
+ try:
+ assert PIL.Image.VERSION >= '1.1.5'
+ except AttributeError:
+ # Field VERSION deprecated in Pillow 5.2.0 and dropped in 6.0.0
+ assert PIL.__version__ >= '5.2.0'
except AssertionError:
log.error( _("You don't have the required version of the Python Imaging"), end=' ')