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 name = "thinc-${version}";
41 version = "6.5.1";
42
43 src = fetchFromGitHub {
44 owner = "explosion";
45 repo = "thinc";
46 rev = "v${version}";
47 sha256 = "008kmjsvanh6qgnpvsn3qacfcyprxirxbw4yfd8flyg7mxw793ws";
48 };
49
50 propagatedBuildInputs = [
51 cython
52 cymem
53 preshed
54 numpy
55 murmurhash
56 pytest
57 hypothesis
58 tqdm
59 cytoolz
60 plac
61 six
62 mock
63 termcolor
64 wrapt
65 dill
66 pathlibLocked
67 ];
68
69 doCheck = false;
70
71 # fails to import some modules
72 # checkPhase = ''
73 # ${python.interpreter} -m pytest thinc/tests
74 # # cd thinc/tests
75 # # ${python.interpreter} -m unittest discover -p "*test*"
76 # '';
77
78 meta = with stdenv.lib; {
79 description = "Practical Machine Learning for NLP in Python";
80 homepage = https://github.com/explosion/thinc;
81 license = licenses.mit;
82 maintainers = with maintainers; [ sdll ];
83 };
84}