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