python313Packages.stanza: modernize and remove dependencies (#491614)

This commit is contained in:
Sandro
2026-02-19 06:02:26 +00:00
committed by GitHub
@@ -1,47 +1,52 @@
{
lib,
buildPythonPackage,
emoji,
fetchFromGitHub,
# build-system
setuptools,
# dependencies
emoji,
networkx,
numpy,
peft,
protobuf,
requests,
six,
toml,
torch,
tqdm,
transformers,
}:
buildPythonPackage rec {
buildPythonPackage (finalAttrs: {
pname = "stanza";
version = "1.11.0";
format = "setuptools";
pyproject = true;
src = fetchFromGitHub {
owner = "stanfordnlp";
repo = "stanza";
tag = "v${version}";
tag = "v${finalAttrs.version}";
hash = "sha256-zY2+8QuPJTX/HSkE/gKMCWpSanKpYSGZeeYgb4eFuuw=";
};
propagatedBuildInputs = [
build-system = [ setuptools ];
dependencies = [
emoji
networkx
numpy
peft
protobuf
requests
six
toml
torch
tqdm
transformers
];
# Tests require network access
# Most tests require resources from the network (models). Many of the ones that do run are slow
# and some of them fail.
#
# Maintaining a list of "tests we can actually run in CI" isn't feasible, there are WAY too many
# exceptions and no useful pytest marks.
doCheck = false;
pythonImportsCheck = [ "stanza" ];
@@ -49,8 +54,11 @@ buildPythonPackage rec {
meta = {
description = "Official Stanford NLP Python Library for Many Human Languages";
homepage = "https://github.com/stanfordnlp/stanza/";
changelog = "https://github.com/stanfordnlp/stanza/releases/tag/v${version}";
changelog = "https://github.com/stanfordnlp/stanza/releases/tag/${finalAttrs.src.tag}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ riotbib ];
maintainers = with lib.maintainers; [
riotbib
Stebalien
];
};
}
})