Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / thefuzz / default.nix
blob8d240fe19e3e774ccb1b58508efcf50845af0ad3
1 { lib
2 , buildPythonPackage
3 , fetchPypi
4 , pythonOlder
5 , pytestCheckHook
6 , hypothesis
7 , levenshtein
8 }:
10 buildPythonPackage rec {
11   pname = "thefuzz";
12   version = "0.20.0";
13   format = "setuptools";
15   disabled = pythonOlder "3.7";
17   src = fetchPypi {
18     inherit pname version;
19     hash = "sha256-ol5JeGscRgPH/G4taea8ZgmCopGWmLU2/4NU4GMcxA0=";
20   };
22   propagatedBuildInputs = [ levenshtein ];
24   # Skip linting
25   postPatch = ''
26     substituteInPlace test_thefuzz.py --replace "import pycodestyle" ""
27   '';
29   pythonImportsCheck = [
30     "thefuzz"
31   ];
33   nativeCheckInputs = [
34     hypothesis
35     pytestCheckHook
36   ];
38   disabledTests = [
39     # Skip linting
40     "test_pep8_conformance"
41   ];
43   meta = with lib; {
44     description = "Fuzzy string matching for Python";
45     homepage = "https://github.com/seatgeek/thefuzz";
46     changelog = "https://github.com/seatgeek/thefuzz/blob/${version}/CHANGES.rst";
47     license = licenses.gpl2Only;
48     maintainers = with maintainers; [ sumnerevans ];
49   };