diff --git a/pkgs/development/python-modules/stanza/default.nix b/pkgs/development/python-modules/stanza/default.nix index 9944f2d3d673..ecdcb30b062f 100644 --- a/pkgs/development/python-modules/stanza/default.nix +++ b/pkgs/development/python-modules/stanza/default.nix @@ -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 + ]; }; -} +})