diff mbox series

[bug#63139,python,03/20] gnu: Add python-rapidfuzz.

Message ID 885e568746f3611bc4f4f4f2f2b2ecb63482cb14.1682660104.git.john.kehayias@protonmail.com
State New
Headers show
Series Updates for pyproject-build-system, poetry, python-yubikey-manager | expand

Commit Message

John Kehayias April 28, 2023, 5:50 a.m. UTC
* gnu/packages/python-xyz.scm (python-rapidfuzz): New variable.
---
 gnu/packages/python-xyz.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

--
2.39.2
diff mbox series

Patch

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 83beb1c8ef..4d1f291e68 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -17793,6 +17793,39 @@  (define-public python-pylev
 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
     (license license:bsd-3)))

+(define-public python-rapidfuzz
+  (package
+    (name "python-rapidfuzz")
+    (version "2.15.1")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "rapidfuzz" version))
+              (sha256
+               (base32
+                "1xh0mkbhgnrwgwhrlnmypwwig3ww23fdffh0245akbiprb13f8fn"))))
+    (build-system python-build-system)
+    (native-inputs (list python-hypothesis python-numpy python-pytest
+                         python-scikit-build))
+    (home-page "https://github.com/maxbachmann/RapidFuzz")
+    (synopsis "Rapid fuzzy string matching using various string metrics")
+    (description
+     "RapidFuzz is a fast string matching library for Python and
+C++, which is using the string similarity calculations from FuzzyWuzzy.
+However there are a couple of aspects that set RapidFuzz apart from
+FuzzyWuzzy:
+@itemize
+@item It is MIT licensed so it can be used whichever License you might want to
+choose for your project, while you're forced to adopt the GPL license when
+using FuzzyWuzzy.
+@item It provides many @code{string_metrics} like @code{hamming} or
+@code{jaro_winkler}, which are not included in FuzzyWuzzy.
+@item It is mostly written in C++ and on top of this comes with a lot of
+algorithmic improvements to make string matching even faster, while still
+providing the same results.  For detailed benchmarks check the documentation.
+@item Fixes multiple bugs in the partial_ratio implementation.
+@end itemize")
+    (license license:expat)))
+
 (define-public python-cleo
   (package
     (name "python-cleo")