summary refs log tree commit diff
path: root/pkgs/development/python-modules/py-stringmatching/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/py-stringmatching/default.nix')
-rw-r--r--pkgs/development/python-modules/py-stringmatching/default.nix51
1 files changed, 51 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/py-stringmatching/default.nix b/pkgs/development/python-modules/py-stringmatching/default.nix
new file mode 100644
index 00000000000..b5bdffca759
--- /dev/null
+++ b/pkgs/development/python-modules/py-stringmatching/default.nix
@@ -0,0 +1,51 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, setuptools
+, pytestCheckHook
+, numpy
+, pythonOlder
+, six
+}:
+
+buildPythonPackage rec {
+  pname = "py-stringmatching";
+  version = "0.4.3";
+  pyproject = true;
+
+  disabled = pythonOlder "3.7";
+
+  src = fetchPypi {
+    pname = "py_stringmatching";
+    inherit version;
+    hash = "sha256-khubsWOzEN80HDOCORMgT3sMqfajGfW0UUCDAL03je4=";
+  };
+
+  nativeBuildInputs = [
+    setuptools
+  ];
+
+  propagatedBuildInputs = [
+    numpy
+    six
+  ];
+
+  nativeCheckInputs = [
+    pytestCheckHook
+  ];
+
+  preCheck = ''
+    cd $out
+  '';
+
+  pythonImportsCheck = [
+    "py_stringmatching"
+  ];
+
+  meta = with lib; {
+    description = "Python string matching library including string tokenizers and string similarity measures";
+    homepage = "https://github.com/anhaidgroup/py_stringmatching";
+    changelog = "https://github.com/anhaidgroup/py_stringmatching/blob/v${version}/CHANGES.txt";
+    license = licenses.bsd3;
+  };
+}