summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2022-02-09 20:32:03 +0100
committerMichał Górny <mgorny@gentoo.org>2022-02-09 20:34:48 +0100
commiteb4e911aacdeed47cab0f6993c32ae63f5f35b89 (patch)
tree3ebabcb79311113463d7f039246994d4adf7ff17 /dev-python/nltk
parentdev-python/google-api-python-client: Bump to 2.37.0 (diff)
downloadgentoo-eb4e911aacdeed47cab0f6993c32ae63f5f35b89.tar.gz
gentoo-eb4e911aacdeed47cab0f6993c32ae63f5f35b89.tar.bz2
gentoo-eb4e911aacdeed47cab0f6993c32ae63f5f35b89.zip
dev-python/nltk: Bump to 3.7
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/nltk')
-rw-r--r--dev-python/nltk/Manifest1
-rw-r--r--dev-python/nltk/nltk-3.7.ebuild62
2 files changed, 63 insertions, 0 deletions
diff --git a/dev-python/nltk/Manifest b/dev-python/nltk/Manifest
index 665b93603c3e..9c3afac3c2e8 100644
--- a/dev-python/nltk/Manifest
+++ b/dev-python/nltk/Manifest
@@ -1 +1,2 @@
DIST nltk-3.6.7.tar.gz 2848416 BLAKE2B 8bc6672c17741c93da15b3c4ec9af484915ffd9fc857dbbfa94d949063c8e44c5f672e076b69213a033b7bec8e14baa099c69748eef4688fa09635de662f5037 SHA512 07f117835e1bf99d73a03f1279da0104a955e36f41c9648be19652481c58758900d5d2ff4633203254cee1e27c6cc129fe5d6e388de0711f2052e3e76a746edf
+DIST nltk-3.7.tar.gz 2851947 BLAKE2B 4cd4fed9f26de7996bcabbd71d500c072489e79ae0edb29f09577e465227c948efa7130af6975b029e77fb79db015437a9e3311eb28048d02dcc2356441d0908 SHA512 66d79afa59f18f2bf7d086dcb22813c7b92239c05669daa62866dbda06c0ca22367317749cf19db3e41a7bdb405d4f87f72b695aa58fd0669bf36de64f1f9888
diff --git a/dev-python/nltk/nltk-3.7.ebuild b/dev-python/nltk/nltk-3.7.ebuild
new file mode 100644
index 000000000000..8dc37fd9eb91
--- /dev/null
+++ b/dev-python/nltk/nltk-3.7.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{8..10} )
+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-solaris"
+IUSE="tk"
+
+RDEPEND="
+ dev-python/click[${PYTHON_USEDEP}]
+ dev-python/joblib[${PYTHON_USEDEP}]
+ dev-python/regex[${PYTHON_USEDEP}]
+ dev-python/tqdm[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ test? (
+ dev-python/joblib[${PYTHON_USEDEP}]
+ >=dev-python/nltk-data-20211221
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/pyparsing[${PYTHON_USEDEP}]
+ dev-python/pytest-mock[${PYTHON_USEDEP}]
+ dev-python/twython[${PYTHON_USEDEP}]
+ sci-libs/scikit-learn[${PYTHON_USEDEP}]
+ dev-python/scipy[${PYTHON_USEDEP}]
+ dev-python/matplotlib[${PYTHON_USEDEP}]
+ )"
+PDEPEND="dev-python/nltk-data"
+
+distutils_enable_tests pytest
+
+EPYTEST_DESELECT=(
+ # Internet
+ unit/test_downloader.py::test_downloader_using_existing_parent_download_dir
+ unit/test_downloader.py::test_downloader_using_non_existing_parent_download_dir
+)
+
+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
+
+ distutils-r1_src_prepare
+}
+
+src_test() {
+ cd nltk/test || die
+ distutils-r1_src_test
+}