From c50c65c9824b601b2f679fb6cc7908ff1d305c7b Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 4 Dec 2024 07:27:55 +0000 Subject: [PATCH 1/2] python312Packages.transaction: 4.0 -> 5.0 --- pkgs/development/python-modules/transaction/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/transaction/default.nix b/pkgs/development/python-modules/transaction/default.nix index 2b3e0515894a..3a05a645464c 100644 --- a/pkgs/development/python-modules/transaction/default.nix +++ b/pkgs/development/python-modules/transaction/default.nix @@ -9,14 +9,14 @@ buildPythonPackage rec { pname = "transaction"; - version = "4.0"; + version = "5.0"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-aANduRP2DRvhL2Vj0gHaqzbIPnY94ViZ/4M48m5eYvI="; + hash = "sha256-EG5714K8wMtRGfySJbDJpx38U625OL6QUiOtrvIrEXQ="; }; propagatedBuildInputs = [ From 360cf296dc89a1a54ac5edc270debb1b3c2e1d2f Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Wed, 4 Dec 2024 09:29:06 -0500 Subject: [PATCH 2/2] python312Packages.transaction: modernize, add nickcao to maintainers --- .../python-modules/transaction/default.nix | 39 +++++++++++++------ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/transaction/default.nix b/pkgs/development/python-modules/transaction/default.nix index 3a05a645464c..35c19daedc08 100644 --- a/pkgs/development/python-modules/transaction/default.nix +++ b/pkgs/development/python-modules/transaction/default.nix @@ -1,36 +1,51 @@ { lib, - fetchPypi, + fetchFromGitHub, buildPythonPackage, + setuptools, zope-interface, - mock, + pytestCheckHook, pythonOlder, }: buildPythonPackage rec { pname = "transaction"; version = "5.0"; - format = "setuptools"; + pyproject = true; - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.8"; - src = fetchPypi { - inherit pname version; - hash = "sha256-EG5714K8wMtRGfySJbDJpx38U625OL6QUiOtrvIrEXQ="; + src = fetchFromGitHub { + owner = "zopefoundation"; + repo = "transaction"; + rev = "refs/tags/${version}"; + hash = "sha256-8yvA2dvB69+EqsAa+hc93rgg6D64lcajl6JgFabhjwY="; }; - propagatedBuildInputs = [ + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail "setuptools<74" "setuptools" + ''; + + build-system = [ + setuptools + ]; + + dependencies = [ zope-interface - mock + ]; + + nativeCheckInputs = [ + pytestCheckHook ]; pythonImportsCheck = [ "transaction" ]; - meta = with lib; { + meta = { description = "Transaction management"; homepage = "https://transaction.readthedocs.io/"; changelog = "https://github.com/zopefoundation/transaction/blob/${version}/CHANGES.rst"; - license = licenses.zpl20; - maintainers = [ ]; + license = lib.licenses.zpl21; + maintainers = with lib.maintainers; [ nickcao ]; }; }