From a1372c9d5ba0b0cdf31ec3ce5902b618568458c02bfee7530cc4a1a585a451b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 8 Jun 2020 06:38:34 +0000 Subject: [PATCH 1/2] Accepting request 812178 from home:jayvdb:coala:python3-bears - Update to v3.5 * add support for Python 3.8 * drop support for Python 2 * create NLTK's own Tokenizer class distinct from the Treebank reference tokeniser * update Vader sentiment analyser * fix JSON serialization of some PoS taggers * minor improvements in grammar.CFG, Vader, pl196x corpus reader, StringTokenizer * change implementation <= and >= for FreqDist so they are partial orders * make FreqDist iterable * correctly handle Penn Treebank trees with a unlabeled branching top node OBS-URL: https://build.opensuse.org/request/show/812178 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nltk?expand=0&rev=33 --- nltk-3.4.5.zip | 3 --- nltk-3.5.zip | 3 +++ python-nltk.changes | 18 ++++++++++++++++++ python-nltk.spec | 26 +++++++++++++++----------- 4 files changed, 36 insertions(+), 14 deletions(-) delete mode 100644 nltk-3.4.5.zip create mode 100644 nltk-3.5.zip diff --git a/nltk-3.4.5.zip b/nltk-3.4.5.zip deleted file mode 100644 index 5ae8c52..0000000 --- a/nltk-3.4.5.zip +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bed45551259aa2101381bbdd5df37d44ca2669c5c3dad72439fa459b29137d94 -size 1450555 diff --git a/nltk-3.5.zip b/nltk-3.5.zip new file mode 100644 index 0000000..799be7a --- /dev/null +++ b/nltk-3.5.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:845365449cd8c5f9731f7cb9f8bd6fd0767553b9d53af9eb1b3abf7700936b35 +size 1433531 diff --git a/python-nltk.changes b/python-nltk.changes index 2402a6c..8ca07dd 100644 --- a/python-nltk.changes +++ b/python-nltk.changes @@ -1,3 +1,21 @@ +------------------------------------------------------------------- +Thu Apr 23 13:54:08 UTC 2020 - John Vandenberg + +- Update to v3.5 + * add support for Python 3.8 + * drop support for Python 2 + * create NLTK's own Tokenizer class distinct from the Treebank + reference tokeniser + * update Vader sentiment analyser + * fix JSON serialization of some PoS taggers + * minor improvements in grammar.CFG, Vader, pl196x corpus reader, + StringTokenizer + * change implementation <= and >= for FreqDist so they are partial + orders + * make FreqDist iterable + * correctly handle Penn Treebank trees with a unlabeled branching + top node + ------------------------------------------------------------------- Sat Mar 14 09:07:16 UTC 2020 - Tomáš Chvátal diff --git a/python-nltk.spec b/python-nltk.spec index e964065..842ad5f 100644 --- a/python-nltk.spec +++ b/python-nltk.spec @@ -1,7 +1,7 @@ # # spec file for package python-nltk # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,22 +17,22 @@ %{!?python_module:%define python_module() python-%{**} python3-%{**}} -%define interps python python3 %define pyname nltk -%bcond_without python2 Name: python-nltk -Version: 3.4.5 +Version: 3.5 Release: 0 Summary: Natural Language Toolkit License: Apache-2.0 URL: http://nltk.org/ Source: https://files.pythonhosted.org/packages/source/n/nltk/%{pyname}-%{version}.zip -BuildRequires: %{interps} +BuildRequires: %{python_module regex} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module six} +BuildRequires: %{pythons} BuildRequires: fdupes BuildRequires: python-rpm-macros BuildRequires: unzip +Requires: python-regex Requires: python-six Recommends: python-gensim Recommends: python-matplotlib @@ -43,13 +43,9 @@ Recommends: python-requests Recommends: python-scikit-learn Recommends: python-scipy Recommends: python-twython +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch -%if %{with python2} -BuildRequires: python-singledispatch -%endif -%ifpython2 -Requires: python-singledispatch -%endif %python_subpackages %description @@ -71,6 +67,7 @@ sed -i "1,4{/\/usr\/bin\/env/d}" nltk/tokenize/stanford_segmenter.py %install %python_install +%python_clone -a %{buildroot}%{_bindir}/nltk %{python_expand %fdupes %{buildroot}%{$python_sitelib}/ chmod -x %{buildroot}%{$python_sitelib}/nltk/test/dependency.doctest @@ -80,10 +77,17 @@ chmod -x %{buildroot}%{$python_sitelib}/nltk/test/dependency.doctest # FOLLOWING http://www.nltk.org/install.html %python_exec -c "import nltk" || exit 1 +%post +%python_install_alternative nltk + +%postun +%python_uninstall_alternative nltk + %files %{python_files} %doc README.md %license LICENSE.txt %{python_sitelib}/%{pyname}/ %{python_sitelib}/%{pyname}-%{version}-py%{python_version}.egg-info/ +%python_alternative %{_bindir}/nltk %changelog From dc693937c40b5816e2bab17d4fdbd5a6b247017a84264813e112403676fb3118 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 8 Jun 2020 06:38:52 +0000 Subject: [PATCH 2/2] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nltk?expand=0&rev=34 --- python-nltk.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/python-nltk.spec b/python-nltk.spec index 842ad5f..1d34cb5 100644 --- a/python-nltk.spec +++ b/python-nltk.spec @@ -18,6 +18,7 @@ %{!?python_module:%define python_module() python-%{**} python3-%{**}} %define pyname nltk +%define skip_python2 1 Name: python-nltk Version: 3.5 Release: 0