[gausssum] Add patch for python-pillow compatibility
Toshio くらとみ
toshio at fedoraproject.org
Tue Feb 5 00:33:33 UTC 2013
commit 288d011cb2db5db3e6a65692e1668825e3077648
Author: Toshio Kuratomi <toshio at fedoraproject.org>
Date: Mon Feb 4 16:33:11 2013 -0800
Add patch for python-pillow compatibility
gausssum-pillow.patch | 26 ++++++++++++++++++++++++++
gausssum.spec | 9 ++++++++-
2 files changed, 34 insertions(+), 1 deletions(-)
---
diff --git a/gausssum-pillow.patch b/gausssum-pillow.patch
new file mode 100644
index 0000000..67399f1
--- /dev/null
+++ b/gausssum-pillow.patch
@@ -0,0 +1,26 @@
+Index: GaussSum-2.2.5/gausssum/plot.py
+===================================================================
+--- GaussSum-2.2.5.orig/gausssum/plot.py
++++ GaussSum-2.2.5/gausssum/plot.py
+@@ -25,13 +25,18 @@ import tkMessageBox # For the Error
+ from tempfile import mkstemp
+
+ from Tkinter import *
+-import Image as PIL # Python Imaging Library
+-import ImageTk # Python Imaging Library
++from PIL import Image # Python Imaging Library
++from PIL import ImageTk # Python Imaging Library
+ from gnupy import Gnuplot
+
+ # Kludge necessary for using PIL when using py2exe
+ # (see http://www.py2exe.org/index.cgi/PIL_and_py2exe)
+-import PngImagePlugin # Python Imaging Library
++from PIL import PngImagePlugin # Python Imaging Library
++
++# Not sure why the code was doing this (via import Image as PIL). Preserve it
++# for now
++PIL = Image
++
+ PIL._initialized = 2
+
+ class DisplayPlot(object):
diff --git a/gausssum.spec b/gausssum.spec
index ca6dc84..3bcd860 100644
--- a/gausssum.spec
+++ b/gausssum.spec
@@ -2,7 +2,7 @@
Name: gausssum
Version: 2.2.5
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: A GUI application for analysis of output of quantum computations
Group: Applications/Engineering
License: GPLv2+
@@ -11,6 +11,9 @@ Source0: http://downloads.sourceforge.net/%{name}/GaussSum-%{version}.tar.gz
Source1: gausssum.desktop
# Patch to use system python-cclib instead of own copy
Patch0: gausssum-cclib.patch
+# Patch to support using python-pillow instead of python-imaging
+# Bug opened upstream
+Patch1: gausssum-pillow.patch
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildArch: noarch
@@ -34,6 +37,7 @@ optimization, UV-Vis/IR/Raman spectra, MO levels, MO contributions and more.
%prep
%setup -q -n GaussSum-%{version}
%patch0 -p1 -b .cclib
+%patch1 -p1 -b .pillow
# Change location of documentation
sed 's|os.path.join(installlocation,"Docs","index.html")|"%{_docdir}/%{name}-%{version}/Docs/index.html"|g' \
gausssum/gausssumgui.py > gausssum/gausssumgui.py.new && \
@@ -95,6 +99,9 @@ rm -rf %{buildroot}
%endif
%changelog
+* Mon Feb 4 2013 Toshio Kuratomi <toshio at fedoraproject.org> - 2.2.5-4
+- Add patch for python-pillow compatibility
+
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.2.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
More information about the scm-commits
mailing list