1{
2 lib,
3 buildPythonPackage,
4 pythonOlder,
5 fetchFromGitHub,
6 setuptools,
7 rapidfuzz,
8 hypothesis,
9 pytestCheckHook,
10}:
11
12buildPythonPackage rec {
13 pname = "jarowinkler";
14 version = "2.0.1";
15
16 disabled = pythonOlder "3.8";
17
18 pyproject = true;
19
20 src = fetchFromGitHub {
21 owner = "maxbachmann";
22 repo = "JaroWinkler";
23 tag = "v${version}";
24 hash = "sha256-B3upTBNqMyi+CH7Zx04wceEXjGJnr6S3BIl87AQkfbo=";
25 };
26
27 nativeBuildInputs = [ setuptools ];
28
29 propagatedBuildInputs = [ rapidfuzz ];
30
31 nativeCheckInputs = [
32 hypothesis
33 pytestCheckHook
34 ];
35
36 pythonImportsCheck = [ "jarowinkler" ];
37
38 meta = with lib; {
39 description = "Library for fast approximate string matching using Jaro and Jaro-Winkler similarity";
40 homepage = "https://github.com/maxbachmann/JaroWinkler";
41 changelog = "https://github.com/maxbachmann/JaroWinkler/blob/${src.rev}/CHANGELOG.md";
42 license = licenses.mit;
43 maintainers = with maintainers; [ dotlambda ];
44 };
45}