diff options
author | Alyssa Ross <hi@alyssa.is> | 2024-03-22 16:41:59 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2024-03-22 16:41:59 +0100 |
commit | 46a88117a05c3469af5d99433af140c3de8ca088 (patch) | |
tree | d7f0557756d8f07a3081b3498c05ddc5a8ad429d /nixpkgs/pkgs/development/python-modules/spacy/default.nix | |
parent | e97457545cea0b2ca421da257c83d8f1ef451d85 (diff) | |
parent | a343533bccc62400e8a9560423486a3b6c11a23b (diff) | |
download | nixlib-46a88117a05c3469af5d99433af140c3de8ca088.tar nixlib-46a88117a05c3469af5d99433af140c3de8ca088.tar.gz nixlib-46a88117a05c3469af5d99433af140c3de8ca088.tar.bz2 nixlib-46a88117a05c3469af5d99433af140c3de8ca088.tar.lz nixlib-46a88117a05c3469af5d99433af140c3de8ca088.tar.xz nixlib-46a88117a05c3469af5d99433af140c3de8ca088.tar.zst nixlib-46a88117a05c3469af5d99433af140c3de8ca088.zip |
Merge commit 'a343533bccc62400e8a9560423486a3b6c11a23b'
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/spacy/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/spacy/default.nix | 47 |
1 files changed, 29 insertions, 18 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/spacy/default.nix b/nixpkgs/pkgs/development/python-modules/spacy/default.nix index 406d687bba96..3fb467475fb7 100644 --- a/nixpkgs/pkgs/development/python-modules/spacy/default.nix +++ b/nixpkgs/pkgs/development/python-modules/spacy/default.nix @@ -6,16 +6,18 @@ , catalogue , cymem , fetchPypi +, hypothesis , jinja2 , jsonschema , langcodes +, mock , murmurhash , numpy , packaging , pathy , preshed , pydantic -, pytest +, pytestCheckHook , python , pythonOlder , pythonRelaxDepsHook @@ -38,14 +40,14 @@ buildPythonPackage rec { pname = "spacy"; - version = "3.7.3"; + version = "3.7.4"; pyproject = true; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-mSZQKPvcbhIknFMwXkYfeaEDY3sOaGbCivDkY2X3UeE="; + hash = "sha256-Ul8s7S5AdhViyMrOk+9qHm6MSD8nvVZLwbFfYI776Fs="; }; pythonRelaxDeps = [ @@ -83,35 +85,44 @@ buildPythonPackage rec { typing-extensions ]; - postPatch = '' - substituteInPlace setup.cfg \ - --replace "thinc>=8.1.8,<8.2.0" "thinc>=8.1.8" - ''; - nativeCheckInputs = [ - pytest + pytestCheckHook + hypothesis + mock ]; - doCheck = false; + doCheck = true; - checkPhase = '' - ${python.interpreter} -m pytest spacy/tests --vectors --models --slow + # Fixes ModuleNotFoundError when running tests on Cythonized code. See #255262 + preCheck = '' + cd $out ''; + pytestFlagsArray = [ + "-m 'slow'" + ]; + + disabledTests = [ + # touches network + "test_download_compatibility" + "test_validate_compatibility_table" + "test_project_assets" + ]; + pythonImportsCheck = [ "spacy" ]; passthru = { updateScript = writeScript "update-spacy" '' - #!${stdenv.shell} - set -eou pipefail - PATH=${lib.makeBinPath [ nix git nix-update ]} + #!${stdenv.shell} + set -eou pipefail + PATH=${lib.makeBinPath [ nix git nix-update ]} - nix-update python3Packages.spacy + nix-update python3Packages.spacy - # update spacy models as well - echo | nix-shell maintainers/scripts/update.nix --argstr package python3Packages.spacy_models.en_core_web_sm + # update spacy models as well + echo | nix-shell maintainers/scripts/update.nix --argstr package python3Packages.spacy_models.en_core_web_sm ''; tests.annotation = callPackage ./annotation-test { }; }; |