0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-14 06:00: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, lib,
stdenv, stdenv,
buildPythonPackage, buildPythonPackage,
callPackage, fetchFromGitHub,
catalogue,
# build-system
cymem, cymem,
cython_0, cython_0,
fetchPypi, murmurhash,
git, numpy,
hypothesis, preshed,
thinc,
# dependencies
catalogue,
jinja2, jinja2,
langcodes, langcodes,
mock,
murmurhash,
nix-update,
nix,
numpy,
packaging, packaging,
preshed,
pydantic, pydantic,
pytestCheckHook,
pythonOlder,
requests, requests,
setuptools, setuptools,
spacy-legacy, spacy-legacy,
spacy-loggers, spacy-loggers,
spacy-lookups-data,
spacy-transformers,
srsly, srsly,
thinc,
tqdm, tqdm,
typer, typer,
wasabi, wasabi,
weasel, weasel,
# optional-dependencies
spacy-transformers,
spacy-lookups-data,
# tests
pytestCheckHook,
hypothesis,
mock,
# passthru
writeScript, writeScript,
git,
nix,
nix-update,
callPackage,
}: }:
buildPythonPackage rec { buildPythonPackage rec {
@ -41,17 +50,13 @@ buildPythonPackage rec {
version = "3.8.5"; version = "3.8.5";
pyproject = true; pyproject = true;
src = fetchPypi { src = fetchFromGitHub {
inherit pname version; owner = "explosion";
hash = "sha256-OLyLh3+yT0FJBf8XliADFgfNMf5vkA1noGcwFCcVZRw="; 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 = [ build-system = [
cymem cymem
cython_0 cython_0
@ -85,17 +90,17 @@ buildPythonPackage rec {
weasel weasel
]; ];
optional-dependencies = {
transformers = [ spacy-transformers ];
lookups = [ spacy-lookups-data ];
};
nativeCheckInputs = [ nativeCheckInputs = [
pytestCheckHook pytestCheckHook
hypothesis hypothesis
mock mock
]; ];
optional-dependencies = {
transformers = [ spacy-transformers ];
lookups = [ spacy-lookups-data ];
};
# Fixes ModuleNotFoundError when running tests on Cythonized code. See #255262 # Fixes ModuleNotFoundError when running tests on Cythonized code. See #255262
preCheck = '' preCheck = ''
cd $out cd $out
@ -118,8 +123,8 @@ buildPythonPackage rec {
set -eou pipefail set -eou pipefail
PATH=${ PATH=${
lib.makeBinPath [ lib.makeBinPath [
nix
git git
nix
nix-update nix-update
] ]
} }
@ -132,12 +137,14 @@ buildPythonPackage rec {
tests.annotation = callPackage ./annotation-test { }; tests.annotation = callPackage ./annotation-test { };
}; };
meta = with lib; { meta = {
description = "Industrial-strength Natural Language Processing (NLP)"; description = "Industrial-strength Natural Language Processing (NLP)";
homepage = "https://github.com/explosion/spaCy"; homepage = "https://github.com/explosion/spaCy";
changelog = "https://github.com/explosion/spaCy/releases/tag/release-v${version}"; changelog = "https://github.com/explosion/spaCy/releases/tag/release-v${version}";
license = licenses.mit; license = lib.licenses.mit;
maintainers = [ ]; maintainers = [ ];
mainProgram = "spacy"; mainProgram = "spacy";
# Cython.Compiler.Errors.CompileError: spacy/ml/parser_model.pyx
broken = true;
}; };
} }