2023-01-11 07:51:40 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pythonOlder
|
|
|
|
, pytestCheckHook
|
|
|
|
, hypothesis
|
2023-01-20 10:41:00 +00:00
|
|
|
, levenshtein
|
2023-01-11 07:51:40 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "thefuzz";
|
2024-01-25 14:12:00 +00:00
|
|
|
version = "0.22.1";
|
2023-01-11 07:51:40 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-01-25 14:12:00 +00:00
|
|
|
hash = "sha256-cTgDmn7PVA2jI3kthZLvmQKx1563jBR9TyBmTeefNoA=";
|
2023-01-11 07:51:40 +00:00
|
|
|
};
|
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
propagatedBuildInputs = [ levenshtein ];
|
2023-01-11 07:51:40 +00:00
|
|
|
|
|
|
|
# Skip linting
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace test_thefuzz.py --replace "import pycodestyle" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"thefuzz"
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2023-01-11 07:51:40 +00:00
|
|
|
hypothesis
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Skip linting
|
|
|
|
"test_pep8_conformance"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Fuzzy string matching for Python";
|
|
|
|
homepage = "https://github.com/seatgeek/thefuzz";
|
|
|
|
changelog = "https://github.com/seatgeek/thefuzz/blob/${version}/CHANGES.rst";
|
|
|
|
license = licenses.gpl2Only;
|
|
|
|
maintainers = with maintainers; [ sumnerevans ];
|
|
|
|
};
|
|
|
|
}
|