From d892462a7557abf5d4738a722d3e4684ca4c36dc Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 31 Jan 2021 17:42:24 +0100 Subject: [PATCH 1/3] python3Packages.cachetools: 4.1.1 -> 4.2.1 --- pkgs/development/python-modules/cachetools/default.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/cachetools/default.nix b/pkgs/development/python-modules/cachetools/default.nix index 56efa9a34852..fce9ae7a7591 100644 --- a/pkgs/development/python-modules/cachetools/default.nix +++ b/pkgs/development/python-modules/cachetools/default.nix @@ -1,12 +1,16 @@ -{ lib, buildPythonPackage, fetchPypi, isPy27 }: +{ lib +, buildPythonPackage +, fetchPypi +, isPy27 +}: buildPythonPackage rec { pname = "cachetools"; - version = "4.1.1"; + version = "4.2.1"; src = fetchPypi { inherit pname version; - sha256 = "bbaa39c3dede00175df2dc2b03d0cf18dd2d32a7de7beb68072d13043c9edb20"; + sha256 = "sha256-9Gninnqkz/ZNjeSq2VznbejqESWhbGjg2T9lw8Pckuk="; }; meta = with lib; { From a3cdaa5ec6d1abb5788ecbcf7a269175cf37917d Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 31 Jan 2021 17:46:15 +0100 Subject: [PATCH 2/3] python3Packages.cachetools: enable tests --- .../python-modules/cachetools/default.nix | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/cachetools/default.nix b/pkgs/development/python-modules/cachetools/default.nix index fce9ae7a7591..120fd5df124b 100644 --- a/pkgs/development/python-modules/cachetools/default.nix +++ b/pkgs/development/python-modules/cachetools/default.nix @@ -1,21 +1,28 @@ { lib , buildPythonPackage -, fetchPypi -, isPy27 +, fetchFromGitHub +, pytestCheckHook }: buildPythonPackage rec { pname = "cachetools"; version = "4.2.1"; - src = fetchPypi { - inherit pname version; - sha256 = "sha256-9Gninnqkz/ZNjeSq2VznbejqESWhbGjg2T9lw8Pckuk="; + src = fetchFromGitHub { + owner = "tkem"; + repo = pname; + rev = "v${version}"; + sha256 = "1b662ph8m2d05d2vi3izgnr6v7h9zfvscfsaaw8nhdmmm15ivfa6"; }; + checkInputs = [ pytestCheckHook ]; + + pythonImportsCheck = [ "cachetools" ]; + meta = with lib; { description = "Extensible memoizing collections and decorators"; homepage = "https://github.com/tkem/cachetools"; - license = licenses.mit; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; }; } From bcc3ab1d3756cf57bb5e6583eede22dc98547be4 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 1 Feb 2021 11:08:48 +0100 Subject: [PATCH 3/3] python3Packages.cachetools: remove cachetools_2 --- pkgs/top-level/python-packages.nix | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 23efec76c1f4..7727f076fefa 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1119,16 +1119,7 @@ in { cachelib = callPackage ../development/python-modules/cachelib { }; - cachetools = let - cachetools' = callPackage ../development/python-modules/cachetools { }; - cachetools_2 = cachetools'.overridePythonAttrs (oldAttrs: rec { - version = "3.1.1"; - src = oldAttrs.src.override { - inherit version; - sha256 = "16m69l6n6y1r1y7cklm92rr7v69ldig2n3lbl3j323w5jz7d78lf"; - }; - }); - in if isPy3k then cachetools' else cachetools_2; + cachetools = callPackage ../development/python-modules/cachetools { }; cachy = callPackage ../development/python-modules/cachy { };