summary refs log tree commit diff
path: root/pkgs/development/python-modules/thinc
diff options
context:
space:
mode:
authorSasha Delly <shura.sdll@gmail.com>2017-05-15 10:08:30 +0000
committerFrederik Rietdijk <fridh@fridh.nl>2017-08-13 22:41:30 +0200
commitea418720d79fc2115e7c95474e77182b6f4e6924 (patch)
tree63b3ee598bb42f90f253e1f84a0469b53b752523 /pkgs/development/python-modules/thinc
parentf1ce370b8e91dbc0e255456610a9f1b292114b40 (diff)
downloadnixlib-ea418720d79fc2115e7c95474e77182b6f4e6924.tar
nixlib-ea418720d79fc2115e7c95474e77182b6f4e6924.tar.gz
nixlib-ea418720d79fc2115e7c95474e77182b6f4e6924.tar.bz2
nixlib-ea418720d79fc2115e7c95474e77182b6f4e6924.tar.lz
nixlib-ea418720d79fc2115e7c95474e77182b6f4e6924.tar.xz
nixlib-ea418720d79fc2115e7c95474e77182b6f4e6924.tar.zst
nixlib-ea418720d79fc2115e7c95474e77182b6f4e6924.zip
thinc: init at 1.0.1
Diffstat (limited to 'pkgs/development/python-modules/thinc')
-rw-r--r--pkgs/development/python-modules/thinc/default.nix84
1 files changed, 84 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/thinc/default.nix b/pkgs/development/python-modules/thinc/default.nix
new file mode 100644
index 000000000000..817ea6388f95
--- /dev/null
+++ b/pkgs/development/python-modules/thinc/default.nix
@@ -0,0 +1,84 @@
+{ stdenv
+, pkgs
+, buildPythonPackage
+, fetchPypi
+, fetchFromGitHub
+, pytest
+, cython
+, cymem
+, preshed
+, numpy
+, python
+, murmurhash
+, hypothesis
+, tqdm
+, cytoolz
+, plac
+, six
+, mock
+, termcolor
+, wrapt
+, dill
+}:
+
+let
+  enableDebugging = true;
+
+  pathlibLocked = buildPythonPackage rec {
+    name = "${pname}-${version}";
+    pname = "pathlib";
+    version = "1.0.1";
+
+    src = fetchPypi {
+      inherit pname version;      
+      sha256 = "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39";
+    };
+
+    doCheck = false; # fails to import support from test
+  };
+in buildPythonPackage rec {
+  name = "thinc-${version}";
+  version = "6.5.1";
+
+  src = fetchFromGitHub {
+    owner = "explosion";
+    repo = "thinc";
+    rev = "v${version}";
+    sha256 = "008kmjsvanh6qgnpvsn3qacfcyprxirxbw4yfd8flyg7mxw793ws";    
+  };
+
+  propagatedBuildInputs = [
+   cython
+   cymem
+   preshed
+   numpy
+   murmurhash
+   pytest
+   hypothesis
+   tqdm
+   cytoolz
+   plac
+   six
+   mock
+   termcolor
+   wrapt
+   dill
+   pathlibLocked
+  ];
+
+  doCheck = false;
+  
+  # fails to import some modules
+  # checkPhase = ''
+  #   ${python.interpreter} -m pytest thinc/tests
+  #   # cd thinc/tests
+  #   # ${python.interpreter} -m unittest discover -p "*test*"
+  # '';
+  
+  meta = with stdenv.lib; {
+    description = "Practical Machine Learning for NLP in Python";
+    homepage = https://github.com/explosion/thinc;
+    license = licenses.mit;
+    maintainers = with maintainers; [ sdll ];
+    };
+}