summaryrefslogtreecommitdiff
path: root/dev-python/nltk
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-04-12 03:41:30 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-04-12 03:41:30 +0100
commit623ee73d661e5ed8475cb264511f683407d87365 (patch)
tree993eb27c93ec7a2d2d19550300d888fc1fed9e69 /dev-python/nltk
parentceeeb463cc1eef97fd62eaee8bf2196ba04bc384 (diff)
gentoo Easter resync : 12.04.2020
Diffstat (limited to 'dev-python/nltk')
-rw-r--r--dev-python/nltk/Manifest7
-rw-r--r--dev-python/nltk/files/nltk-3.4.5-corpus-tests.patch37
-rw-r--r--dev-python/nltk/nltk-3.2.3.ebuild31
-rw-r--r--dev-python/nltk/nltk-3.2.5.ebuild2
-rw-r--r--dev-python/nltk/nltk-3.4.5.ebuild59
5 files changed, 101 insertions, 35 deletions
diff --git a/dev-python/nltk/Manifest b/dev-python/nltk/Manifest
index 409ef7df2490..bac7758b33fc 100644
--- a/dev-python/nltk/Manifest
+++ b/dev-python/nltk/Manifest
@@ -1,5 +1,6 @@
-DIST nltk-3.2.3.tar.gz 1166282 BLAKE2B 803dc1a8ec80a17538c2164d5ee0eca201be2307bbf3e08093a55cee93e9a539d8b48ea42c8ad84b540922355bf0b151ae04338d8505378a89173159d7464b76 SHA512 2e5c0899c29f61166b2e161e62e81fd35e045bda979fbfa662bf9ad1349be4aae6aabe4b9de34905e2abbc05b06a096480829fd66638efa35cd5c866f76c62e8
+AUX nltk-3.4.5-corpus-tests.patch 1625 BLAKE2B d070e7295ccdda93eae813de2ddd1c6ab3832722ddb815287cc1aa05ee5a3e6619be796d0dbc63a1c389a6f3a8b4eb9630564c2139bc636302d07c2212c446f1 SHA512 495179ae7ce022d1733508013d7a74c01f258a918047337b9d454bdc6f4a2b49a9fa2b77891a0af317ef6b1706802ab90e7c9bd2936fe5dc6f67371dd705c1f2
DIST nltk-3.2.5.tar.gz 1188856 BLAKE2B 316e5955d2f90c351673ee9d3f0cc159babbcae08104518db62e796b422dcbf51668001b06b5d5dc399613d4db0ed39ff7dd15ad15d6f6c64e10c73a4d53bc06 SHA512 967b209ce3dde5296dafac16b91bff3894ff1a3f073c76974fd9193912597c82d2d1c50d4419052da77ab66f798f230f725b83f31368a95cacf94d46e45055de
-EBUILD nltk-3.2.3.ebuild 816 BLAKE2B a52f29769758d3c96bd8a5c00b0264d945c18f7332c056efe8c0fcef2c6abdeea5f10b6502f5e47516b712f95f51d6f51a3395b3d2863479bc509b27cb26930b SHA512 7b7028ca38290e275a6436c3d1b69f884df1252f55c5d5af0b6f1c241371d2c214c46d08d0680b10fd57b63840dbd683bf32c1c6417b3ab569362b0d0b65d140
-EBUILD nltk-3.2.5.ebuild 818 BLAKE2B 747a9cd7006e4c68c20a85653dcc3a122f57abaa7032c544a6995cb859a94b6948c5759cd28f47453df3d60e692ac2515fec46b66326047212944e41daefd603 SHA512 2dec92ee147901346b874a8191905f3e20a9451cc11c42003add86c61f41986e2a29f8f84c05b5d743e4c42dc29f78fe8c2113ecd4238508808f331066da525b
+DIST nltk-3.4.5.tar.gz 2821481 BLAKE2B 9d3d6df9a951b4dfbfec335386ba0fb13c484c74a066141ebdfdb541fbec421dd72163d4028e239abd58f95a73e0eef5861574fa9955e4ee11f2c4598c895f59 SHA512 0ca24cd2154e47a8c50fe8e2426fa01c80904ece4100b07cdb4e5835e423e31968e96f0e750e1936f1e758a608596c560aaaee05b844b334f6179249db05f969
+EBUILD nltk-3.2.5.ebuild 816 BLAKE2B a52f29769758d3c96bd8a5c00b0264d945c18f7332c056efe8c0fcef2c6abdeea5f10b6502f5e47516b712f95f51d6f51a3395b3d2863479bc509b27cb26930b SHA512 7b7028ca38290e275a6436c3d1b69f884df1252f55c5d5af0b6f1c241371d2c214c46d08d0680b10fd57b63840dbd683bf32c1c6417b3ab569362b0d0b65d140
+EBUILD nltk-3.4.5.ebuild 1568 BLAKE2B 4b70352c021c9cbd1d18e38e0cf19ddfcd848071c849fcf6c3d22344d60ac1c1f13e9f364ada4dad5c2c7ac9e5ebbb018b8eacba205ef9b7d8380af8c57d4ebd SHA512 204776e7d1d90548be3e8acb4db7f09a98f53d55a25050300e434754197eb17241b9549079756a1b9e8c6915f875156f4176f4208f6350251f7d6ee366d69cd7
MISC metadata.xml 455 BLAKE2B f7f64dd6f4755438db233c712dbde5cc3aae6f2cd154c207bbef0196569b458a8d26c35b92601e8e79af4cfee7f4f57029d9a892677c477a86bbd8c78fa1da16 SHA512 315f7c1822be51c6fc541323f0b977dc0bb60e129a6bd907cd47ac1247c88e906b3452f2ded4d2071c142fd1d710c674039c95036124177744ad68ecc5ca4bd8
diff --git a/dev-python/nltk/files/nltk-3.4.5-corpus-tests.patch b/dev-python/nltk/files/nltk-3.4.5-corpus-tests.patch
new file mode 100644
index 000000000000..0284aec02b91
--- /dev/null
+++ b/dev-python/nltk/files/nltk-3.4.5-corpus-tests.patch
@@ -0,0 +1,37 @@
+diff --git a/nltk/test/corpus.doctest b/nltk/test/corpus.doctest
+index 5509fe2fd..0a34c9522 100644
+--- a/nltk/test/corpus.doctest
++++ b/nltk/test/corpus.doctest
+@@ -94,7 +94,7 @@ If the reader methods are called without any arguments, they will
+ typically load all documents in the corpus.
+
+ >>> len(inaugural.words())
+- 145735
++ 149797
+
+ If a corpus contains a README file, it can be accessed with a ``readme()`` method:
+
+@@ -387,8 +387,8 @@ examples illustrate the use of the wordlist corpora:
+
+ >>> stopwords.fileids() # doctest: +ELLIPSIS
+ ['arabic', 'azerbaijani', 'danish', 'dutch', 'english', 'finnish', 'french', ...]
+- >>> stopwords.words('portuguese') # doctest: +ELLIPSIS
+- ['de', 'a', 'o', 'que', 'e', 'do', 'da', 'em', 'um', 'para', ...]
++ >>> sorted(stopwords.words('portuguese')) # doctest: +ELLIPSIS
++ ['a', 'ao', 'aos', 'aquela', 'aquelas', 'aquele', 'aqueles', ...]
+ >>> names.fileids()
+ ['female.txt', 'male.txt']
+ >>> names.words('male.txt') # doctest: +ELLIPSIS
+diff --git a/nltk/test/unit/test_wordnet.py b/nltk/test/unit/test_wordnet.py
+index a7b26ac91..a1df3d396 100644
+--- a/nltk/test/unit/test_wordnet.py
++++ b/nltk/test/unit/test_wordnet.py
+@@ -204,7 +204,7 @@ class WordnNetDemo(unittest.TestCase):
+ u'preobrat',
+ u'preobrat_v_miĊĦljenju'
+ ]
+- self.assertEqual(S('about-face.n.02').lemma_names(lang='slv'), expected)
++ self.assertEqual(sorted(S('about-face.n.02').lemma_names(lang='slv')), sorted(expected))
+
+ def test_iterable_type_for_all_lemma_names(self):
+ # Duck-test for iterables.
diff --git a/dev-python/nltk/nltk-3.2.3.ebuild b/dev-python/nltk/nltk-3.2.3.ebuild
deleted file mode 100644
index d683c2517e5d..000000000000
--- a/dev-python/nltk/nltk-3.2.3.ebuild
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-PYTHON_COMPAT=( python3_6 )
-PYTHON_REQ_USE="sqlite,tk?,xml(+)"
-
-inherit distutils-r1
-
-DESCRIPTION="Natural Language Toolkit"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-HOMEPAGE="https://www.nltk.org/"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x86-solaris"
-IUSE="numpy test tk"
-
-RDEPEND="numpy? ( dev-python/numpy[${PYTHON_USEDEP}] )
- dev-python/six[${PYTHON_USEDEP}]"
-DEPEND="${RDEPEND}
- dev-python/setuptools[${PYTHON_USEDEP}]
- test? ( dev-python/nose[${PYTHON_USEDEP}] )"
-
-# currently requires linguistic data to be downloaded separately
-RESTRICT="test"
-
-python_test() {
- nosetests || die "Tests failed under ${EPYTHON}"
-}
diff --git a/dev-python/nltk/nltk-3.2.5.ebuild b/dev-python/nltk/nltk-3.2.5.ebuild
index 8c916caec98b..d683c2517e5d 100644
--- a/dev-python/nltk/nltk-3.2.5.ebuild
+++ b/dev-python/nltk/nltk-3.2.5.ebuild
@@ -14,7 +14,7 @@ HOMEPAGE="https://www.nltk.org/"
LICENSE="Apache-2.0"
SLOT="0"
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x86-solaris"
+KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x86-solaris"
IUSE="numpy test tk"
RDEPEND="numpy? ( dev-python/numpy[${PYTHON_USEDEP}] )
diff --git a/dev-python/nltk/nltk-3.4.5.ebuild b/dev-python/nltk/nltk-3.4.5.ebuild
new file mode 100644
index 000000000000..dd3b389a81ee
--- /dev/null
+++ b/dev-python/nltk/nltk-3.4.5.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6,7} )
+PYTHON_REQ_USE="sqlite,tk?,xml(+)"
+
+inherit distutils-r1
+
+DESCRIPTION="Natural Language Toolkit"
+HOMEPAGE="https://www.nltk.org/ https://github.com/nltk/nltk/"
+SRC_URI="https://github.com/nltk/nltk/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x86-solaris"
+IUSE="tk"
+
+RDEPEND="dev-python/six[${PYTHON_USEDEP}]"
+BDEPEND="
+ test? (
+ dev-python/joblib[${PYTHON_USEDEP}]
+ dev-python/nltk-data
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/pyparsing[${PYTHON_USEDEP}]
+ dev-python/twython[${PYTHON_USEDEP}]
+ sci-libs/scikits_learn[${PYTHON_USEDEP}]
+ sci-libs/scipy[${PYTHON_USEDEP}]
+ )"
+PDEPEND="dev-python/nltk-data"
+
+distutils_enable_tests nose
+
+PATCHES=(
+ "${FILESDIR}"/nltk-3.4.5-corpus-tests.patch
+)
+
+src_prepare() {
+ # requires unpackaged pycrfsuite
+ sed -i -e '/>>>/s@$@ # doctest: +SKIP@' nltk/tag/crf.py || die
+ # replace fetching from network with duplicate file URL
+ sed -e 's@https://raw.githubusercontent.com/nltk/nltk/develop/nltk/test/toy.cfg@nltk:grammars/sample_grammars/toy.cfg@' \
+ -i nltk/test/data.doctest || die
+ # requires X and hangs in Xvfb
+ sed -e 's:test_plot:_&:' \
+ -i nltk/test/unit/test_cfd_mutation.py || die
+
+ distutils-r1_src_prepare
+}
+
+src_test() {
+ cd nltk/test || die
+ distutils-r1_src_test
+}
+
+python_test() {
+ "${EPYTHON}" runtests.py -v || die "Tests failed with ${EPYTHON}"
+}