2023-07-12 11:05:20 +00:00
|
|
|
{ lib
|
|
|
|
, async-timeout
|
2023-08-18 07:46:51 +00:00
|
|
|
, buildPythonPackage
|
2023-07-12 11:05:20 +00:00
|
|
|
, deprecated
|
2023-08-18 07:46:51 +00:00
|
|
|
, fetchFromGitHub
|
2023-07-12 11:05:20 +00:00
|
|
|
, pympler
|
2023-08-18 07:46:51 +00:00
|
|
|
, pytest-asyncio
|
2023-07-12 11:05:20 +00:00
|
|
|
, pytestCheckHook
|
2023-08-18 07:46:51 +00:00
|
|
|
, pythonOlder
|
2023-07-12 11:05:20 +00:00
|
|
|
, redis
|
2023-08-18 07:46:51 +00:00
|
|
|
, wrapt
|
2023-07-12 11:05:20 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "coredis";
|
2023-09-01 05:30:57 +00:00
|
|
|
version = "4.16.0";
|
2023-07-12 11:05:20 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2023-08-18 07:46:51 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
2023-07-12 11:05:20 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "alisaifee";
|
|
|
|
repo = pname;
|
2023-08-18 07:46:51 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2023-09-01 05:30:57 +00:00
|
|
|
hash = "sha256-7qpoNc5/z8/EKtGWULrPPwfH9swYe9TqqUL+zxrFQSk=";
|
2023-07-12 11:05:20 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
2023-08-18 07:46:51 +00:00
|
|
|
substituteInPlace pytest.ini \
|
|
|
|
--replace "-K" ""
|
2023-07-12 11:05:20 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
async-timeout
|
|
|
|
deprecated
|
|
|
|
pympler
|
|
|
|
wrapt
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
redis
|
|
|
|
pytest-asyncio
|
|
|
|
];
|
|
|
|
|
2023-08-18 07:46:51 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"coredis"
|
|
|
|
];
|
|
|
|
|
2023-07-12 11:05:20 +00:00
|
|
|
pytestFlagsArray = [
|
2023-08-18 07:46:51 +00:00
|
|
|
# All other tests require Docker
|
2023-07-12 11:05:20 +00:00
|
|
|
"tests/test_lru_cache.py"
|
|
|
|
"tests/test_parsers.py"
|
|
|
|
"tests/test_retry.py"
|
|
|
|
"tests/test_utils.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "An async redis client with support for redis server, cluster & sentinel";
|
2023-08-18 07:46:51 +00:00
|
|
|
homepage = "https://github.com/alisaifee/coredis";
|
|
|
|
changelog = "https://github.com/alisaifee/coredis/blob/${src.rev}/HISTORY.rst";
|
2023-07-12 11:05:20 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ netali ];
|
|
|
|
};
|
|
|
|
}
|