From 8396ec6f6d68c2eff29b5a74aee1f47c0c26b35b Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 26 Jun 2023 04:21:27 +0000 Subject: [PATCH 1/3] python310Packages.mt-940: 4.28.0 -> 4.30.0 --- pkgs/development/python-modules/mt-940/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/mt-940/default.nix b/pkgs/development/python-modules/mt-940/default.nix index ae455229035d..06a7430e662a 100644 --- a/pkgs/development/python-modules/mt-940/default.nix +++ b/pkgs/development/python-modules/mt-940/default.nix @@ -3,12 +3,12 @@ }: buildPythonPackage rec { - version = "4.28.0"; + version = "4.30.0"; pname = "mt-940"; src = fetchPypi { inherit pname version; - hash = "sha256-ydTOaijDmA2ogIONzRMMoz+5jr99qxWM1zzGGzg7f2Q="; + hash = "sha256-2hTi7ITWxuhWBNKmuKgAsI7GAANRrN5QHEHrZigZKVw="; }; propagatedBuildInputs = lib.optional (!isPy3k) enum34; From f76121ffe4ffbc77ef7e2dfcab1f3adc707f2e0b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 26 Jun 2023 08:37:55 +0200 Subject: [PATCH 2/3] python310Packages.mt-940: add changelog to meta --- pkgs/development/python-modules/mt-940/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/mt-940/default.nix b/pkgs/development/python-modules/mt-940/default.nix index 06a7430e662a..938f2d85e525 100644 --- a/pkgs/development/python-modules/mt-940/default.nix +++ b/pkgs/development/python-modules/mt-940/default.nix @@ -24,8 +24,9 @@ buildPythonPackage rec { pythonImportsCheck = [ "mt940" ]; meta = with lib; { - description = "A library to parse MT940 files and returns smart Python collections for statistics and manipulation"; + description = "Module to parse MT940 files and returns smart Python collections for statistics and manipulation"; homepage = "https://github.com/WoLpH/mt940"; + changelog = "https://github.com/wolph/mt940/releases/tag/v${version}"; license = licenses.bsd3; }; } From eb9c56e3c401f21ee8b045fb646230b0c561804d Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 26 Jun 2023 08:49:12 +0200 Subject: [PATCH 3/3] python311Packages.mt-940: enable tests --- .../python-modules/mt-940/default.nix | 47 +++++++++++++------ 1 file changed, 32 insertions(+), 15 deletions(-) diff --git a/pkgs/development/python-modules/mt-940/default.nix b/pkgs/development/python-modules/mt-940/default.nix index 938f2d85e525..e8a032142254 100644 --- a/pkgs/development/python-modules/mt-940/default.nix +++ b/pkgs/development/python-modules/mt-940/default.nix @@ -1,32 +1,49 @@ -{ lib, buildPythonPackage, fetchPypi, isPy3k -, enum34, pyyaml, pytest +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +, pythonOlder +, pyyaml +, setuptools }: buildPythonPackage rec { - version = "4.30.0"; pname = "mt-940"; + version = "4.30.0"; + format = "setuptools"; - src = fetchPypi { - inherit pname version; - hash = "sha256-2hTi7ITWxuhWBNKmuKgAsI7GAANRrN5QHEHrZigZKVw="; + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "wolph"; + repo = "mt940"; + rev = "refs/tags/v${version}"; + hash = "sha256-t6FOMu+KcEib+TZAv5uVAzvrUSt/k/RQn28jpdAY5Y0="; }; - propagatedBuildInputs = lib.optional (!isPy3k) enum34; - - nativeCheckInputs = [ pyyaml pytest ]; - - # requires tests files that are not present - doCheck = false; - checkPhase = '' - py.test + postPatch = '' + sed -i "/--cov/d" pytest.ini + sed -i "/--no-cov/d" pytest.ini ''; - pythonImportsCheck = [ "mt940" ]; + nativeBuildInputs = [ + setuptools + ]; + + nativeCheckInputs = [ + pyyaml + pytestCheckHook + ]; + + pythonImportsCheck = [ + "mt940" + ]; meta = with lib; { description = "Module to parse MT940 files and returns smart Python collections for statistics and manipulation"; homepage = "https://github.com/WoLpH/mt940"; changelog = "https://github.com/wolph/mt940/releases/tag/v${version}"; license = licenses.bsd3; + maintainers = with maintainers; [ ]; }; }