Commit bcf118d6 authored by Fabian Affolter's avatar Fabian Affolter
Browse files

python313Packages.thefuzz: refactor

parent 253deceb
Loading
Loading
Loading
Loading
+13 −5
Original line number Diff line number Diff line
@@ -6,12 +6,13 @@
  pytestCheckHook,
  hypothesis,
  levenshtein,
  setuptools,
}:

buildPythonPackage rec {
  pname = "thefuzz";
  version = "0.22.1";
  format = "setuptools";
  pyproject = true;

  disabled = pythonOlder "3.7";

@@ -20,20 +21,27 @@ buildPythonPackage rec {
    hash = "sha256-cTgDmn7PVA2jI3kthZLvmQKx1563jBR9TyBmTeefNoA=";
  };

  propagatedBuildInputs = [ levenshtein ];

  # Skip linting
  postPatch = ''
    substituteInPlace test_thefuzz.py --replace "import pycodestyle" ""
    substituteInPlace test_thefuzz.py \
      --replace-fail "import pycodestyle" ""
  '';

  pythonImportsCheck = [ "thefuzz" ];
  build-system = [ setuptools ];

  dependencies = [ levenshtein ];

  nativeCheckInputs = [
    hypothesis
    pytestCheckHook
  ];

  optional-dependencies = {
    speedup = [ ];
  };

  pythonImportsCheck = [ "thefuzz" ];

  disabledTests = [
    # Skip linting
    "test_pep8_conformance"