From 974a3a22aa6481adf99d02c334aea62110398b76 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 29 Mar 2024 11:30:18 +0100 Subject: [PATCH 1/2] python312Packages.attrdict: refactor --- .../python-modules/attrdict/default.nix | 33 +++++++++---------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/pkgs/development/python-modules/attrdict/default.nix b/pkgs/development/python-modules/attrdict/default.nix index 4054fbd78b68..21d6a1fde8d3 100644 --- a/pkgs/development/python-modules/attrdict/default.nix +++ b/pkgs/development/python-modules/attrdict/default.nix @@ -1,17 +1,16 @@ { lib , buildPythonPackage , fetchPypi -, coverage -, pythonOlder -, nose , pytestCheckHook +, pythonOlder +, setuptools , six }: buildPythonPackage rec { pname = "attrdict"; version = "2.0.1"; - format = "setuptools"; + pyproject = true; disabled = pythonOlder "3.7"; @@ -20,26 +19,25 @@ buildPythonPackage rec { hash = "sha256-NckGmLVcaDlGCRF3F3qenAcToIYPDgSf69cmSczXe3A="; }; - propagatedBuildInputs = [ - six - ]; - - nativeCheckInputs = [ - coverage - nose - ]; - postPatch = '' substituteInPlace attrdict/merge.py \ - --replace "from collections" "from collections.abc" + --replace-fail "from collections" "from collections.abc" substituteInPlace attrdict/mapping.py \ - --replace "from collections" "from collections.abc" + --replace-fail "from collections" "from collections.abc" substituteInPlace attrdict/default.py \ - --replace "from collections" "from collections.abc" + --replace-fail "from collections" "from collections.abc" substituteInPlace attrdict/mixins.py \ - --replace "from collections" "from collections.abc" + --replace-fail "from collections" "from collections.abc" ''; + build-system = [ + setuptools + ]; + + dependencies = [ + six + ]; + # Tests are not shipped and source is not tagged doCheck = false; @@ -50,6 +48,7 @@ buildPythonPackage rec { meta = with lib; { description = "A dict with attribute-style access"; homepage = "https://github.com/bcj/AttrDict"; + changelog = "https://github.com/bcj/AttrDict/releases/tag/v${version}"; license = licenses.mit; maintainers = with maintainers; [ ]; }; From 7f6b573df9d2f4ddb5c296e39d8a75668d199222 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 13 Apr 2024 21:52:45 +0200 Subject: [PATCH 2/2] python312Packages.attrdict: format with nixfmt --- .../python-modules/attrdict/default.nix | 27 ++++++++----------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/pkgs/development/python-modules/attrdict/default.nix b/pkgs/development/python-modules/attrdict/default.nix index 21d6a1fde8d3..fb7bc91ad132 100644 --- a/pkgs/development/python-modules/attrdict/default.nix +++ b/pkgs/development/python-modules/attrdict/default.nix @@ -1,10 +1,11 @@ -{ lib -, buildPythonPackage -, fetchPypi -, pytestCheckHook -, pythonOlder -, setuptools -, six +{ + lib, + buildPythonPackage, + fetchPypi, + pytestCheckHook, + pythonOlder, + setuptools, + six, }: buildPythonPackage rec { @@ -30,20 +31,14 @@ buildPythonPackage rec { --replace-fail "from collections" "from collections.abc" ''; - build-system = [ - setuptools - ]; + build-system = [ setuptools ]; - dependencies = [ - six - ]; + dependencies = [ six ]; # Tests are not shipped and source is not tagged doCheck = false; - pythonImportsCheck = [ - "attrdict" - ]; + pythonImportsCheck = [ "attrdict" ]; meta = with lib; { description = "A dict with attribute-style access";