14 buildPythonPackage rec {
15 pname = "spacy-transformers";
17 format = "setuptools";
19 disabled = pythonOlder "3.6";
22 inherit pname version;
23 hash = "sha256-e7YuBEq2yggW5G2pJ0Rjw9z3c1jqgRKCifYSfnzblVs=";
26 propagatedBuildInputs = [
32 ] ++ lib.optionals (pythonOlder "3.7") [
37 substituteInPlace setup.cfg \
38 --replace "transformers>=3.4.0,<4.22.0" "transformers>=3.4.0 # ,<4.22.0"
41 # Test fails due to missing arguments for trfs2arrays().
44 pythonImportsCheck = [
48 passthru.tests.annotation = callPackage ./annotation-test { };
51 description = "spaCy pipelines for pretrained BERT, XLNet and GPT-2";
52 homepage = "https://github.com/explosion/spacy-transformers";
53 license = licenses.mit;
54 maintainers = with maintainers; [ ];