summary refs log tree commit diff
path: root/pkgs/development/python-modules/rapidfuzz
diff options
context:
space:
mode:
authorRobert Schütz <dev@schuetz-co.de>2021-03-27 12:47:16 +0100
committerRobert Schütz <dev@schuetz-co.de>2021-03-28 16:53:31 +0200
commit57497a9a41d778f636c58cf42ccfad7bb886bfee (patch)
treede76c5a6c5592f0a1ff0034c6e9fcc9d6614d196 /pkgs/development/python-modules/rapidfuzz
parentf8d6e28f7d0ea2660ff19f9e9d39514a77346a97 (diff)
downloadnixpkgs-57497a9a41d778f636c58cf42ccfad7bb886bfee.tar
nixpkgs-57497a9a41d778f636c58cf42ccfad7bb886bfee.tar.gz
nixpkgs-57497a9a41d778f636c58cf42ccfad7bb886bfee.tar.bz2
nixpkgs-57497a9a41d778f636c58cf42ccfad7bb886bfee.tar.lz
nixpkgs-57497a9a41d778f636c58cf42ccfad7bb886bfee.tar.xz
nixpkgs-57497a9a41d778f636c58cf42ccfad7bb886bfee.tar.zst
nixpkgs-57497a9a41d778f636c58cf42ccfad7bb886bfee.zip
python3Packages.rapidfuzz: init at 1.3.3
Diffstat (limited to 'pkgs/development/python-modules/rapidfuzz')
-rw-r--r--pkgs/development/python-modules/rapidfuzz/default.nix47
1 files changed, 47 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/rapidfuzz/default.nix b/pkgs/development/python-modules/rapidfuzz/default.nix
new file mode 100644
index 00000000000..225f743904d
--- /dev/null
+++ b/pkgs/development/python-modules/rapidfuzz/default.nix
@@ -0,0 +1,47 @@
+{ lib
+, buildPythonPackage
+, pythonOlder
+, fetchFromGitHub
+, pytestCheckHook
+, hypothesis
+, pandas
+}:
+
+buildPythonPackage rec {
+  pname = "rapidfuzz";
+  version = "1.3.3";
+
+  disabled = pythonOlder "3.5";
+
+  src = fetchFromGitHub {
+    owner = "maxbachmann";
+    repo = "RapidFuzz";
+    rev = "v${version}";
+    fetchSubmodules = true;
+    sha256 = "1k28mycf945zp5kkdm4anjqac8ysmp0pabyjg96xww8hnlwmqcnf";
+  };
+
+  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 ];
+  };
+}