summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2021-01-23 22:51:37 +0100
committerJonathan Ringer <jonringer@users.noreply.github.com>2021-01-23 19:07:20 -0800
commit04eab02b16a1d4631113e8de9c4b22a1f36ae446 (patch)
tree33dd1f501726c49ea5e5e79e2da532d4c80bcc57 /pkgs
parent21c56fc3cf127e12dfd2a2f469d81a853ecc4a33 (diff)
python3Packages.pyahocorasick: init at 1.4.0
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/python-modules/pyahocorasick/default.nix34
-rw-r--r--pkgs/top-level/python-packages.nix2
2 files changed, 36 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/pyahocorasick/default.nix b/pkgs/development/python-modules/pyahocorasick/default.nix
new file mode 100644
index 0000000000000..9ef89c6e920d8
--- /dev/null
+++ b/pkgs/development/python-modules/pyahocorasick/default.nix
@@ -0,0 +1,34 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, pytestCheckHook
+}:
+
+buildPythonPackage rec {
+  pname = "pyahocorasick";
+  version = "1.4.0";
+
+  src = fetchFromGitHub {
+    owner = "WojciechMula";
+    repo = pname;
+    rev = version;
+    sha256 = "0plm9x2gziayjsl7flsgn1z8qx88c9vqm4fs1wq7dv7fr188liik";
+  };
+
+  checkInputs = [ pytestCheckHook ];
+
+  pytestFlagsArray = [ "unittests.py" ];
+  pythonImportsCheck = [ "ahocorasick" ];
+
+  meta = with lib; {
+    description = "Python module implementing Aho-Corasick algorithm";
+    longDescription = ''
+      This Python module is a fast and memory efficient library for exact or
+      approximate multi-pattern string search meaning that you can find multiple
+      key strings occurrences at once in some input text.
+    '';
+    homepage = "https://github.com/WojciechMula/pyahocorasick";
+    license = with licenses; [ bsd3 ];
+    maintainers = with maintainers; [ fab ];
+  };
+}
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index d69502ace2c71..070e855b0c412 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -5124,6 +5124,8 @@ in {
 
   pyaftership = callPackage ../development/python-modules/pyaftership { };
 
+  pyahocorasick = callPackage ../development/python-modules/pyahocorasick { };
+
   pyairvisual = callPackage ../development/python-modules/pyairvisual { };
 
   pyalgotrade = callPackage ../development/python-modules/pyalgotrade { };