Mageia Bugzilla – Attachment 4198 Details for
Bug 10729
After the Upgrade to python-pillow, PySolFC cannot load .jpg files as table tiles.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
Patch to update PySolFC for Pillow - but there's a segfault
pysolfc-fix-pillow.patch (text/plain), 2.55 KB, created by
Shlomi Fish
on 2013-07-08 17:22:15 CEST
(
hide
)
Description:
Patch to update PySolFC for Pillow - but there's a segfault
Filename:
MIME Type:
Creator:
Shlomi Fish
Created:
2013-07-08 17:22:15 CEST
Size:
2.55 KB
patch
obsolete
>Index: SOURCES/PySolFC-pillow.patch >=================================================================== >--- SOURCES/PySolFC-pillow.patch (revision 0) >+++ SOURCES/PySolFC-pillow.patch (working copy) >@@ -0,0 +1,44 @@ >+Index: PySolFC-2.0/pysollib/mfxutil.py >+=================================================================== >+--- PySolFC-2.0.orig/pysollib/mfxutil.py >++++ PySolFC-2.0/pysollib/mfxutil.py >+@@ -41,18 +41,18 @@ from settings import PACKAGE, TOOLKIT >+ Image = ImageTk = ImageOps = None >+ if TOOLKIT == 'tk': >+ try: # PIL >+- import Image >+- import ImageTk >+- import ImageOps >++ from PIL import Image >++ from PIL import ImageTk >++ from PIL import ImageOps >+ except ImportError: >+ Image = None >+ else: >+ # for py2exe >+- import GifImagePlugin >+- import PngImagePlugin >+- import JpegImagePlugin >+- import BmpImagePlugin >+- import PpmImagePlugin >++ from PIL import GifImagePlugin >++ from PIL import PngImagePlugin >++ from PIL import JpegImagePlugin >++ from PIL import BmpImagePlugin >++ from PIL import PpmImagePlugin >+ Image._initialized = 2 >+ >+ >+Index: PySolFC-2.0/scripts/cardset_viewer.py >+=================================================================== >+--- PySolFC-2.0.orig/scripts/cardset_viewer.py >++++ PySolFC-2.0/scripts/cardset_viewer.py >+@@ -7,7 +7,7 @@ from glob import glob >+ from math import sqrt, sin, cos, pi >+ from Tkinter import * >+ try: >+- import Image, ImageTk >++ from PIL import Image, ImageTk >+ except ImportError: >+ Image = None >+ > >Property changes on: SOURCES/PySolFC-pillow.patch >___________________________________________________________________ >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Index: SPECS/PySolFC.spec >=================================================================== >--- SPECS/PySolFC.spec (revision 451429) >+++ SPECS/PySolFC.spec (working copy) >@@ -1,9 +1,10 @@ > > Name: PySolFC > Version: 2.0 >-Release: %mkrel 11 >+Release: %mkrel 12 > Summary: A Python solitaire game collection > Source0: http://downloads.sourceforge.net/pysolfc/%{name}-%{version}.tar.bz2 >+Patch1: PySolFC-pillow.patch > License: GPLv3+ > Group: Games/Cards > URL: http://pysolfc.sourceforge.net/ >@@ -13,6 +14,7 @@ > BuildRequires: python-setuptools > Requires: tkinter > Requires: python-imaging >+Requires: python-pillow-tk > Requires: pygame > Suggests: PySolFC-cardsets > Suggests: freecell-solver >@@ -28,6 +30,7 @@ > > %prep > %setup -q >+%patch1 -p1 -b .pillow > > %build > %{__python} setup.py build
Index: SOURCES/PySolFC-pillow.patch =================================================================== --- SOURCES/PySolFC-pillow.patch (revision 0) +++ SOURCES/PySolFC-pillow.patch (working copy) @@ -0,0 +1,44 @@ +Index: PySolFC-2.0/pysollib/mfxutil.py +=================================================================== +--- PySolFC-2.0.orig/pysollib/mfxutil.py ++++ PySolFC-2.0/pysollib/mfxutil.py +@@ -41,18 +41,18 @@ from settings import PACKAGE, TOOLKIT + Image = ImageTk = ImageOps = None + if TOOLKIT == 'tk': + try: # PIL +- import Image +- import ImageTk +- import ImageOps ++ from PIL import Image ++ from PIL import ImageTk ++ from PIL import ImageOps + except ImportError: + Image = None + else: + # for py2exe +- import GifImagePlugin +- import PngImagePlugin +- import JpegImagePlugin +- import BmpImagePlugin +- import PpmImagePlugin ++ from PIL import GifImagePlugin ++ from PIL import PngImagePlugin ++ from PIL import JpegImagePlugin ++ from PIL import BmpImagePlugin ++ from PIL import PpmImagePlugin + Image._initialized = 2 + + +Index: PySolFC-2.0/scripts/cardset_viewer.py +=================================================================== +--- PySolFC-2.0.orig/scripts/cardset_viewer.py ++++ PySolFC-2.0/scripts/cardset_viewer.py +@@ -7,7 +7,7 @@ from glob import glob + from math import sqrt, sin, cos, pi + from Tkinter import * + try: +- import Image, ImageTk ++ from PIL import Image, ImageTk + except ImportError: + Image = None + Property changes on: SOURCES/PySolFC-pillow.patch ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: SPECS/PySolFC.spec =================================================================== --- SPECS/PySolFC.spec (revision 451429) +++ SPECS/PySolFC.spec (working copy) @@ -1,9 +1,10 @@ Name: PySolFC Version: 2.0 -Release: %mkrel 11 +Release: %mkrel 12 Summary: A Python solitaire game collection Source0: http://downloads.sourceforge.net/pysolfc/%{name}-%{version}.tar.bz2 +Patch1: PySolFC-pillow.patch License: GPLv3+ Group: Games/Cards URL: http://pysolfc.sourceforge.net/ @@ -13,6 +14,7 @@ BuildRequires: python-setuptools Requires: tkinter Requires: python-imaging +Requires: python-pillow-tk Requires: pygame Suggests: PySolFC-cardsets Suggests: freecell-solver @@ -28,6 +30,7 @@ %prep %setup -q +%patch1 -p1 -b .pillow %build %{__python} setup.py build
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 10729
: 4198 |
4199