0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 21:50:33 +03:00

python312Packages.spacy: cleanup, mark as broken (#400518)

This commit is contained in:
Gaétan Lepage 2025-04-21 15:58:43 +02:00 committed by GitHub
commit 8399dc7d28
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2,38 +2,47 @@
lib,
stdenv,
buildPythonPackage,
callPackage,
catalogue,
fetchFromGitHub,
# build-system
cymem,
cython_0,
fetchPypi,
git,
hypothesis,
murmurhash,
numpy,
preshed,
thinc,
# dependencies
catalogue,
jinja2,
langcodes,
mock,
murmurhash,
nix-update,
nix,
numpy,
packaging,
preshed,
pydantic,
pytestCheckHook,
pythonOlder,
requests,
setuptools,
spacy-legacy,
spacy-loggers,
spacy-lookups-data,
spacy-transformers,
srsly,
thinc,
tqdm,
typer,
wasabi,
weasel,
# optional-dependencies
spacy-transformers,
spacy-lookups-data,
# tests
pytestCheckHook,
hypothesis,
mock,
# passthru
writeScript,
git,
nix,
nix-update,
callPackage,
}:
buildPythonPackage rec {
@ -41,17 +50,13 @@ buildPythonPackage rec {
version = "3.8.5";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-OLyLh3+yT0FJBf8XliADFgfNMf5vkA1noGcwFCcVZRw=";
src = fetchFromGitHub {
owner = "explosion";
repo = "spaCy";
tag = "release-v${version}";
hash = "sha256-rgMstGSscUBACA5+veXD9H/lHuvWKs7hJ6hz6aKOB/0=";
};
postPatch = ''
# unpin numpy, cannot use pythonRelaxDeps because it's in build-system
substituteInPlace pyproject.toml setup.cfg \
--replace-fail ",<2.1.0" ""
'';
build-system = [
cymem
cython_0
@ -85,17 +90,17 @@ buildPythonPackage rec {
weasel
];
optional-dependencies = {
transformers = [ spacy-transformers ];
lookups = [ spacy-lookups-data ];
};
nativeCheckInputs = [
pytestCheckHook
hypothesis
mock
];
optional-dependencies = {
transformers = [ spacy-transformers ];
lookups = [ spacy-lookups-data ];
};
# Fixes ModuleNotFoundError when running tests on Cythonized code. See #255262
preCheck = ''
cd $out
@ -118,8 +123,8 @@ buildPythonPackage rec {
set -eou pipefail
PATH=${
lib.makeBinPath [
nix
git
nix
nix-update
]
}
@ -132,12 +137,14 @@ buildPythonPackage rec {
tests.annotation = callPackage ./annotation-test { };
};
meta = with lib; {
meta = {
description = "Industrial-strength Natural Language Processing (NLP)";
homepage = "https://github.com/explosion/spaCy";
changelog = "https://github.com/explosion/spaCy/releases/tag/release-v${version}";
license = licenses.mit;
license = lib.licenses.mit;
maintainers = [ ];
mainProgram = "spacy";
# Cython.Compiler.Errors.CompileError: spacy/ml/parser_model.pyx
broken = true;
};
}