* [gentoo-commits] repo/gentoo:master commit in: dev-python/nltk/files/, dev-python/nltk/
@ 2021-05-29 18:11 Michał Górny
0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2021-05-29 18:11 UTC (permalink / raw
To: gentoo-commits
commit: 166a2b9e8bc84c3e1d83317e29f0e8c8e438eb95
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat May 29 16:38:47 2021 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat May 29 18:09:42 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=166a2b9e
dev-python/nltk: Fix python_requires in metadata
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/nltk/files/nltk-3.6.2-metadata.patch | 38 ++++++++++++++++++++++
.../{nltk-3.6.2.ebuild => nltk-3.6.2-r1.ebuild} | 4 +++
2 files changed, 42 insertions(+)
diff --git a/dev-python/nltk/files/nltk-3.6.2-metadata.patch b/dev-python/nltk/files/nltk-3.6.2-metadata.patch
new file mode 100644
index 00000000000..32d4c183000
--- /dev/null
+++ b/dev-python/nltk/files/nltk-3.6.2-metadata.patch
@@ -0,0 +1,38 @@
+From f8d834d9ac1e5b26f04cebd8ca6f07ed15935e70 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Sat, 29 May 2021 18:32:53 +0200
+Subject: [PATCH] setup.py: fix python_requires
+
+Fix python_requires to specify a valid version. Apparently, combining
+>= and .* is disallowed, and I'm pretty sure 'just' >=3.5 means
+the same.
+
+To reproduce the problem, you can:
+
+ $ pip install nltk distlib
+ $ python -c "import distlib.database; \
+ distlib.database.DistributionPath().get_distribution('nltk')"
+
+which yields a (not very readable) error of:
+
+ ValueError: '.*' not allowed for '>=' constraints
+---
+ setup.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index 49dc08098..7be160494 100644
+--- a/setup.py
++++ b/setup.py
+@@ -108,7 +108,7 @@ natural language processing. NLTK requires Python 3.5, 3.6, 3.7, 3.8, or 3.9.""
+ "Topic :: Text Processing :: Linguistic",
+ ],
+ package_data={"nltk": ["test/*.doctest", "VERSION"]},
+- python_requires='>=3.5.*',
++ python_requires='>=3.5',
+ install_requires=[
+ "click",
+ "joblib",
+--
+2.31.1
+
diff --git a/dev-python/nltk/nltk-3.6.2.ebuild b/dev-python/nltk/nltk-3.6.2-r1.ebuild
similarity index 97%
rename from dev-python/nltk/nltk-3.6.2.ebuild
rename to dev-python/nltk/nltk-3.6.2-r1.ebuild
index d03c6152723..c11ff691096 100644
--- a/dev-python/nltk/nltk-3.6.2.ebuild
+++ b/dev-python/nltk/nltk-3.6.2-r1.ebuild
@@ -39,6 +39,10 @@ PDEPEND="dev-python/nltk-data"
distutils_enable_tests pytest
+PATCHES=(
+ "${FILESDIR}"/${P}-metadata.patch
+)
+
src_prepare() {
# requires unpackaged pycrfsuite
sed -i -e '/>>>/s@$@ # doctest: +SKIP@' nltk/tag/crf.py || die
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/nltk/files/, dev-python/nltk/
@ 2021-11-26 20:30 Michał Górny
0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2021-11-26 20:30 UTC (permalink / raw
To: gentoo-commits
commit: 2140875c4dafa046e8a658bde1ea0c2defc34faf
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 26 20:27:42 2021 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Nov 26 20:30:17 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2140875c
dev-python/nltk: Fix test failure
Closes: https://bugs.gentoo.org/819921
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/nltk/files/nltk-3.6.5-test.patch | 28 ++++++++++++++++++++++++++++
dev-python/nltk/nltk-3.6.5.ebuild | 7 ++++---
2 files changed, 32 insertions(+), 3 deletions(-)
diff --git a/dev-python/nltk/files/nltk-3.6.5-test.patch b/dev-python/nltk/files/nltk-3.6.5-test.patch
new file mode 100644
index 000000000000..ea4d9512fa74
--- /dev/null
+++ b/dev-python/nltk/files/nltk-3.6.5-test.patch
@@ -0,0 +1,28 @@
+From 9502cb3b5e43a787a16bc2f63ec34c69f9b151c6 Mon Sep 17 00:00:00 2001
+From: Tom Aarsen <Cubiegamedev@gmail.com>
+Date: Tue, 19 Oct 2021 16:49:36 +0200
+Subject: [PATCH] Skip doctest for printing out stopword languages
+
+People with outdated nltk_data will fail these tests, and this test is very vulnerable to updates in nltk_data
+---
+ nltk/test/corpus.doctest | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/nltk/test/corpus.doctest b/nltk/test/corpus.doctest
+index 536ef452f..47a6fea2f 100644
+--- a/nltk/test/corpus.doctest
++++ b/nltk/test/corpus.doctest
+@@ -385,8 +385,8 @@ examples illustrate the use of the wordlist corpora:
+ >>> words.words('en')
+ ['A', 'a', 'aa', 'aal', 'aalii', 'aam', 'Aani', 'aardvark', 'aardwolf', ...]
+
+- >>> stopwords.fileids()
+- ['arabic', 'azerbaijani', 'danish', 'dutch', 'english', 'finnish', 'french', ...]
++ >>> stopwords.fileids() # doctest: +SKIP
++ ['arabic', 'azerbaijani', 'bengali', 'danish', 'dutch', 'english', 'finnish', 'french', ...]
+ >>> sorted(stopwords.words('portuguese'))
+ ['a', 'ao', 'aos', 'aquela', 'aquelas', 'aquele', 'aqueles', ...]
+ >>> names.fileids()
+--
+2.34.1
+
diff --git a/dev-python/nltk/nltk-3.6.5.ebuild b/dev-python/nltk/nltk-3.6.5.ebuild
index 11dd1a3283d2..b706aa229c71 100644
--- a/dev-python/nltk/nltk-3.6.5.ebuild
+++ b/dev-python/nltk/nltk-3.6.5.ebuild
@@ -39,14 +39,15 @@ PDEPEND="dev-python/nltk-data"
distutils_enable_tests pytest
src_prepare() {
+ local PATCHES=(
+ "${FILESDIR}"/${P}-test.patch
+ )
+
# 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
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-11-26 20:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-29 18:11 [gentoo-commits] repo/gentoo:master commit in: dev-python/nltk/files/, dev-python/nltk/ Michał Górny
-- strict thread matches above, loose matches on Subject: below --
2021-11-26 20:30 Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox