2022-04-27 09:35:20 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
2022-06-26 10:26:21 +00:00
|
|
|
, ninja
|
2022-04-27 09:35:20 +00:00
|
|
|
, cython
|
|
|
|
, rapidfuzz-capi
|
|
|
|
, scikit-build
|
2022-06-26 10:26:21 +00:00
|
|
|
, setuptools
|
|
|
|
, jarowinkler-cpp
|
2022-04-27 09:35:20 +00:00
|
|
|
, hypothesis
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "jarowinkler";
|
2022-06-26 10:26:21 +00:00
|
|
|
version = "1.0.4";
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "maxbachmann";
|
|
|
|
repo = "JaroWinkler";
|
|
|
|
rev = "v${version}";
|
2022-06-26 10:26:21 +00:00
|
|
|
hash = "sha256-2bhKl7l3ByfrtkXnXifQd/AhWVFGSMzULkzJftd1mVE=";
|
2022-04-27 09:35:20 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
cython
|
2022-06-26 10:26:21 +00:00
|
|
|
ninja
|
2022-04-27 09:35:20 +00:00
|
|
|
rapidfuzz-capi
|
|
|
|
scikit-build
|
2022-06-26 10:26:21 +00:00
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
jarowinkler-cpp
|
2022-04-27 09:35:20 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
dontUseCmakeConfigure = true;
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
hypothesis
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
# import from $out
|
|
|
|
rm -r jarowinkler
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "jarowinkler" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Library for fast approximate string matching using Jaro and Jaro-Winkler similarity";
|
|
|
|
homepage = "https://github.com/maxbachmann/JaroWinkler";
|
2022-06-26 10:26:21 +00:00
|
|
|
changelog = "https://github.com/maxbachmann/JaroWinkler/blob/${src.rev}/CHANGELOG.md";
|
2022-04-27 09:35:20 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
|
|
|
};
|
|
|
|
}
|