1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
{ stdenv
, lib
, pkgs
, buildPythonPackage
, fetchPypi
, pythonOlder
, pytest
, cython
, cymem
, msgpack-numpy
, msgpack-python
, preshed
, numpy
, python
, murmurhash
, pathlib
, hypothesis
, tqdm
, cytoolz
, plac
, six
, mock
, termcolor
, wrapt
, dill
}:
buildPythonPackage rec {
pname = "thinc";
version = "6.10.2";
name = pname + "-" + version;
src = fetchPypi {
inherit pname version;
sha256 = "0xia81wvfrhyriywab184s49g8rpl42vcf5fy3x6xxw50a2yn7cs";
};
propagatedBuildInputs = [
cython
cymem
msgpack-numpy
msgpack-python
preshed
numpy
murmurhash
pytest
hypothesis
tqdm
cytoolz
plac
six
mock
termcolor
wrapt
dill
] ++ lib.optional (pythonOlder "3.4") pathlib;
checkInputs = [
pytest
];
prePatch = ''
substituteInPlace setup.py --replace \
"'pathlib>=1.0.0,<2.0.0'," \
"\"pathlib>=1.0.0,<2.0.0; python_version<'3.4'\","
substituteInPlace setup.py --replace \
"'cytoolz>=0.8,<0.9'," \
"'cytoolz>=0.8',"
'';
# Cannot find cython modules.
doCheck = false;
checkPhase = ''
pytest thinc/tests
'';
meta = with stdenv.lib; {
description = "Practical Machine Learning for NLP in Python";
homepage = https://github.com/explosion/thinc;
license = licenses.mit;
maintainers = with maintainers; [ aborsu sdll ];
};
}
|