1{ stdenv
2, pkgs
3, buildPythonPackage
4, fetchPypi
5, fetchFromGitHub
6, pytest
7, cython
8, cymem
9, preshed
10, numpy
11, python
12, murmurhash
13, hypothesis
14, tqdm
15, cytoolz
16, plac
17, six
18, mock
19, termcolor
20, wrapt
21, dill
22}:
23
24let
25 enableDebugging = true;
26
27 pathlibLocked = buildPythonPackage rec {
28 name = "${pname}-${version}";
29 pname = "pathlib";
30 version = "1.0.1";
31
32 src = fetchPypi {
33 inherit pname version;
34 sha256 = "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39";
35 };
36
37 doCheck = false; # fails to import support from test
38 };
39in buildPythonPackage rec {
40 pname = "thinc";
41 version = "6.5.1";
42 name = pname + "-" + version;
43
44 src = fetchFromGitHub {
45 owner = "explosion";
46 repo = "thinc";
47 rev = "v${version}";
48 sha256 = "008kmjsvanh6qgnpvsn3qacfcyprxirxbw4yfd8flyg7mxw793ws";
49 };
50
51 propagatedBuildInputs = [
52 cython
53 cymem
54 preshed
55 numpy
56 murmurhash
57 pytest
58 hypothesis
59 tqdm
60 cytoolz
61 plac
62 six
63 mock
64 termcolor
65 wrapt
66 dill
67 pathlibLocked
68 ];
69
70 doCheck = false;
71
72 # fails to import some modules
73 # checkPhase = ''
74 # ${python.interpreter} -m pytest thinc/tests
75 # # cd thinc/tests
76 # # ${python.interpreter} -m unittest discover -p "*test*"
77 # '';
78
79 meta = with stdenv.lib; {
80 description = "Practical Machine Learning for NLP in Python";
81 homepage = https://github.com/explosion/thinc;
82 license = licenses.mit;
83 maintainers = with maintainers; [ sdll ];
84 };
85}