2021-08-25 08:27:29 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, python
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-08-25 08:27:29 +00:00
|
|
|
buildPythonPackage rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "pylev";
|
2021-08-25 08:27:29 +00:00
|
|
|
version = "1.4.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "toastdriven";
|
|
|
|
repo = "pylev";
|
2021-08-25 08:27:29 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0fgxjdnvnvavnxmxxd0fl5jyr2f31g3a26bwyxcpy56mgpd095c1";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-08-25 08:27:29 +00:00
|
|
|
checkPhase = ''
|
|
|
|
${python.interpreter} -m unittest tests
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "pylev" ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
2021-08-25 08:27:29 +00:00
|
|
|
description = "Python Levenshtein implementation";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/toastdriven/pylev";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ jakewaksbaum ];
|
|
|
|
};
|
|
|
|
}
|