diff options
Diffstat (limited to 'dev-python/rapidfuzz')
-rw-r--r-- | dev-python/rapidfuzz/Manifest | 5 | ||||
-rw-r--r-- | dev-python/rapidfuzz/files/rapidfuzz-2.9.0-test-pandas.patch | 35 | ||||
-rw-r--r-- | dev-python/rapidfuzz/metadata.xml | 9 | ||||
-rw-r--r-- | dev-python/rapidfuzz/rapidfuzz-2.9.0.ebuild | 41 |
4 files changed, 78 insertions, 12 deletions
diff --git a/dev-python/rapidfuzz/Manifest b/dev-python/rapidfuzz/Manifest index 67a6178a7fc4..623547bf1b7d 100644 --- a/dev-python/rapidfuzz/Manifest +++ b/dev-python/rapidfuzz/Manifest @@ -1,3 +1,4 @@ +AUX rapidfuzz-2.9.0-test-pandas.patch 1153 BLAKE2B a4f707ed63fc73199c29e9b9f63d9e02a4eb2b4ebefe3a40b72ce4133221f19f0b0b0eed59f07fa15996bda16a826df042eed3399681ed3efe7dde63bb3aaceb SHA512 1bf18ba7fad414c31a254429b47a2a2ac84fb63a7f3898f376bff4396dd1c6fba0eb8c408b735e869f8cd34e9fedaec37056171408a5904f272cb5147dd20b5e DIST rapidfuzz-2.9.0.tar.gz 780939 BLAKE2B c43dfd89d18dc1f5b4738930f1d0d9c4956f66479217b4400844b50636e2b0bb13f15d8b9a6edc0ce30fc943f35a44dad802ecf90107556ed2dee7f70fcc16ac SHA512 b8f83cc35e84a4ed95e2086eb7bfbc6e7e2e25a05accc965092b8b51012c79e86e2af15397577bb91aadfa9a257a62d6f3d6bb9bf928a9c767d53468904a12be -EBUILD rapidfuzz-2.9.0.ebuild 529 BLAKE2B 6cded32992abdbfe9d50d1497ed654af473eb9edf46653276896d8e4454d4e14bd93cede44337c62066b9414b6ac8545326b3c44382d4b429f196996198f8d0f SHA512 6bdcf73f21d54da39940ae7f6d45fdb9d724e33f27a26996084d35b7511b8931ff00d4d5a166908459fa0ad29550a7bd88ed52f428112e38152cdbb37d75d623 -MISC metadata.xml 217 BLAKE2B f8189b02494f180dac078dcd5c275d3c795f20f360f8b172c66065a2d937e396b24b8631bba4cd8567d60285ce89fc77b9539f2233bf33899c820613c48c33ba SHA512 f0c9e5b3d281fecd21b1e23a6f44c94c1c0b3220de46a177d35932111b7f1ab4399061c42833ac1ee9bd0324b139fc8db66e0d2890224d607bd3be38ae469be9 +EBUILD rapidfuzz-2.9.0.ebuild 1001 BLAKE2B 7cc7a0f50c4b2daac35dd56bf79eeccd7e008a078c59a8602a833c9a9444488248008368a9a12290d40d3ccbac15b6d9a7518ce438b24e87cf11c16aa305f692 SHA512 402e8462fe135782d7e1090c5baff84b1a42688fb1a154781f99dcc25fc78df79533c7a84afa60731ed7f5b2859b4adacf388c4e5838105f265594d236fbf68f +MISC metadata.xml 374 BLAKE2B e6ee89a9850276b8c22c9bc851ebea2cde2ea696d122d70c6465e09a9371c59f81d1976b3253e8ee90afae5e3e30e993481b402058bac0c58ec01f71a0b7c3b4 SHA512 9a39c4bcf8e8de0a6d6a356a9aeb415f8f49667caf5716eee50bf251f1fd53bb076e817fac0b15bf64e65c1b9625c78810da61a5d96b273a20b2669a18084d6e diff --git a/dev-python/rapidfuzz/files/rapidfuzz-2.9.0-test-pandas.patch b/dev-python/rapidfuzz/files/rapidfuzz-2.9.0-test-pandas.patch new file mode 100644 index 000000000000..fa73c8f3ef3b --- /dev/null +++ b/dev-python/rapidfuzz/files/rapidfuzz-2.9.0-test-pandas.patch @@ -0,0 +1,35 @@ +From 1df09fb54c466efddfc62ed630fddd5fb34cab3f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> +Date: Sun, 18 Sep 2022 15:37:39 +0200 +Subject: [PATCH] tests: handle missing pandas gracefully + +Pandas is not yet ready for Python 3.11. Use pytest.importorskip() +to skip that one regression test that requires it when it's not +available to unblock rapidfuzz on py3.11 on Gentoo. +--- + tests/test_process.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/test_process.py b/tests/test_process.py +index ca5afee..b786d2d 100644 +--- a/tests/test_process.py ++++ b/tests/test_process.py +@@ -5,7 +5,6 @@ import unittest + import pytest + + from rapidfuzz import process_py, process_cpp, fuzz +-import pandas as pd + + + class process: +@@ -298,6 +297,7 @@ class ProcessTest(unittest.TestCase): + + def testIssue81(self): + # this mostly tests whether this segfaults due to incorrect ref counting ++ pd = pytest.importorskip("pandas") + choices = pd.Series( + ["test color brightness", "test lemon", "test lavender"], + index=[67478, 67479, 67480], +-- +2.37.3 + diff --git a/dev-python/rapidfuzz/metadata.xml b/dev-python/rapidfuzz/metadata.xml index 572c7daf2ccf..91cac0023d89 100644 --- a/dev-python/rapidfuzz/metadata.xml +++ b/dev-python/rapidfuzz/metadata.xml @@ -1,7 +1,12 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <maintainer type="person"> - <email>pacho@gentoo.org</email> + <maintainer type="project"> + <email>python@gentoo.org</email> + <name>Python</name> </maintainer> + <upstream> + <remote-id type="github">maxbachmann/RapidFuzz</remote-id> + <remote-id type="pypi">rapidfuzz</remote-id> + </upstream> </pkgmetadata> diff --git a/dev-python/rapidfuzz/rapidfuzz-2.9.0.ebuild b/dev-python/rapidfuzz/rapidfuzz-2.9.0.ebuild index 22ed8a87143e..d61dc5c429e4 100644 --- a/dev-python/rapidfuzz/rapidfuzz-2.9.0.ebuild +++ b/dev-python/rapidfuzz/rapidfuzz-2.9.0.ebuild @@ -1,22 +1,47 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 -PYTHON_COMPAT=( python3_{9..11} ) + +# custom wrapper over setuptools +DISTUTILS_USE_PEP517=standalone +PYTHON_COMPAT=( python3_{8..11} ) inherit distutils-r1 -DESCRIPTION="String matching in Python using various string metrics" -HOMEPAGE="https://github.com/maxbachmann/rapidfuzz" -SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" +DESCRIPTION="Rapid fuzzy string matching in Python using various string metrics" +HOMEPAGE=" + https://github.com/maxbachmann/RapidFuzz/ + https://pypi.org/project/rapidfuzz/ +" +SRC_URI=" + mirror://pypi/${PN::1}/${PN}/${P}.tar.gz +" LICENSE="MIT" SLOT="0" KEYWORDS="~amd64" +RDEPEND=" + <dev-python/jarowinkler-2[${PYTHON_USEDEP}] +" +# all these are header-only libraries +DEPEND=" + >=dev-cpp/taskflow-3.0.0 + >=dev-cpp/jarowinkler-cpp-1.0.0 + >=dev-cpp/rapidfuzz-cpp-1.0.1 + dev-python/numpy[${PYTHON_USEDEP}] +" BDEPEND=" - >=dev-python/jarowinkler-1.2.0[${PYTHON_USEDEP}] + dev-python/rapidfuzz_capi[${PYTHON_USEDEP}] + >=dev-python/scikit-build-0.13.0[${PYTHON_USEDEP}] + dev-python/setuptools[${PYTHON_USEDEP}] " -RESTRICT="test" # Tests need network connection -#distutils_enable_tests setup.py +distutils_enable_tests pytest + +export RAPIDFUZZ_BUILD_EXTENSION=1 + +PATCHES=( + "${FILESDIR}"/${P}-test-pandas.patch +) |