1{ lib
2, buildPythonPackage
3, pythonOlder
4, fetchFromGitHub
5, pytestCheckHook
6, hypothesis
7, pandas
8}:
9
10buildPythonPackage rec {
11 pname = "rapidfuzz";
12 version = "1.4.1";
13
14 disabled = pythonOlder "3.5";
15
16 src = fetchFromGitHub {
17 owner = "maxbachmann";
18 repo = "RapidFuzz";
19 rev = "v${version}";
20 fetchSubmodules = true;
21 sha256 = "sha256-uZdD25ATJgRrDAHYSQNp7NvEmW7p3LD9vNmxAbf5Mwk=";
22 };
23
24 checkInputs = [
25 pytestCheckHook
26 hypothesis
27 pandas
28 ];
29
30 disabledTests = [
31 "test_levenshtein_block" # hypothesis data generation too slow
32 ];
33
34 pythonImportsCheck = [
35 "rapidfuzz.fuzz"
36 "rapidfuzz.string_metric"
37 "rapidfuzz.process"
38 "rapidfuzz.utils"
39 ];
40
41 meta = with lib; {
42 description = "Rapid fuzzy string matching";
43 homepage = "https://github.com/maxbachmann/rapidfuzz";
44 license = licenses.mit;
45 maintainers = with maintainers; [ dotlambda ];
46 };
47}