2022-01-26 04:04:25 +00:00
|
|
|
{ lib
|
|
|
|
, fetchPypi
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
|
|
|
|
# propagates
|
2022-04-27 09:35:20 +00:00
|
|
|
, async-timeout
|
2022-01-26 04:04:25 +00:00
|
|
|
, deprecated
|
|
|
|
, importlib-metadata
|
|
|
|
, packaging
|
2022-04-27 09:35:20 +00:00
|
|
|
, typing-extensions
|
|
|
|
|
|
|
|
# extras: hiredis
|
|
|
|
, hiredis
|
|
|
|
|
|
|
|
# extras: ocsp
|
|
|
|
, cryptography
|
|
|
|
, pyopenssl
|
2022-01-26 04:04:25 +00:00
|
|
|
, requests
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "redis";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "5.0.3";
|
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-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-SXO650RMD77WSga4dEb3k2HLfk7BU4wCLWlu16UBVYA=";
|
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
|
2022-01-26 04:04:25 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
|
|
|
importlib-metadata
|
|
|
|
];
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
passthru.optional-dependencies = {
|
2023-02-02 18:25:31 +00:00
|
|
|
hiredis = [
|
2022-04-27 09:35:20 +00:00
|
|
|
hiredis
|
|
|
|
];
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|