forked from pool/python-nltk
Accepting request 558587 from home:badshah400:branches:devel:languages:python
- Update to version 3.2.5: * Arabic stemmers (ARLSTem, Snowball) * NIST MT evaluation metric and added NIST international_tokenize * Moses tokenizer * Document Russian tagger * Fix to Stanford segmenter * Improve treebank detokenizer, VerbNet, Vader * Misc code and documentation cleanups * Implement fixes suggested by LGTM - Convert specfile to python single-spec style. - Drop unneeded BuildRequires: python-PyYAML, python-xml, python-devel; not required for building. - Change existing Requires to Recommends: these are really needed for additional features, and not required for basic nltk usage. - Add new Recommends: python-scipy, python-matplotlib, python-pyparsing, and python-gensim; enables other optional features. - Run fdupes to link-up duplicate files. - Remove exec permissions for a file not intended to be executed (not in exec path, no hashbang, etc.) - Remove hashbangs from non-executable files. - Run tests following the suggestion from http://www.nltk.org/install.html. OBS-URL: https://build.opensuse.org/request/show/558587 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nltk?expand=0&rev=9
This commit is contained in:
parent
d90d33d859
commit
75a9f175cc
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1b37db344770021c9be3d68f48d1667a8dae6eeff0e502b7bfb01638d288a88e
|
||||
size 1153499
|
3
nltk-3.2.5.tar.gz
Normal file
3
nltk-3.2.5.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2661f9971d983db314bbebd51ba770811a362c6597fd0f303bb1d3beadcb4834
|
||||
size 1188856
|
@ -1,3 +1,31 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 19 15:50:13 UTC 2017 - badshah400@gmail.com
|
||||
|
||||
- Update to version 3.2.5:
|
||||
* Arabic stemmers (ARLSTem, Snowball)
|
||||
* NIST MT evaluation metric and added NIST
|
||||
international_tokenize
|
||||
* Moses tokenizer
|
||||
* Document Russian tagger
|
||||
* Fix to Stanford segmenter
|
||||
* Improve treebank detokenizer, VerbNet, Vader
|
||||
* Misc code and documentation cleanups
|
||||
* Implement fixes suggested by LGTM
|
||||
- Convert specfile to python single-spec style.
|
||||
- Drop unneeded BuildRequires: python-PyYAML, python-xml,
|
||||
python-devel; not required for building.
|
||||
- Change existing Requires to Recommends: these are really needed
|
||||
for additional features, and not required for basic nltk usage.
|
||||
- Add new Recommends: python-scipy, python-matplotlib,
|
||||
python-pyparsing, and python-gensim; enables other optional
|
||||
features.
|
||||
- Run fdupes to link-up duplicate files.
|
||||
- Remove exec permissions for a file not intended to be executed
|
||||
(not in exec path, no hashbang, etc.)
|
||||
- Remove hashbangs from non-executable files.
|
||||
- Run tests following the suggestion from
|
||||
http://www.nltk.org/install.html.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 21 13:11:31 UTC 2017 - stephan.barth@suse.com
|
||||
|
||||
|
@ -16,29 +16,26 @@
|
||||
#
|
||||
|
||||
|
||||
%define pyname nltk
|
||||
Name: python-nltk
|
||||
Version: 3.2.2
|
||||
Version: 3.2.5
|
||||
Release: 0
|
||||
Url: http://nltk.org/
|
||||
Summary: Natural Language Toolkit
|
||||
License: Apache-2.0
|
||||
Group: Development/Languages/Python
|
||||
Source: https://files.pythonhosted.org/packages/source/n/nltk/nltk-%{version}.tar.gz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Url: http://nltk.org/
|
||||
Source: https://files.pythonhosted.org/packages/source/n/nltk/%{pyname}-%{version}.tar.gz
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module six}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-PyYAML
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: python-setuptools
|
||||
BuildRequires: python-xml
|
||||
Requires: python-PyYAML
|
||||
Requires: python-numpy
|
||||
Requires: python-tk
|
||||
Requires: python-xml
|
||||
%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
|
||||
Recommends: python-gensim
|
||||
Recommends: python-matplotlib
|
||||
Recommends: python-numpy
|
||||
Recommends: python-pyparsing
|
||||
Recommends: python-requests
|
||||
Recommends: python-scipy
|
||||
BuildArch: noarch
|
||||
%endif
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
NLTK -- the Natural Language Toolkit -- is a suite of open source
|
||||
@ -46,18 +43,31 @@ Python modules, data sets and tutorials supporting research and
|
||||
development in Natural Language Processing.
|
||||
|
||||
%prep
|
||||
%setup -q -n nltk-%{version}
|
||||
%setup -q -n %{pyname}-%{version}
|
||||
|
||||
sed -i "1,4{/\/usr\/bin\/env/d}" nltk/corpus/reader/knbc.py
|
||||
sed -i "1,4{/\/usr\/bin\/env/d}" nltk/test/runtests.py
|
||||
sed -i "1,4{/\/usr\/bin\/env/d}" nltk/test/unit/test_tgrep.py
|
||||
sed -i "1,4{/\/usr\/bin\/env/d}" nltk/tgrep.py
|
||||
sed -i "1,4{/\/usr\/bin\/env/d}" nltk/tokenize/stanford_segmenter.py
|
||||
|
||||
%build
|
||||
python setup.py build
|
||||
%python_build
|
||||
|
||||
%install
|
||||
python setup.py install --prefix=%{_prefix} --root="%{buildroot}"
|
||||
%fdupes $RPM_BUILD_ROOT/
|
||||
%python_install
|
||||
|
||||
%files
|
||||
%defattr(-, root, root)
|
||||
%{python_expand %fdupes -s %{buildroot}%{$python_sitelib}/
|
||||
chmod -x %{buildroot}%{$python_sitelib}/nltk/test/dependency.doctest
|
||||
}
|
||||
|
||||
%check
|
||||
# FOLLOWING http://www.nltk.org/install.html
|
||||
%python_exec -c "import nltk" || exit 1
|
||||
|
||||
%files %{python_files}
|
||||
%doc LICENSE.txt
|
||||
%{python_sitelib}/*
|
||||
%{python_sitelib}/%{pyname}/
|
||||
%{python_sitelib}/%{pyname}-%{version}-py%{py_ver}.egg-info/
|
||||
|
||||
%changelog
|
||||
|
Loading…
Reference in New Issue
Block a user