From f51384492939c906342c96cbac0b352309d685a9 Mon Sep 17 00:00:00 2001 From: Martin Joerg Date: Sat, 8 Feb 2025 08:22:32 +0000 Subject: [PATCH 1/2] python313Packages.sacrebleu: refactor, add missing setuptools-scm --- .../python-modules/sacrebleu/default.nix | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/sacrebleu/default.nix b/pkgs/development/python-modules/sacrebleu/default.nix index c9f167bbf2ee..01cd4961d213 100644 --- a/pkgs/development/python-modules/sacrebleu/default.nix +++ b/pkgs/development/python-modules/sacrebleu/default.nix @@ -3,6 +3,9 @@ buildPythonPackage, fetchFromGitHub, + # build-system + setuptools-scm, + # Propagated build inputs portalocker, regex, @@ -20,21 +23,18 @@ let in buildPythonPackage { inherit pname version; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "mjpost"; - repo = pname; + repo = "sacrebleu"; tag = "v${version}"; hash = "sha256-ErssNc8X376E26maGJo/P19CA7FDxZ4/h6mgRB+YNZc="; }; - # postPatch = '' - # substituteInPlace setup.py \ - # --replace "portalocker==" "portalocker>=" - # ''; + build-system = [ setuptools-scm ]; - propagatedBuildInputs = [ + dependencies = [ portalocker regex tabulate @@ -43,7 +43,7 @@ buildPythonPackage { lxml ]; - checkInputs = [ pytestCheckHook ]; + nativeCheckInputs = [ pytestCheckHook ]; disabledTestPaths = [ # require network access @@ -57,12 +57,12 @@ buildPythonPackage { pythonImportsCheck = [ "sacrebleu" ]; - meta = with lib; { + meta = { description = "Hassle-free computation of shareable, comparable, and reproducible BLEU, chrF, and TER scores"; mainProgram = "sacrebleu"; homepage = "https://github.com/mjpost/sacrebleu"; - changelog = "https://github.com/mjpost/sacrebleu/blob/v{version}/CHANGELOG.md"; - license = licenses.asl20; - maintainers = with maintainers; [ happysalada ]; + changelog = "https://github.com/mjpost/sacrebleu/blob/v${version}/CHANGELOG.md"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ happysalada ]; }; } From 22b3d78d9f8a68bcbc8a4de2fe9aae21fe80187c Mon Sep 17 00:00:00 2001 From: Martin Joerg Date: Sat, 8 Feb 2025 08:22:32 +0000 Subject: [PATCH 2/2] python313Packages.sacrebleu: 2.5.0 -> 2.5.1 https://github.com/mjpost/sacrebleu/blob/v2.5.1/CHANGELOG.md https://github.com/mjpost/sacrebleu/compare/refs/tags/v2.5.0...refs/tags/v2.5.1 --- pkgs/development/python-modules/sacrebleu/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/sacrebleu/default.nix b/pkgs/development/python-modules/sacrebleu/default.nix index 01cd4961d213..72ea5077cd80 100644 --- a/pkgs/development/python-modules/sacrebleu/default.nix +++ b/pkgs/development/python-modules/sacrebleu/default.nix @@ -19,7 +19,7 @@ }: let pname = "sacrebleu"; - version = "2.5.0"; + version = "2.5.1"; in buildPythonPackage { inherit pname version; @@ -29,7 +29,7 @@ buildPythonPackage { owner = "mjpost"; repo = "sacrebleu"; tag = "v${version}"; - hash = "sha256-ErssNc8X376E26maGJo/P19CA7FDxZ4/h6mgRB+YNZc="; + hash = "sha256-nLZotWQLrN9hB1fBuDJkvGr4SMvQz8Ucl8ybpNhf9Ic="; }; build-system = [ setuptools-scm ];