rpms/python-nltk/F-12 nltk-0.9.9-avoid-gtk-runtime-error.patch, NONE, 1.1 python-nltk.spec, 1.13, 1.14
Robin 'cheese' Lee
cheeselee at fedoraproject.org
Tue May 18 17:28:36 UTC 2010
Author: cheeselee
Update of /cvs/pkgs/rpms/python-nltk/F-12
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv31567
Modified Files:
python-nltk.spec
Added Files:
nltk-0.9.9-avoid-gtk-runtime-error.patch
Log Message:
* Wed May 19 2010 Robin Lee <robinlee.sysu at gmail.com> - 1:0.9.9-2
- Added a patch provided by Will Woods to avoid a RuntimeError when importing
gtk
nltk-0.9.9-avoid-gtk-runtime-error.patch:
__init__.py | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
--- NEW FILE nltk-0.9.9-avoid-gtk-runtime-error.patch ---
diff -up nltk-0.9.9/nltk/__init__.py.avoid-gtk-runtime-error nltk-0.9.9/nltk/__init__.py
--- nltk-0.9.9/nltk/__init__.py.avoid-gtk-runtime-error 2009-10-04 20:10:12.000000000 -0400
+++ nltk-0.9.9/nltk/__init__.py 2009-10-04 20:13:20.000000000 -0400
@@ -136,8 +136,13 @@ except ImportError:
warnings.warn("draw module, app module, and gui downloader not loaded "
"(please install Tkinter library).")
else:
- import app, draw
- from downloader import download_gui
+ try:
+ import app, draw
+ from downloader import download_gui
+ except RuntimeError, e:
+ import warnings
+ warnings.warn("draw module, app module, and gui downloader not loaded "
+ "(RuntimeError during import: %s" % str(e))
# override any accidentally imported demo
def demo():
Index: python-nltk.spec
===================================================================
RCS file: /cvs/pkgs/rpms/python-nltk/F-12/python-nltk.spec,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -p -r1.13 -r1.14
--- python-nltk.spec 17 May 2010 13:32:16 -0000 1.13
+++ python-nltk.spec 18 May 2010 17:28:36 -0000 1.14
@@ -6,14 +6,20 @@
Name: python-nltk
Epoch: 1
Version: 0.9.9
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Natural Language Toolkit
Group: Development/Libraries
License: GPLv2
URL: http://www.nltk.org/
Source0: http://nltk.googlecode.com/files/nltk-%{version}%{?prerel}.tar.gz
+# Instead of using the version of yaml provided by this package, we use the one
+# from PyYAML
+# The yaml package provided by this package has been removed in upstream
+# development branch
Patch0: nltk-0.9.9-use-sys-yaml.patch
+# fix 'import gtk' RuntimeError due to a Fedora-specific patch in pygtk2
+Patch1: nltk-0.9.9-avoid-gtk-runtime-error.patch
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildArch: noarch
@@ -32,6 +38,7 @@ research projects.
%prep
%setup -q -n nltk-%{version}%{?prerel}
%patch0 -p1 -b .use-sys-yaml
+%patch1 -p1 -b .avoid-gtk-runtime-error
%build
@@ -74,6 +81,10 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Wed May 19 2010 Robin Lee <robinlee.sysu at gmail.com> - 1:0.9.9-2
+- Added a patch provided by Will Woods to avoid a RuntimeError when importing
+ gtk
+
* Mon May 17 2010 Robin Lee <robinlee.sysu at gmail.com> - 1:0.9.9-1
- Update to 0.9.9 (#527148,#545521)
- Remove specifications for obsolete Fedora versions
More information about the scm-commits
mailing list