commit:     9558b0330063b6feeeddff24d231fdb388f8c736
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Aug  7 04:30:35 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Aug  7 04:30:35 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9558b033

dev-python/rapidfuzz: Bump to 3.9.6

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/rapidfuzz/Manifest               |  1 +
 dev-python/rapidfuzz/rapidfuzz-3.9.6.ebuild | 67 +++++++++++++++++++++++++++++
 2 files changed, 68 insertions(+)

diff --git a/dev-python/rapidfuzz/Manifest b/dev-python/rapidfuzz/Manifest
index a6d17e9a7119..d1d4d202eee0 100644
--- a/dev-python/rapidfuzz/Manifest
+++ b/dev-python/rapidfuzz/Manifest
@@ -1,2 +1,3 @@
 DIST rapidfuzz-3.9.4.tar.gz 1595863 BLAKE2B 
ba835b6d1c5bc7da99ae7202ae469d9a1d069ea0351b732a701abbadfbe1539a389efb051cd58e462505ebcf6020b60ec6413d9f44bbfd63a0dc8419cded9722
 SHA512 
4494d86f17e7b4ae51639f1d2941d4e313c26739787f3a47261a5d5bf26da4091d918e1603e2199774edd5e1b91d67446b762a81e6b98496d67fbddb93effe21
 DIST rapidfuzz-3.9.5.tar.gz 1595894 BLAKE2B 
ce46f5fdc15e3c4aeef801055569f5452512bd2b0d85a9c738672e4f98a7ca8de9b4ca451da4e031ffbd661075bcd00e8929ad46b6990a693e1aa137d8097c7b
 SHA512 
ddbb9b70ac9d3a0dce3d2632ee97bdb10afef5b33e73bb14ff51b70eb7c7e94dbc46132867a8279df4c15bddf6a85c0fa705f0d13bb157456b1e6dbc59e64a8f
+DIST rapidfuzz-3.9.6.tar.gz 1596107 BLAKE2B 
e108320e05ad3ad194b1ffa05d5fddc5bb6080e73ecb031117a0552d5685734870af4a87503022fceadf3fd38b31e71f85c05483b4aaaf4a9d7358d4566699b4
 SHA512 
015b947dcfd12ee48c7592ac2fc204833d8aa8e43110dab12dff7650e9f309a9a2017d2faf89b3c154cead23d9dc7fc1658f0ff5d2f8b5b3c73b2c97f021c7d9

diff --git a/dev-python/rapidfuzz/rapidfuzz-3.9.6.ebuild 
b/dev-python/rapidfuzz/rapidfuzz-3.9.6.ebuild
new file mode 100644
index 000000000000..000e71d2c36c
--- /dev/null
+++ b/dev-python/rapidfuzz/rapidfuzz-3.9.6.ebuild
@@ -0,0 +1,67 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_EXT=1
+# custom wrapper over setuptools
+DISTUTILS_USE_PEP517=standalone
+PYTHON_COMPAT=( pypy3 python3_{10..13} )
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="Rapid fuzzy string matching in Python using various string 
metrics"
+HOMEPAGE="
+       https://github.com/rapidfuzz/RapidFuzz/
+       https://pypi.org/project/rapidfuzz/
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 
~riscv ~s390 ~sparc ~x86"
+
+# all these are header-only libraries
+DEPEND="
+       >=dev-cpp/taskflow-3.0.0
+       >=dev-cpp/rapidfuzz-cpp-3.0.5
+       dev-python/numpy[${PYTHON_USEDEP}]
+"
+BDEPEND="
+       >=dev-python/cython-3[${PYTHON_USEDEP}]
+       >=dev-python/scikit-build-0.16.2[${PYTHON_USEDEP}]
+       dev-python/setuptools[${PYTHON_USEDEP}]
+       test? (
+               dev-python/hypothesis[${PYTHON_USEDEP}]
+       )
+"
+
+EPYTEST_XDIST=1
+distutils_enable_tests pytest
+
+src_prepare() {
+       # sterilize build flags
+       sed -i -e '/CMAKE_INTERPROCEDURAL_OPTIMIZATION/d' CMakeLists.txt || die
+       # remove bundled libraries
+       rm -r extern || die
+       # force recythonization
+       find src -name '*.cxx' -delete || die
+       # do not require exact taskflow version
+       sed -i -e '/Taskflow/s:3\.7\.0::' CMakeLists.txt || die
+
+       distutils-r1_src_prepare
+
+       export RAPIDFUZZ_BUILD_EXTENSION=1
+}
+
+python_compile() {
+       distutils-r1_python_compile
+
+       # scikit-build is broken and reuses the same build
+       # https://github.com/scikit-build/scikit-build/issues/633
+       rm -r _skbuild || die
+}
+
+python_test() {
+       local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+       epytest
+}

Reply via email to