75ca762b89
GitOrigin-RevId: 29b0d4d0b600f8f5dd0b86e3362a33d4181938f9
36 lines
761 B
Nix
36 lines
761 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, pytestCheckHook
|
|
, cython
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "editdistance";
|
|
version = "0.5.3";
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "roy-ht";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "0vk8vz41p2cs7s7zbaw3cnw2jnvy5rhy525xral68dh14digpgsd";
|
|
};
|
|
|
|
nativeBuildInputs = [ cython ];
|
|
|
|
preBuild = ''
|
|
cythonize --inplace editdistance/bycython.pyx
|
|
'';
|
|
|
|
checkInputs = [ pytestCheckHook ];
|
|
|
|
pythonImportsCheck = [ "editdistance" ];
|
|
|
|
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 ];
|
|
};
|
|
}
|