Unverified Commit 10f1f07a authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

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

parents 8a2ff661 8b22469f
Loading
Loading
Loading
Loading
+21 −13
Original line number Diff line number Diff line
{
  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
    ];
  };
}
})