1{
2 lib,
3 async-timeout,
4 buildPythonPackage,
5 deprecated,
6 fetchFromGitHub,
7 pympler,
8 pytest-asyncio,
9 pytestCheckHook,
10 pythonOlder,
11 redis,
12 wrapt,
13}:
14
15buildPythonPackage rec {
16 pname = "coredis";
17 version = "4.17.0";
18 format = "setuptools";
19
20 disabled = pythonOlder "3.8";
21
22 src = fetchFromGitHub {
23 owner = "alisaifee";
24 repo = pname;
25 rev = "refs/tags/${version}";
26 hash = "sha256-HfGmsIi8PnYbnC2020x474gtq0eqHjF7mSmRSHb0QxY=";
27 };
28
29 postPatch = ''
30 substituteInPlace pytest.ini \
31 --replace "-K" ""
32 '';
33
34 propagatedBuildInputs = [
35 async-timeout
36 deprecated
37 pympler
38 wrapt
39 ];
40
41 nativeCheckInputs = [
42 pytestCheckHook
43 redis
44 pytest-asyncio
45 ];
46
47 pythonImportsCheck = [ "coredis" ];
48
49 pytestFlagsArray = [
50 # All other tests require Docker
51 "tests/test_lru_cache.py"
52 "tests/test_parsers.py"
53 "tests/test_retry.py"
54 "tests/test_utils.py"
55 ];
56
57 meta = with lib; {
58 description = "An async redis client with support for redis server, cluster & sentinel";
59 homepage = "https://github.com/alisaifee/coredis";
60 changelog = "https://github.com/alisaifee/coredis/blob/${src.rev}/HISTORY.rst";
61 license = licenses.mit;
62 maintainers = teams.wdz.members;
63 };
64}