1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pytestCheckHook,
6 cython,
7 pdm-backend,
8 setuptools,
9 pythonOlder,
10}:
11
12buildPythonPackage rec {
13 pname = "editdistance";
14 version = "0.8.1";
15 pyproject = true;
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchFromGitHub {
20 owner = "roy-ht";
21 repo = "editdistance";
22 tag = "v${version}";
23 hash = "sha256-Ncdg8S/UHYqJ1uFnHk9qhHMM3Lrop00woSu3PLKvuBI=";
24 };
25
26 nativeBuildInputs = [
27 cython
28 pdm-backend
29 setuptools
30 ];
31
32 nativeCheckInputs = [ pytestCheckHook ];
33
34 pythonImportsCheck = [ "editdistance" ];
35
36 meta = with lib; {
37 description = "Python implementation of the edit distance (Levenshtein distance)";
38 homepage = "https://github.com/roy-ht/editdistance";
39 license = with licenses; [ mit ];
40 maintainers = with maintainers; [ fab ];
41 };
42}