From 48eab73bb6145dc3e78325fc1bda679ba5c8645a Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 4 Mar 2023 18:48:23 +0100 Subject: [PATCH 1/3] python310Packages.eradicate: update meta --- .../python-modules/eradicate/default.nix | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/eradicate/default.nix b/pkgs/development/python-modules/eradicate/default.nix index 757dad33c096..362f94a826da 100644 --- a/pkgs/development/python-modules/eradicate/default.nix +++ b/pkgs/development/python-modules/eradicate/default.nix @@ -1,4 +1,7 @@ -{ lib, buildPythonPackage, fetchPypi }: +{ lib +, buildPythonPackage +, fetchPypi +}: buildPythonPackage rec { pname = "eradicate"; @@ -6,14 +9,14 @@ buildPythonPackage rec { src = fetchPypi { inherit pname version; - sha256 = "sha256-qsc4SrJbG/IcTAEt6bS/g5iUWhTJjJEVRbLqUKtVgBQ="; + hash = "sha256-qsc4SrJbG/IcTAEt6bS/g5iUWhTJjJEVRbLqUKtVgBQ="; }; meta = with lib; { - description = "eradicate removes commented-out code from Python files."; + description = "Library to remove commented-out code from Python files"; homepage = "https://github.com/myint/eradicate"; - license = [ licenses.mit ]; - - maintainers = [ maintainers.mmlb ]; + changelog = "https://github.com/wemake-services/eradicate/releases/tag/2.2.0"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ mmlb ]; }; } From 57e21e88b204c55eac1569807dd974741beffb5f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 4 Mar 2023 18:49:51 +0100 Subject: [PATCH 2/3] python310Packages.eradicate: disable on unsupported Python releases --- pkgs/development/python-modules/eradicate/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/eradicate/default.nix b/pkgs/development/python-modules/eradicate/default.nix index 362f94a826da..9905f9cff153 100644 --- a/pkgs/development/python-modules/eradicate/default.nix +++ b/pkgs/development/python-modules/eradicate/default.nix @@ -9,13 +9,13 @@ buildPythonPackage rec { src = fetchPypi { inherit pname version; - hash = "sha256-qsc4SrJbG/IcTAEt6bS/g5iUWhTJjJEVRbLqUKtVgBQ="; + sha256 = "sha256-qsc4SrJbG/IcTAEt6bS/g5iUWhTJjJEVRbLqUKtVgBQ="; }; meta = with lib; { description = "Library to remove commented-out code from Python files"; homepage = "https://github.com/myint/eradicate"; - changelog = "https://github.com/wemake-services/eradicate/releases/tag/2.2.0"; + changelog = "https://github.com/wemake-services/eradicate/releases/tag/${version}"; license = with licenses; [ mit ]; maintainers = with maintainers; [ mmlb ]; }; From e1806091d7374613c403414ae0debb58e6a7c814 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 4 Mar 2023 18:59:44 +0100 Subject: [PATCH 3/3] python310Packages.eradicate: 2.1.0 -> 2.2.0 Diff: https://github.com/wemake-services/eradicate/compare/refs/tags/2.1.0...2.2.0 Changelog: https://github.com/wemake-services/eradicate/releases/tag/2.2.0 --- .../python-modules/eradicate/default.nix | 29 +++++++++++++++---- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/eradicate/default.nix b/pkgs/development/python-modules/eradicate/default.nix index 9905f9cff153..8df654c0a2ed 100644 --- a/pkgs/development/python-modules/eradicate/default.nix +++ b/pkgs/development/python-modules/eradicate/default.nix @@ -1,17 +1,36 @@ { lib , buildPythonPackage -, fetchPypi +, fetchFromGitHub +, pytestCheckHook +, pythonOlder }: buildPythonPackage rec { pname = "eradicate"; - version = "2.1.0"; + version = "2.2.0"; + format = "setuptools"; - src = fetchPypi { - inherit pname version; - sha256 = "sha256-qsc4SrJbG/IcTAEt6bS/g5iUWhTJjJEVRbLqUKtVgBQ="; + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "wemake-services"; + repo = pname; + rev = "refs/tags/${version}"; + sha256 = "sha256-pVjvzW3UVeLMLLYcU0SIE19GEHFmouoA/JKSweTZSGo="; }; + nativeCheckInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "eradicate" + ]; + + pytestFlagsArray = [ + "test_eradicate.py" + ]; + meta = with lib; { description = "Library to remove commented-out code from Python files"; homepage = "https://github.com/myint/eradicate";