about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/python-crfsuite/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/python-crfsuite/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/python-crfsuite/default.nix36
1 files changed, 36 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/python-crfsuite/default.nix b/nixpkgs/pkgs/development/python-modules/python-crfsuite/default.nix
new file mode 100644
index 000000000000..cd2adc48c6fa
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/python-crfsuite/default.nix
@@ -0,0 +1,36 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, pytestCheckHook
+}:
+
+buildPythonPackage rec {
+  pname = "python-crfsuite";
+  version = "0.9.7";
+  format = "setuptools";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1ryfcdfpqbrf8rcd2rlay2gfiba3px3q508543jf81shrv93hi9v";
+  };
+
+  preCheck = ''
+    # make sure import the built version, not the source one
+    rm -r pycrfsuite
+  '';
+
+  checkInputs = [
+    pytestCheckHook
+  ];
+
+  pythonImportsCheck = [
+    "pycrfsuite"
+  ];
+
+  meta = with lib; {
+    description = "Python binding for CRFsuite";
+    homepage = "https://github.com/scrapinghub/python-crfsuite";
+    license = licenses.mit;
+    maintainers = teams.tts.members;
+  };
+}