2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchPypi,
|
|
|
|
buildPythonPackage,
|
|
|
|
pythonOlder,
|
2022-01-26 04:04:25 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# propagates
|
|
|
|
async-timeout,
|
|
|
|
deprecated,
|
|
|
|
importlib-metadata,
|
|
|
|
packaging,
|
|
|
|
typing-extensions,
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# extras: hiredis
|
|
|
|
hiredis,
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# extras: ocsp
|
|
|
|
cryptography,
|
|
|
|
pyopenssl,
|
|
|
|
requests,
|
2022-01-26 04:04:25 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "redis";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "5.0.6";
|
2022-01-26 04:04:25 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-OEc818Y4mtPkSpH0w+r2vLip90YAfym/T7IIJP8LIZc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-01-26 04:04:25 +00:00
|
|
|
propagatedBuildInputs = [
|
2022-04-27 09:35:20 +00:00
|
|
|
async-timeout
|
2022-01-26 04:04:25 +00:00
|
|
|
deprecated
|
|
|
|
packaging
|
2022-04-27 09:35:20 +00:00
|
|
|
typing-extensions
|
2024-06-05 15:53:02 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ];
|
2022-01-26 04:04:25 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
passthru.optional-dependencies = {
|
2024-06-05 15:53:02 +00:00
|
|
|
hiredis = [ hiredis ];
|
2022-04-27 09:35:20 +00:00
|
|
|
ocsp = [
|
|
|
|
cryptography
|
|
|
|
pyopenssl
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2022-01-26 04:04:25 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"redis"
|
|
|
|
"redis.client"
|
|
|
|
"redis.cluster"
|
|
|
|
"redis.connection"
|
|
|
|
"redis.exceptions"
|
|
|
|
"redis.sentinel"
|
|
|
|
"redis.utils"
|
|
|
|
];
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
# Tests require a running redis
|
2020-04-24 23:36:52 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python client for Redis key-value store";
|
2023-03-15 16:39:30 +00:00
|
|
|
homepage = "https://github.com/redis/redis-py";
|
|
|
|
changelog = "https://github.com/redis/redis-py/releases/tag/v${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
};
|
|
|
|
}
|