2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2020-08-20 17:08:02 +00:00
|
|
|
, callPackage
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchPypi
|
|
|
|
, pythonOlder
|
|
|
|
, pytest
|
|
|
|
, blis
|
|
|
|
, catalogue
|
|
|
|
, cymem
|
2021-05-20 23:08:51 +00:00
|
|
|
, jinja2
|
2020-04-24 23:36:52 +00:00
|
|
|
, jsonschema
|
|
|
|
, murmurhash
|
|
|
|
, numpy
|
|
|
|
, preshed
|
|
|
|
, requests
|
|
|
|
, setuptools
|
|
|
|
, srsly
|
2021-05-20 23:08:51 +00:00
|
|
|
, spacy-legacy
|
2020-04-24 23:36:52 +00:00
|
|
|
, thinc
|
2021-05-20 23:08:51 +00:00
|
|
|
, typer
|
2020-04-24 23:36:52 +00:00
|
|
|
, wasabi
|
2021-05-20 23:08:51 +00:00
|
|
|
, packaging
|
|
|
|
, pathy
|
|
|
|
, pydantic
|
2021-10-06 13:57:05 +00:00
|
|
|
, python
|
|
|
|
, tqdm
|
|
|
|
, typing-extensions
|
2022-01-19 23:45:15 +00:00
|
|
|
, spacy-loggers
|
|
|
|
, langcodes
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "spacy";
|
2022-03-05 16:20:37 +00:00
|
|
|
version = "3.2.3";
|
2021-10-06 13:57:05 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-03-05 16:20:37 +00:00
|
|
|
sha256 = "sha256-JdAz/Ae4+/yb3Te3cLilhtxBTb1gMShEmvMldqOJFnM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2020-12-25 13:55:36 +00:00
|
|
|
blis
|
|
|
|
catalogue
|
|
|
|
cymem
|
2021-05-20 23:08:51 +00:00
|
|
|
jinja2
|
2020-12-25 13:55:36 +00:00
|
|
|
jsonschema
|
|
|
|
murmurhash
|
|
|
|
numpy
|
2021-10-06 13:57:05 +00:00
|
|
|
packaging
|
|
|
|
pathy
|
2020-12-25 13:55:36 +00:00
|
|
|
preshed
|
2021-10-06 13:57:05 +00:00
|
|
|
pydantic
|
2020-12-25 13:55:36 +00:00
|
|
|
requests
|
|
|
|
setuptools
|
|
|
|
srsly
|
2021-05-20 23:08:51 +00:00
|
|
|
spacy-legacy
|
2020-12-25 13:55:36 +00:00
|
|
|
thinc
|
2021-10-06 13:57:05 +00:00
|
|
|
tqdm
|
2021-05-20 23:08:51 +00:00
|
|
|
typer
|
2021-10-06 13:57:05 +00:00
|
|
|
wasabi
|
2022-01-19 23:45:15 +00:00
|
|
|
spacy-loggers
|
|
|
|
langcodes
|
2021-10-06 13:57:05 +00:00
|
|
|
] ++ lib.optional (pythonOlder "3.8") typing-extensions;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "pydantic>=1.7.4,!=1.8,!=1.8.1,<1.9.0" "pydantic~=1.2"
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytest
|
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = false;
|
2021-10-06 13:57:05 +00:00
|
|
|
checkPhase = ''
|
|
|
|
${python.interpreter} -m pytest spacy/tests --vectors --models --slow
|
2020-05-29 06:06:01 +00:00
|
|
|
'';
|
|
|
|
|
2020-06-15 15:56:04 +00:00
|
|
|
pythonImportsCheck = [ "spacy" ];
|
|
|
|
|
2020-12-25 13:55:36 +00:00
|
|
|
passthru.tests.annotation = callPackage ./annotation-test { };
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Industrial-strength Natural Language Processing (NLP) with Python and Cython";
|
|
|
|
homepage = "https://github.com/explosion/spaCy";
|
|
|
|
license = licenses.mit;
|
2021-09-22 15:38:15 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-06-18 07:06:33 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
}
|