nixpkgs/pkgs/development/python-modules/spacy/default.nix

82 lines
1.3 KiB
Nix
Raw Normal View History

2017-05-15 11:09:39 +01:00
{ stdenv
, pkgs
, buildPythonPackage
, python
, fetchPypi
2018-03-13 23:02:00 +00:00
, html5lib
, pytest
2017-05-15 11:09:39 +01:00
, cython
, preshed
2018-03-13 23:02:00 +00:00
, ftfy
2017-05-15 11:09:39 +01:00
, numpy
, murmurhash
, plac
, six
, ujson
, dill
, requests
, thinc
, pip
, regex
2017-05-15 11:09:39 +01:00
}:
buildPythonPackage rec {
pname = "spacy";
2018-03-13 23:02:00 +00:00
version = "2.0.9";
2017-05-15 11:09:39 +01:00
2018-03-13 23:02:00 +00:00
src = fetchPypi {
inherit pname version;
sha256 = "1ihkhflhyz67bp73kfjqfrbcgdxi2msz5asbrh0pkk590c4vmms5";
};
2017-05-15 11:09:39 +01:00
2018-03-13 23:02:00 +00:00
prePatch = ''
substituteInPlace setup.py --replace \
"'html5lib==1.0b8'," \
"'html5lib',"
substituteInPlace setup.py --replace \
"'regex==2017.4.5'," \
"'regex',"
substituteInPlace setup.py --replace \
"'ftfy==2017.4.5'," \
"'ftfy',"
substituteInPlace setup.py --replace \
"'pathlib'," \
"\"pathlib; python_version<'3.4'\","
'';
2017-05-15 11:09:39 +01:00
propagatedBuildInputs = [
cython
2018-03-13 23:02:00 +00:00
dill
html5lib
2017-05-15 11:09:39 +01:00
murmurhash
2018-03-13 23:02:00 +00:00
numpy
2017-05-15 11:09:39 +01:00
plac
2018-03-13 23:02:00 +00:00
preshed
regex
requests
2017-05-15 11:09:39 +01:00
six
2018-03-13 23:02:00 +00:00
thinc
2017-05-15 11:09:39 +01:00
ujson
ftfy
2018-03-13 23:02:00 +00:00
];
checkInputs = [
pytest
2017-05-15 11:09:39 +01:00
];
doCheck = false;
# checkPhase = ''
# ${python.interpreter} -m pytest spacy/tests --vectors --models --slow
# '';
2017-05-15 11:09:39 +01:00
meta = with stdenv.lib; {
description = "Industrial-strength Natural Language Processing (NLP) with Python and Cython";
homepage = https://github.com/explosion/spaCy;
license = licenses.mit;
maintainers = with maintainers; [ sdll ];
};
}