1{
2 bitarray,
3 buildPythonPackage,
4 dill,
5 diskcache,
6 fetchFromGitHub,
7 hiredis,
8 hypothesis,
9 lib,
10 pytest,
11 pytest-asyncio,
12 pytest-cov-stub,
13 pytest-rerunfailures,
14 pytestCheckHook,
15 redis,
16 setuptools,
17 xxhash,
18}:
19
20buildPythonPackage rec {
21 pname = "cashews";
22 version = "7.4.3";
23 pyproject = true;
24
25 src = fetchFromGitHub {
26 owner = "Krukov";
27 repo = "cashews";
28 tag = version;
29 hash = "sha256-L6EpSZ6ssRV9fQLuJ6SxKB8QS9fo4qAQ3YKcc1u7sHY=";
30 };
31
32 build-system = [ setuptools ];
33
34 optional-dependencies = {
35 dill = [ dill ];
36 diskcache = [ diskcache ];
37 redis = [ redis ];
38 speedup = [
39 bitarray
40 hiredis
41 xxhash
42 ];
43 };
44
45 nativeCheckInputs = [
46 hypothesis
47 pytest
48 pytest-asyncio
49 pytest-cov-stub
50 pytest-rerunfailures
51 pytestCheckHook
52 ];
53
54 disabledTests = [
55 # these tests require too many dependencies
56 "redis"
57 "diskcache"
58 "integration"
59 ];
60
61 pythonImportsCheck = [ "cashews" ];
62
63 meta = {
64 description = "Cache tools with async power";
65 homepage = "https://github.com/Krukov/cashews/";
66 changelog = "https://github.com/Krukov/cashews/releases/tag/${src.tag}";
67 license = lib.licenses.mit;
68 maintainers = with lib.maintainers; [ moraxyc ];
69 };
70}