1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 pythonOlder,
6 pytestCheckHook,
7 hypothesis,
8 levenshtein,
9}:
10
11buildPythonPackage rec {
12 pname = "thefuzz";
13 version = "0.22.1";
14 format = "setuptools";
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchPypi {
19 inherit pname version;
20 hash = "sha256-cTgDmn7PVA2jI3kthZLvmQKx1563jBR9TyBmTeefNoA=";
21 };
22
23 propagatedBuildInputs = [ levenshtein ];
24
25 # Skip linting
26 postPatch = ''
27 substituteInPlace test_thefuzz.py --replace "import pycodestyle" ""
28 '';
29
30 pythonImportsCheck = [ "thefuzz" ];
31
32 nativeCheckInputs = [
33 hypothesis
34 pytestCheckHook
35 ];
36
37 disabledTests = [
38 # Skip linting
39 "test_pep8_conformance"
40 ];
41
42 meta = with lib; {
43 description = "Fuzzy string matching for Python";
44 homepage = "https://github.com/seatgeek/thefuzz";
45 changelog = "https://github.com/seatgeek/thefuzz/blob/${version}/CHANGES.rst";
46 license = licenses.gpl2Only;
47 maintainers = with maintainers; [ sumnerevans ];
48 };
49}