2022-01-26 04:04:25 +00:00
|
|
|
{ lib
|
|
|
|
, fetchPypi
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
|
|
|
|
# propagates
|
|
|
|
, cryptography
|
|
|
|
, deprecated
|
|
|
|
, hiredis
|
|
|
|
, importlib-metadata
|
|
|
|
, packaging
|
|
|
|
, requests
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "redis";
|
2022-01-26 04:04:25 +00:00
|
|
|
version = "4.1.0";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-01-26 04:04:25 +00:00
|
|
|
sha256 = "sha256-IfCiO85weQkHbmuizgdsulm/9g0qsily4GR/32IP/kc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-01-26 04:04:25 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
cryptography
|
|
|
|
deprecated
|
|
|
|
hiredis
|
|
|
|
packaging
|
|
|
|
requests
|
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
|
|
|
importlib-metadata
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"redis"
|
|
|
|
"redis.client"
|
|
|
|
"redis.cluster"
|
|
|
|
"redis.connection"
|
|
|
|
"redis.exceptions"
|
|
|
|
"redis.sentinel"
|
|
|
|
"redis.utils"
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
# tests require a running redis
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python client for Redis key-value store";
|
|
|
|
homepage = "https://pypi.python.org/pypi/redis/";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
};
|
|
|
|
}
|