python.thinc: 6.5.1 -> 6.10.2
This commit is contained in:
@@ -1,15 +1,19 @@
|
|||||||
{ stdenv
|
{ stdenv
|
||||||
|
, lib
|
||||||
, pkgs
|
, pkgs
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchPypi
|
, fetchPypi
|
||||||
, fetchFromGitHub
|
, pythonOlder
|
||||||
, pytest
|
, pytest
|
||||||
, cython
|
, cython
|
||||||
, cymem
|
, cymem
|
||||||
|
, msgpack-numpy
|
||||||
|
, msgpack-python
|
||||||
, preshed
|
, preshed
|
||||||
, numpy
|
, numpy
|
||||||
, python
|
, python
|
||||||
, murmurhash
|
, murmurhash
|
||||||
|
, pathlib
|
||||||
, hypothesis
|
, hypothesis
|
||||||
, tqdm
|
, tqdm
|
||||||
, cytoolz
|
, cytoolz
|
||||||
@@ -21,36 +25,21 @@
|
|||||||
, dill
|
, dill
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
buildPythonPackage rec {
|
||||||
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 {
|
|
||||||
pname = "thinc";
|
pname = "thinc";
|
||||||
version = "6.5.1";
|
version = "6.10.2";
|
||||||
name = pname + "-" + version;
|
name = pname + "-" + version;
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchPypi {
|
||||||
owner = "explosion";
|
inherit pname version;
|
||||||
repo = "thinc";
|
sha256 = "0xia81wvfrhyriywab184s49g8rpl42vcf5fy3x6xxw50a2yn7cs";
|
||||||
rev = "v${version}";
|
|
||||||
sha256 = "008kmjsvanh6qgnpvsn3qacfcyprxirxbw4yfd8flyg7mxw793ws";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
cython
|
cython
|
||||||
cymem
|
cymem
|
||||||
|
msgpack-numpy
|
||||||
|
msgpack-python
|
||||||
preshed
|
preshed
|
||||||
numpy
|
numpy
|
||||||
murmurhash
|
murmurhash
|
||||||
@@ -64,22 +53,34 @@ in buildPythonPackage rec {
|
|||||||
termcolor
|
termcolor
|
||||||
wrapt
|
wrapt
|
||||||
dill
|
dill
|
||||||
pathlibLocked
|
] ++ 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;
|
doCheck = false;
|
||||||
|
|
||||||
# fails to import some modules
|
checkPhase = ''
|
||||||
# checkPhase = ''
|
pytest thinc/tests
|
||||||
# ${python.interpreter} -m pytest thinc/tests
|
'';
|
||||||
# # cd thinc/tests
|
|
||||||
# # ${python.interpreter} -m unittest discover -p "*test*"
|
|
||||||
# '';
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Practical Machine Learning for NLP in Python";
|
description = "Practical Machine Learning for NLP in Python";
|
||||||
homepage = https://github.com/explosion/thinc;
|
homepage = https://github.com/explosion/thinc;
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
maintainers = with maintainers; [ sdll ];
|
maintainers = with maintainers; [ aborsu sdll ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user