From 0eb2ee3fb7f3dfa15d8f74943b5abaa00ad6a55c Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 29 May 2022 18:18:12 +0200 Subject: [PATCH] python310Packages.fakeredis: 1.7.5 -> 1.8 --- .../python-modules/fakeredis/default.nix | 37 +++++++++++-------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/pkgs/development/python-modules/fakeredis/default.nix b/pkgs/development/python-modules/fakeredis/default.nix index a75f2e3da959..b42ecc5bd261 100644 --- a/pkgs/development/python-modules/fakeredis/default.nix +++ b/pkgs/development/python-modules/fakeredis/default.nix @@ -1,13 +1,13 @@ { lib , aioredis -, async_generator , buildPythonPackage -, fetchPypi +, fetchFromGitHub , hypothesis , lupa +, poetry-core , pytest-asyncio -, pytest-mock , pytestCheckHook +, pytest-mock , pythonOlder , redis , six @@ -16,44 +16,51 @@ buildPythonPackage rec { pname = "fakeredis"; - version = "1.7.5"; + version = "1.8"; format = "pyproject"; disabled = pythonOlder "3.7"; - src = fetchPypi { - inherit pname version; - hash = "sha256-STdcYwmB3UBF2akuJwn81Edskfkn4CKEk+76Yl5wUTM="; + src = fetchFromGitHub { + owner = "dsoftwareinc"; + repo = "fakeredis-py"; + rev = "v${version}"; + hash = "sha256-HWt2EE25h8zUarknrNMBJmizP3rNM9W8IEUMxLyUii8="; }; - postPatch = '' - substituteInPlace setup.cfg \ - --replace "redis<4.2.0" "redis" - ''; + nativeBuildInputs = [ + poetry-core + ]; propagatedBuildInputs = [ - aioredis - lupa redis six sortedcontainers ]; checkInputs = [ - async_generator hypothesis pytest-asyncio pytest-mock pytestCheckHook ]; + passthru.optional-dependencies = { + lua = [ + lupa + ]; + aioredis = [ + aioredis + ]; + }; + pythonImportsCheck = [ "fakeredis" ]; meta = with lib; { description = "Fake implementation of Redis API"; - homepage = "https://github.com/jamesls/fakeredis"; + homepage = "https://github.com/dsoftwareinc/fakeredis-py"; license = with licenses; [ mit ]; maintainers = with maintainers; [ fab ]; };