diff --git a/comix-4.0.4-PIL6-version-deprecation.patch b/comix-4.0.4-PIL6-version-deprecation.patch new file mode 100644 index 0000000..2161cf2 --- /dev/null +++ b/comix-4.0.4-PIL6-version-deprecation.patch @@ -0,0 +1,34 @@ +--- comix-4.0.4/install.py.version 2019-07-30 13:45:43.853075929 +0900 ++++ comix-4.0.4/install.py 2019-07-30 13:51:09.093809043 +0900 +@@ -241,13 +241,13 @@ def check_dependencies(): + required_found = False + try: + from PIL import Image +- assert Image.VERSION >= '1.1.5' ++ assert Image.__version__ >= '1.1.5' + print ' Python Imaging Library ....... OK' + except ImportError: + print ' !!! Python Imaging Library ... Not found' + required_found = False + except AssertionError: +- print ' !!! Python Imaging Library ... version', Image.VERSION, ++ print ' !!! Python Imaging Library ... version', Image.__version__, + print 'found' + print ' !!! Python Imaging Library 1.1.5 or higher is required' + required_found = False +--- comix-4.0.4/src/comix.py.version 2019-07-30 13:45:43.853075929 +0900 ++++ comix-4.0.4/src/comix.py 2019-07-30 13:51:16.054880611 +0900 +@@ -50,11 +50,11 @@ except ImportError: + + try: + from PIL import Image +- assert Image.VERSION >= '1.1.5' ++ assert Image.__version__ >= '1.1.5' + except AssertionError: + print "You don't have the required version of the Python Imaging", + print 'Library (PIL) installed.' +- print 'Installed PIL version is: %s' % Image.VERSION ++ print 'Installed PIL version is: %s' % Image.__version__ + print 'Required PIL version is: 1.1.5 or higher' + sys.exit(1) + except ImportError: diff --git a/comix.spec b/comix.spec index 68ca17f..592bedf 100644 --- a/comix.spec +++ b/comix.spec @@ -11,11 +11,11 @@ %undefine alphatag %define comix4 1 -%define fedorarel 10 +%define fedorarel 11 Name: comix Version: %{mainver} -Release: %{?ifalpha:0.}%{fedorarel}%{?ifalpha:.%alphatag}%{?dist}.1 +Release: %{?ifalpha:0.}%{fedorarel}%{?ifalpha:.%alphatag}%{?dist} Summary: A user-friendly, customizable image viewer URL: http://comix.sourceforge.net/ @@ -44,6 +44,8 @@ Patch5: comix-4.0.4-import-PIL-for-Image.patch # Pillow F-23 3.0.0 API change that tostring is removed # (bug 1290632) Patch6: comix-4.0.4-tobytes.patch +# Pillow 6 removes PIL.VERSION usage +Patch7: comix-4.0.4-PIL6-version-deprecation.patch BuildArch: noarch BuildRequires: python2-devel @@ -77,6 +79,9 @@ uses GTK+ through the PyGTK bindings. %patch4 -p1 -b .p2url %patch5 -p1 -b .pil %patch6 -p1 -b .tobytes +%if 0%{?fedora} >= 31 +%patch7 -p1 -b .version +%endif %{__mkdir_p} TMPBIN cd TMPBIN @@ -165,6 +170,9 @@ desktop-file-install \ %changelog +* Tue Jul 30 2019 Mamoru TASAKA - 4.0.4-11 +- Patch for PIL 6 VERSION usage deprecation + * Wed Jul 24 2019 Fedora Release Engineering - 4.0.4-10.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild