Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.09 1.5 kB view raw
1{ lib 2, buildPythonPackage 3, callPackage 4, fetchPypi 5, pythonOlder 6, pytest 7, blis 8, catalogue 9, cymem 10, jsonschema 11, murmurhash 12, numpy 13, pathlib 14, plac 15, preshed 16, requests 17, setuptools 18, srsly 19, thinc 20, wasabi 21}: 22 23buildPythonPackage rec { 24 pname = "spacy"; 25 version = "2.3.2"; 26 27 src = fetchPypi { 28 inherit pname version; 29 sha256 = "07zf7kivj4r1n6xwisld7n90bpi095bqbc9xpv668grq1rpf53c1"; 30 }; 31 32 propagatedBuildInputs = [ 33 blis 34 catalogue 35 cymem 36 jsonschema 37 murmurhash 38 numpy 39 plac 40 preshed 41 requests 42 setuptools 43 srsly 44 thinc 45 wasabi 46 ] ++ lib.optional (pythonOlder "3.4") pathlib; 47 48 checkInputs = [ 49 pytest 50 ]; 51 52 doCheck = false; 53 # checkPhase = '' 54 # ${python.interpreter} -m pytest spacy/tests --vectors --models --slow 55 # ''; 56 57 postPatch = '' 58 substituteInPlace setup.cfg \ 59 --replace "blis>=0.4.0,<0.5.0" "blis>=0.4.0,<1.0" \ 60 --replace "catalogue>=0.0.7,<1.1.0" "catalogue>=0.0.7,<3.0" \ 61 --replace "plac>=0.9.6,<1.2.0" "plac>=0.9.6,<2.0" \ 62 --replace "srsly>=1.0.2,<1.1.0" "srsly>=1.0.2,<3.0" \ 63 --replace "thinc==7.4.1" "thinc>=7.4.1,<8" 64 ''; 65 66 pythonImportsCheck = [ "spacy" ]; 67 68 passthru.tests = callPackage ./annotation-test {}; 69 70 meta = with lib; { 71 description = "Industrial-strength Natural Language Processing (NLP) with Python and Cython"; 72 homepage = "https://github.com/explosion/spaCy"; 73 license = licenses.mit; 74 maintainers = with maintainers; [ danieldk sdll ]; 75 }; 76}