2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pytestCheckHook,
|
|
|
|
cython,
|
|
|
|
pdm-backend,
|
|
|
|
setuptools,
|
|
|
|
pythonOlder,
|
2021-03-09 03:18:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "editdistance";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.8.1";
|
2024-06-05 15:53:02 +00:00
|
|
|
pyproject = true;
|
2021-03-09 03:18:52 +00:00
|
|
|
|
2022-11-02 22:02:43 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "roy-ht";
|
|
|
|
repo = pname;
|
2023-01-20 10:41:00 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-Ncdg8S/UHYqJ1uFnHk9qhHMM3Lrop00woSu3PLKvuBI=";
|
2021-03-09 03:18:52 +00:00
|
|
|
};
|
|
|
|
|
2022-11-02 22:02:43 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cython
|
2024-04-21 15:54:59 +00:00
|
|
|
pdm-backend
|
|
|
|
setuptools
|
2022-11-02 22:02:43 +00:00
|
|
|
];
|
2021-03-09 03:18:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2021-03-09 03:18:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "editdistance" ];
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python implementation of the edit distance (Levenshtein distance)";
|
|
|
|
homepage = "https://github.com/roy-ht/editdistance";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|