diff --git a/pkgs/development/python-modules/thinc/default.nix b/pkgs/development/python-modules/thinc/default.nix index 6ad29d5736d6..f2a70500a5fa 100644 --- a/pkgs/development/python-modules/thinc/default.nix +++ b/pkgs/development/python-modules/thinc/default.nix @@ -2,41 +2,48 @@ , lib , buildPythonPackage , fetchPypi -, pythonOlder -, pytest +, pytestCheckHook , blis , catalogue , cymem , cython -, darwin +, Accelerate +, CoreFoundation +, CoreGraphics +, CoreVideo , hypothesis , mock , murmurhash , numpy , pathlib , plac +, pythonOlder , preshed , pydantic , srsly , tqdm +, typing-extensions , wasabi }: buildPythonPackage rec { pname = "thinc"; - version = "8.0.3"; + version = "8.0.10"; + + disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - hash = "sha256-w3CnpG0BtYjY1fmdjV42s8usRRJjg1b6Qw9/Urs6iJc="; + hash = "sha256-teTbjSTmvopfHkoXhUdyt5orVgIkUZ9Qoh85UcokAB8="; }; - buildInputs = [ cython ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + buildInputs = [ cython ] + ++ lib.optionals stdenv.isDarwin [ Accelerate CoreFoundation CoreGraphics CoreVideo - ]); + ]; propagatedBuildInputs = [ blis @@ -50,27 +57,20 @@ buildPythonPackage rec { tqdm pydantic wasabi - ] ++ lib.optional (pythonOlder "3.4") pathlib; - + ] ++ lib.optional (pythonOlder "3.8") typing-extensions; checkInputs = [ hypothesis mock - pytest + pytestCheckHook ]; # Cannot find cython modules. doCheck = false; - postPatch = '' - substituteInPlace setup.cfg \ - --replace "blis>=0.4.0,<0.8.0" "blis>=0.4.0,<1.0" \ - --replace "pydantic>=1.7.1,<1.8.0" "pydantic~=1.7" - ''; - - checkPhase = '' - pytest thinc/tests - ''; + pytestFlagsArray = [ + "thinc/tests" + ]; pythonImportsCheck = [ "thinc" ]; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 95af7eef4d72..b317230c9a7d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9022,7 +9022,9 @@ in { thespian = callPackage ../development/python-modules/thespian { }; - thinc = callPackage ../development/python-modules/thinc { }; + thinc = callPackage ../development/python-modules/thinc { + inherit (pkgs.darwin.apple_sdk.frameworks) Accelerate CoreFoundation CoreGraphics CoreVideo; + }; threadpool = callPackage ../development/python-modules/threadpool { };