diff options
author | Michał Górny <mgorny@gentoo.org> | 2021-05-29 18:38:47 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2021-05-29 20:09:42 +0200 |
commit | 166a2b9e8bc84c3e1d83317e29f0e8c8e438eb95 (patch) | |
tree | c195aa3630ef70e993237cf22176b2aa327ac59e /dev-python/nltk | |
parent | dev-python/humanize: Bump to 3.6.0 (diff) | |
download | gentoo-166a2b9e8bc84c3e1d83317e29f0e8c8e438eb95.tar.gz gentoo-166a2b9e8bc84c3e1d83317e29f0e8c8e438eb95.tar.bz2 gentoo-166a2b9e8bc84c3e1d83317e29f0e8c8e438eb95.zip |
dev-python/nltk: Fix python_requires in metadata
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/nltk')
-rw-r--r-- | dev-python/nltk/files/nltk-3.6.2-metadata.patch | 38 | ||||
-rw-r--r-- | dev-python/nltk/nltk-3.6.2-r1.ebuild (renamed from dev-python/nltk/nltk-3.6.2.ebuild) | 4 |
2 files changed, 42 insertions, 0 deletions
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 000000000000..32d4c183000b --- /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 index d03c61527233..c11ff6910967 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 |