forked from mirrors/nixpkgs
53 lines
968 B
Nix
53 lines
968 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, pythonOlder
|
|
, fetchFromGitHub
|
|
, pytestCheckHook
|
|
, hypothesis
|
|
, pandas
|
|
, numpy
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "rapidfuzz";
|
|
version = "1.8.3";
|
|
|
|
disabled = pythonOlder "3.5";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "maxbachmann";
|
|
repo = "RapidFuzz";
|
|
rev = "v${version}";
|
|
fetchSubmodules = true;
|
|
sha256 = "sha256-DjMUI5JBomv0f2AC1Nvb3DeqWn65AvZJWhWus4AZk7w=";
|
|
};
|
|
|
|
propagatedBuildInputs = [
|
|
numpy
|
|
];
|
|
|
|
checkInputs = [
|
|
pytestCheckHook
|
|
hypothesis
|
|
pandas
|
|
];
|
|
|
|
disabledTests = [
|
|
"test_levenshtein_block" # hypothesis data generation too slow
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"rapidfuzz.fuzz"
|
|
"rapidfuzz.string_metric"
|
|
"rapidfuzz.process"
|
|
"rapidfuzz.utils"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Rapid fuzzy string matching";
|
|
homepage = "https://github.com/maxbachmann/RapidFuzz";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ dotlambda ];
|
|
};
|
|
}
|