nixpkgs/pkgs/development/python-modules/spacy/default.nix
Jon e249ee41e1
Merge pull request #67716 from danieldk/blis-thinc-update
pythonPackages.blis: 0.2.4 -> 0.4.0, pythonPackages.thinc: 7.0.8 -> 7.1.0
2019-09-30 08:17:03 -07:00

80 lines
1.3 KiB
Nix

{ lib
, buildPythonPackage
, fetchPypi
, pythonOlder
, pytest
, preshed
, ftfy
, numpy
, murmurhash
, plac
, ujson
, dill
, requests
, thinc
, regex
, cymem
, pathlib
, msgpack
, msgpack-numpy
, jsonschema
, blis
, wasabi
, srsly
, setuptools
}:
buildPythonPackage rec {
pname = "spacy";
version = "2.1.8";
src = fetchPypi {
inherit pname version;
sha256 = "1dja0crbai2n1l19m0hkv2fkj9r6zzy5ijd6dffp60v7lrch8lcw";
};
prePatch = ''
substituteInPlace setup.py \
--replace "plac<1.0.0,>=0.9.6" "plac>=0.9.6" \
--replace "thinc>=7.0.8,<7.1.0" "thinc>=7.0.8" \
--replace "blis>=0.2.2,<0.3.0" "blis>=0.2.2"
'';
propagatedBuildInputs = [
numpy
murmurhash
cymem
preshed
thinc
plac
ujson
dill
requests
regex
ftfy
msgpack
msgpack-numpy
jsonschema
blis
wasabi
srsly
setuptools
] ++ lib.optional (pythonOlder "3.4") pathlib;
checkInputs = [
pytest
];
doCheck = false;
# checkPhase = ''
# ${python.interpreter} -m pytest spacy/tests --vectors --models --slow
# '';
meta = with lib; {
description = "Industrial-strength Natural Language Processing (NLP) with Python and Cython";
homepage = https://github.com/explosion/spaCy;
license = licenses.mit;
maintainers = with maintainers; [ danieldk sdll ];
};
}