[python-nltk] Update to 3.0.0, build a python3 subpackage
李瑞彬
cheeselee at fedoraproject.org
Sun Oct 26 09:02:03 UTC 2014
commit f39e9a6edc359655d9524b722143ad60a029cf6a
Author: Robin Lee <cheeselee at fedoraproject.org>
Date: Sun Oct 26 17:05:09 2014 +0800
Update to 3.0.0, build a python3 subpackage
- Drop the included distribute_setup.py
- License specified from 'ASL 2.0' to 'ASL 2.0 and GPLv2+ with exceptions'
.gitignore | 1 +
distribute_setup.py | 556 ---------------------------------------------------
python-nltk.spec | 58 ++++--
sources | 2 +-
4 files changed, 47 insertions(+), 570 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 1bb912c..b346ab0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@ nltk-2.0b8.tar.gz
/nltk-2.0b9.tar.gz
/nltk-2.0.1rc1.tar.gz
/nltk-2.0.4.tar.gz
+/nltk-3.0.0.tar.gz
diff --git a/python-nltk.spec b/python-nltk.spec
index 8ba3eda..f96d290 100644
--- a/python-nltk.spec
+++ b/python-nltk.spec
@@ -1,22 +1,20 @@
%global mod_name nltk
Name: python-nltk
Epoch: 1
-Version: 2.0.4
-Release: 6%{?dist}
+Version: 3.0.0
+Release: 1%{?dist}
Summary: Natural Language Toolkit
Group: Development/Libraries
-License: ASL 2.0
+# The entire source code is ASL 2.0 except nltk/stem/porter.py is
+# GPLv2+ with exceptions
+License: ASL 2.0 and GPLv2+ with exceptions
URL: http://www.nltk.org/
Source0: http://pypi.python.org/packages/source/n/%{mod_name}/%{mod_name}-%{version}.tar.gz
-# Lastest distribute bootstrap module, needed for using setuptools >= 0.7 (Fedora 20 change)
-# URL content may change
-Source1: http://python-distribute.org/distribute_setup.py
BuildArch: noarch
BuildRequires: python2-devel >= 2.5
BuildRequires: python-setuptools
-BuildRequires: PyYAML >= 3.09
Requires: PyYAML >= 3.09
Requires: numpy python-matplotlib tkinter
@@ -28,29 +26,63 @@ to help teach graduate and undergraduate students about computational
linguistics; but it is also useful as a framework for implementing
research projects.
+%package -n python3-%{mod_name}
+Summary: Natural Language Toolkit (Python 3)
+BuildRequires: python3-devel >= 2.5
+BuildRequires: python3-setuptools
+Requires: python3-PyYAML >= 3.09
+Requires: python3-numpy python3-matplotlib python3-tkinter
+
+%description -n python3-%{mod_name}
+NLTK is a Python package that simplifies the construction of programs
+that process natural language; and defines standard interfaces between
+the different components of an NLP system. It was designed primarily
+to help teach graduate and undergraduate students about computational
+linguistics; but it is also useful as a framework for implementing
+research projects.
+
+This package provides the Python 3 build of NLTK.
%prep
%setup -q -n %{mod_name}-%{version}
-cp %SOURCE1 .
+sed -i -e '/^#! *\//, 1d' %{mod_name}/corpus/reader/knbc.py \
+ %{mod_name}/test/runtests.py
%build
%{__python} setup.py build
+%{__python3} setup.py build
%install
%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT
-sed -i -e '/^#! *\//, 1d' $RPM_BUILD_ROOT%{python_sitelib}/nltk/corpus/reader/knbc.py \
- $RPM_BUILD_ROOT%{python_sitelib}/nltk/test/{runtests,doctest_driver}.py
+%{__python3} setup.py install --skip-build --root $RPM_BUILD_ROOT
+
+
+%check
+# skip tests since it requires nltk-data and a few utilities not available in
+# Fedora
+#%%{__python} %%{mod_name}/test/runtests.py
+#%%{__python3} %%{mod_name}/test/runtests.py
%files
%doc LICENSE.txt README.txt
-%{python_sitelib}/nltk
-%{python_sitelib}/nltk-*.egg-info
+%{python_sitelib}/%{mod_name}
+%{python_sitelib}/%{mod_name}-*.egg-info
+
+%files -n python3-%{mod_name}
+%doc LICENSE.txt README.txt
+%{python3_sitelib}/%{mod_name}
+%{python3_sitelib}/%{mod_name}-*.egg-info
%changelog
+* Fri Oct 24 2014 Robin Lee <cheeselee at fedoraproject.org> - 1:3.0.0-1
+- Update to 3.0.0, build a python3 subpackage
+- Drop the included distribute_setup.py
+- License specified from 'ASL 2.0' to 'ASL 2.0 and GPLv2+ with exceptions'
+
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1:2.0.4-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
@@ -121,7 +153,7 @@ sed -i -e '/^#! *\//, 1d' $RPM_BUILD_ROOT%{python_sitelib}/nltk/corpus/reader/kn
- Update to final 0.9
- Add Epoch to clear upgrade path from (old) 1.4.4
-* Fri Sep 22 2007 Michel Salim <michel.sylvan at gmail.com> - 0.9-0.2.b2
+* Sat Sep 22 2007 Michel Salim <michel.sylvan at gmail.com> - 0.9-0.2.b2
- BR on tkinter, it is now needed at build time
* Fri Sep 21 2007 Michel Salim <michel.sylvan at gmail.com> - 0.9-0.1.b2
diff --git a/sources b/sources
index e8627b1..67ac2d4 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-b17aad070ae9a094538e4b481409db09 nltk-2.0.4.tar.gz
+832c86763d470264c4e75964a44d2c96 nltk-3.0.0.tar.gz
More information about the scm-commits
mailing list