65a12d6
%global mod_name nltk
57fd9a7
Name:           python-nltk
7791fd0
Epoch:          1
2cbd704
Version:        3.0.3
5433b67
Release:        2%{?dist}
57fd9a7
Summary:        Natural Language Toolkit
57fd9a7
57fd9a7
Group:          Development/Libraries
f39e9a6
# The entire source code is ASL 2.0 except nltk/stem/porter.py is
f39e9a6
# GPLv2+ with exceptions
f39e9a6
License:        ASL 2.0 and GPLv2+ with exceptions
da2b349
URL:            http://www.nltk.org/
65a12d6
Source0:        http://pypi.python.org/packages/source/n/%{mod_name}/%{mod_name}-%{version}.tar.gz
57fd9a7
BuildArch:      noarch
57fd9a7
65a12d6
BuildRequires:  python2-devel >= 2.5
b9c34b4
BuildRequires:  python-setuptools
65a12d6
Requires:       PyYAML >= 3.09
65a12d6
Requires:       numpy python-matplotlib tkinter
57fd9a7
57fd9a7
%description
57fd9a7
NLTK is a Python package that simplifies the construction of programs
57fd9a7
that process natural language; and defines standard interfaces between
57fd9a7
the different components of an NLP system.  It was designed primarily
57fd9a7
to help teach graduate and undergraduate students about computational
57fd9a7
linguistics; but it is also useful as a framework for implementing
57fd9a7
research projects.
57fd9a7
f39e9a6
%package -n python3-%{mod_name}
f39e9a6
Summary:        Natural Language Toolkit (Python 3)
f39e9a6
BuildRequires:  python3-devel >= 2.5
f39e9a6
BuildRequires:  python3-setuptools
f39e9a6
Requires:       python3-PyYAML >= 3.09
f39e9a6
Requires:       python3-numpy python3-matplotlib python3-tkinter
f39e9a6
f39e9a6
%description -n python3-%{mod_name}
f39e9a6
NLTK is a Python package that simplifies the construction of programs
f39e9a6
that process natural language; and defines standard interfaces between
f39e9a6
the different components of an NLP system.  It was designed primarily
f39e9a6
to help teach graduate and undergraduate students about computational
f39e9a6
linguistics; but it is also useful as a framework for implementing
f39e9a6
research projects.
f39e9a6
f39e9a6
This package provides the Python 3 build of NLTK.
57fd9a7
57fd9a7
%prep
65a12d6
%setup -q -n %{mod_name}-%{version}
57fd9a7
f39e9a6
sed -i -e '/^#! *\//, 1d' %{mod_name}/corpus/reader/knbc.py \
f39e9a6
                          %{mod_name}/test/runtests.py
