depot/third_party/nixpkgs/pkgs/development/python-modules/spacy-transformers/default.nix
Default email c7e6337bd0 Project import generated by Copybara.
GitOrigin-RevId: 08e4dc3a907a6dfec8bb3bbf1540d8abbffea22b
2023-04-29 12:46:19 -04:00

58 lines
1.1 KiB
Nix

{ lib
, callPackage
, fetchPypi
, buildPythonPackage
, pythonRelaxDepsHook
, torch
, pythonOlder
, spacy
, spacy-alignments
, srsly
, transformers
}:
buildPythonPackage rec {
pname = "spacy-transformers";
version = "1.2.3";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-oNdH0oZNo8XWx+bbzwZs7iXD0Af6zx1k6wBYksgtp4w=";
};
nativeBuildInputs = [
pythonRelaxDepsHook
];
propagatedBuildInputs = [
torch
spacy
spacy-alignments
srsly
transformers
];
pythonRelaxDeps = [
"transformers"
];
# Test fails due to missing arguments for trfs2arrays().
doCheck = false;
pythonImportsCheck = [
"spacy_transformers"
];
passthru.tests.annotation = callPackage ./annotation-test { };
meta = with lib; {
description = "spaCy pipelines for pretrained BERT, XLNet and GPT-2";
homepage = "https://github.com/explosion/spacy-transformers";
changelog = "https://github.com/explosion/spacy-transformers/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ ];
};
}