summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/jarowinkler/default.nix
blob: df5bc14be9b22ebf1d0a018c7d7a8d5cc7028d42 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools,
  rapidfuzz,
  hypothesis,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "jarowinkler";
  version = "2.0.1";

  pyproject = true;

  src = fetchFromGitHub {
    owner = "maxbachmann";
    repo = "JaroWinkler";
    tag = "v${version}";
    hash = "sha256-B3upTBNqMyi+CH7Zx04wceEXjGJnr6S3BIl87AQkfbo=";
  };

  nativeBuildInputs = [ setuptools ];

  propagatedBuildInputs = [ rapidfuzz ];

  nativeCheckInputs = [
    hypothesis
    pytestCheckHook
  ];

  pythonImportsCheck = [ "jarowinkler" ];

  meta = {
    description = "Library for fast approximate string matching using Jaro and Jaro-Winkler similarity";
    homepage = "https://github.com/maxbachmann/JaroWinkler";
    changelog = "https://github.com/maxbachmann/JaroWinkler/blob/${src.rev}/CHANGELOG.md";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ dotlambda ];
  };
}