depot/third_party/nixpkgs/pkgs/development/python-modules/jarowinkler/default.nix
Default email 889482aab3 Project import generated by Copybara.
GitOrigin-RevId: f2537a505d45c31fe5d9c27ea9829b6f4c4e6ac5
2022-06-26 12:26:21 +02:00

65 lines
1.2 KiB
Nix

{ lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, cmake
, ninja
, cython
, rapidfuzz-capi
, scikit-build
, setuptools
, jarowinkler-cpp
, hypothesis
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "jarowinkler";
version = "1.0.4";
disabled = pythonOlder "3.6";
format = "pyproject";
src = fetchFromGitHub {
owner = "maxbachmann";
repo = "JaroWinkler";
rev = "v${version}";
hash = "sha256-2bhKl7l3ByfrtkXnXifQd/AhWVFGSMzULkzJftd1mVE=";
};
nativeBuildInputs = [
cmake
cython
ninja
rapidfuzz-capi
scikit-build
setuptools
];
buildInputs = [
jarowinkler-cpp
];
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";
changelog = "https://github.com/maxbachmann/JaroWinkler/blob/${src.rev}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ dotlambda ];
};
}