summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/editdistance/default.nix
blob: 539ea4347cee5911450be2d0bc42116c6d387420 (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
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  pytestCheckHook,
  cython,
  pdm-backend,
  setuptools,
}:

buildPythonPackage rec {
  pname = "editdistance";
  version = "0.8.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "roy-ht";
    repo = "editdistance";
    tag = "v${version}";
    hash = "sha256-Ncdg8S/UHYqJ1uFnHk9qhHMM3Lrop00woSu3PLKvuBI=";
  };

  nativeBuildInputs = [
    cython
    pdm-backend
    setuptools
  ];

  nativeCheckInputs = [ pytestCheckHook ];

  pythonImportsCheck = [ "editdistance" ];

  meta = {
    description = "Python implementation of the edit distance (Levenshtein distance)";
    homepage = "https://github.com/roy-ht/editdistance";
    license = with lib.licenses; [ mit ];
    maintainers = with lib.maintainers; [ fab ];
  };
}