57fd9a7
57fd9a7
%build
57fd9a7
%{__python} setup.py build
f39e9a6
%{__python3} setup.py build
57fd9a7
c8b6750
57fd9a7
%install
57fd9a7
%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT
f39e9a6
%{__python3} setup.py install --skip-build --root $RPM_BUILD_ROOT
f39e9a6
f39e9a6
f39e9a6
%check
f39e9a6
# skip tests since it requires nltk-data and a few utilities not available in
f39e9a6
# Fedora
f39e9a6
#%%{__python} %%{mod_name}/test/runtests.py
f39e9a6
#%%{__python3} %%{mod_name}/test/runtests.py
57fd9a7
57fd9a7
57fd9a7
%files
57fd9a7
%doc LICENSE.txt README.txt
f39e9a6
%{python_sitelib}/%{mod_name}
f39e9a6
%{python_sitelib}/%{mod_name}-*.egg-info
f39e9a6
f39e9a6
%files -n python3-%{mod_name}
f39e9a6
%doc LICENSE.txt README.txt
f39e9a6
%{python3_sitelib}/%{mod_name}
f39e9a6
%{python3_sitelib}/%{mod_name}-*.egg-info
57fd9a7
57fd9a7
57fd9a7
%changelog
5433b67
* Thu Nov 12 2015 Kalev Lember <klember@redhat.com> - 1:3.0.3-2
5433b67
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
5433b67
2cbd704
* Fri Jul 03 2015 Parag Nemade <pnemade AT fedoraproject DOT org> - 1:3.0.3-1
2cbd704
- Update to 3.0.3
2cbd704
5b957de
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:3.0.0-2
5b957de
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
5b957de
f39e9a6
* Fri Oct 24 2014 Robin Lee <cheeselee@fedoraproject.org> - 1:3.0.0-1
f39e9a6
- Update to 3.0.0, build a python3 subpackage
f39e9a6
- Drop the included distribute_setup.py
f39e9a6
- License specified from 'ASL 2.0' to 'ASL 2.0 and GPLv2+ with exceptions'
f39e9a6
58865b0
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:2.0.4-6
58865b0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
58865b0
76e81a8
* Thu Aug  8 2013 Robin Lee <cheeselee@fedoraproject.org> - 1:2.0.4-5
76e81a8
- Update distribute_setup.py to work with setuptools >= 0.7
76e81a8
17da935
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:2.0.4-4
17da935
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
17da935
b857492
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:2.0.4-3
b857492
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
b857492
b9c34b4
* Wed Dec 12 2012 Robin Lee <cheeselee@fedoraproject.org> - 1:2.0.4-2
b9c34b4
- BuildRequires:  python-setuptools
b9c34b4
65a12d6
* Wed Dec 12 2012 Robin Lee <cheeselee@fedoraproject.org> - 1:2.0.4-1
65a12d6
- Update to 2.0.4
65a12d6
00107ab
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:2.0.1-0.6.rc1
00107ab
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
00107ab
d847bc1
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:2.0.1-0.5.rc1
d847bc1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
d847bc1
52503f5
* Tue Apr 12 2011 Robin Lee <cheeselee@fedoraproject.org> - 1:2.0.1-0.4.rc1
52503f5
- Update to 2.0.1rc1
52503f5
- Requires tkinter
52503f5
d61fc6d
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:2.0-0.4.b9
d61fc6d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
d61fc6d
55489ab
* Mon Aug 30 2010 Robin Lee <robinlee.sysu@gmail.com> - 1:2.0-0.3.b9
55489ab
- update to 2.0b9
55489ab
39dbee8
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 1:2.0-0.2.b8
39dbee8
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
39dbee8
da2b349
* Mon May 17 2010 Robin Lee <robinlee.sysu@gmail.com> - 1:2.0-0.1.b8
da2b349
- Updated to 2.0b8
da2b349
- License switched upstream to ASL 2.0 since 2.0b4
da2b349
- Remove specifications for obsolete Fedora versions
da2b349
- Remove python_sitelib definition
da2b349
- URL and Source0 URL revised
da2b349
- BuildRoot tag removed
da2b349
- BR: tkinter removed, PyYAML added
da2b349
- Requires: tkinter removed
da2b349
- nltk-0.9.2-use-sys-yaml.patch removed
da2b349
- All redundant commands in 'install' section removed
da2b349
- nltk_contrib entry in 'file' section was removed since it will include no
da2b349
  file. Upstream split off a new tarball for nltk-contrib.
da2b349
ff46892
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:0.9.2-4
ff46892
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
ff46892
45e0616
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:0.9.2-3
45e0616
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
45e0616
9bb7a65
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 1:0.9.2-2
9bb7a65
- Rebuild for Python 2.6
9bb7a65
c8b6750
* Mon Apr  7 2008 Michel Salim <salimma@fedoraproject.org> - 1:0.9.2-1
c8b6750
- Update to 0.9.2
c8b6750
b0795f3
* Sat Feb 23 2008 Michel Salim <michel.sylvan@gmail.com> - 1:0.9-2
b0795f3
- Use system PyYAML (bug #432329)
b0795f3
7791fd0
* Sun Jan 20 2008 Michel Salim <michel.sylvan@gmail.com> - 1:0.9-1
7791fd0
- Update to final 0.9
7791fd0
- Add Epoch to clear upgrade path from (old) 1.4.4
7791fd0
f39e9a6
* Sat Sep 22 2007 Michel Salim <michel.sylvan@gmail.com> - 0.9-0.2.b2
885bdb0
- BR on tkinter, it is now needed at build time
885bdb0
57fd9a7
* Fri Sep 21 2007 Michel Salim <michel.sylvan@gmail.com> - 0.9-0.1.b2
57fd9a7
- Updated to 0.9b2
57fd9a7
- Renamed back to python-nltk
57fd9a7
57fd9a7
* Mon Dec 18 2006 Michel Salim <michel.salim@gmail.com> - 0.6.6-2
57fd9a7
- Rebuild for development branch
57fd9a7
57fd9a7
* Mon Oct 30 2006 Michel Salim <michel.salim@gmail.com> - 0.6.6-1
57fd9a7
- Initial package