From 05e79db05a9e81cc1cd3d5403849763df6037005e4f228f2ffd6c16f0cdd1a92 Mon Sep 17 00:00:00 2001
From: Denisart Benjamin 
Date: Sun, 8 Dec 2013 13:34:47 +0000
Subject: [PATCH] Accepting request 209813 from
 home:posophe:branches:devel:languages:python
update
OBS-URL: https://build.opensuse.org/request/show/209813
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nltk?expand=0&rev=5
---
 nltk-2.0.1rc1.tar.gz                        |  3 ---
 nltk-2.0.4-dont-use-python-distribute.patch | 12 ++++++++++++
 nltk-2.0.4.tar.gz                           |  3 +++
 python-nltk.changes                         |  8 ++++++++
 python-nltk.spec                            | 17 +++++++++--------
 5 files changed, 32 insertions(+), 11 deletions(-)
 delete mode 100644 nltk-2.0.1rc1.tar.gz
 create mode 100644 nltk-2.0.4-dont-use-python-distribute.patch
 create mode 100644 nltk-2.0.4.tar.gz
diff --git a/nltk-2.0.1rc1.tar.gz b/nltk-2.0.1rc1.tar.gz
deleted file mode 100644
index c6e195b..0000000
--- a/nltk-2.0.1rc1.tar.gz
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:b595a204495292aa820c5ebc612464ec2ee8a7df3bcddd5392ccc8e886fec534
-size 1958214
diff --git a/nltk-2.0.4-dont-use-python-distribute.patch b/nltk-2.0.4-dont-use-python-distribute.patch
new file mode 100644
index 0000000..44c48fa
--- /dev/null
+++ b/nltk-2.0.4-dont-use-python-distribute.patch
@@ -0,0 +1,12 @@
+--- a/setup.py
++++ b/setup.py
+@@ -19,9 +19,6 @@
+ with open(version_file) as fh:
+     nltk_version = fh.read().strip()
+ 
+-import distribute_setup
+-distribute_setup.use_setuptools()
+-
+ from setuptools import setup, find_packages
+ 
+ #
diff --git a/nltk-2.0.4.tar.gz b/nltk-2.0.4.tar.gz
new file mode 100644
index 0000000..458fc29
--- /dev/null
+++ b/nltk-2.0.4.tar.gz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a554d6b9c5c7c8b597a090d8848a6f78c6fc4665ae43c9a6a6d6a5b207d98c65
+size 955978
diff --git a/python-nltk.changes b/python-nltk.changes
index e4c1aa6..b70d203 100644
--- a/python-nltk.changes
+++ b/python-nltk.changes
@@ -1,3 +1,11 @@
+-------------------------------------------------------------------
+Sun Dec  8 13:33:14 UTC 2013 - p.drouand@gmail.com
+
+- Update to version 2.0.4
+  + No changelog available
+- Add nltk-2.0.4-dont-use-python-distribute.patch ; force use of
+  python-setuptools instead of python-distribute
+
 -------------------------------------------------------------------
 Thu Oct 24 11:09:19 UTC 2013 - speilicke@suse.com
 
diff --git a/python-nltk.spec b/python-nltk.spec
index 2409f4c..0f7f587 100644
--- a/python-nltk.spec
+++ b/python-nltk.spec
@@ -17,13 +17,16 @@
 
 
 Name:           python-nltk
-Version:        2.0.1rc1
+Version:        2.0.4
 Release:        0
 Url:            http://nltk.org/
 Summary:        Natural Language Toolkit
 License:        Apache-2.0
-Group:          Development/Libraries/Python
+Group:          Development/Languages/Python
 Source:         http://pypi.python.org/packages/source/n/nltk/nltk-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM nltk-2.0.4-dont-use-python-distribute.patch --setup script wan't import setuptools from distribute at first
+# and try to download it
+Patch:          nltk-2.0.4-dont-use-python-distribute.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  python-devel
 BuildRequires:  python-setuptools
@@ -33,14 +36,11 @@ Requires:       python-numpy
 Requires:       python-tk
 Requires:       python-xml
 Requires:       python-yaml
-%if 0%{?suse_version}
-Recommends:     python-matplotlib
-%py_requires
-%if 0%{?suse_version} > 1110
+%if 0%{?suse_version} && 0%{?suse_version} <= 1110
+%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
+%else
 BuildArch:      noarch
 %endif
-%endif
-%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
 
 %description
 NLTK -- the Natural Language Toolkit -- is a suite of open source
@@ -49,6 +49,7 @@ development in Natural Language Processing.
 
 %prep
 %setup -q -n nltk-%{version}
+%patch -p1
 
 %build
 python setup.py build