summary refs log tree commit diff
path: root/pkgs/development/python-modules/kombu/default.nix
blob: af8e8ed29be9615dcfd2fbd4e28b78040b49a70b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
{ lib
, amqp
, azure-identity
, azure-servicebus
, azure-storage-queue
, backports-zoneinfo
, boto3
, buildPythonPackage
, case
, confluent-kafka
, fetchPypi
, hypothesis
, kazoo
, msgpack
, pycurl
, pymongo
  #, pyro4
, pytestCheckHook
, pythonOlder
, pyyaml
, redis
, sqlalchemy
, typing-extensions
, urllib3
, vine
}:

buildPythonPackage rec {
  pname = "kombu";
  version = "5.3.2";
  format = "setuptools";

  disabled = pythonOlder "3.8";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-C6IT9jCiyydycorvVqxog9w6LxNDXhAEj26X1IUG270=";
  };

  propagatedBuildInputs = [
    amqp
    vine
  ] ++ lib.optionals (pythonOlder "3.10") [
    typing-extensions
  ] ++ lib.optionals (pythonOlder "3.9") [
    backports-zoneinfo
  ];

  passthru.optional-dependencies = {
    msgpack = [
      msgpack
    ];
    yaml = [
      pyyaml
    ];
    redis = [
      redis
    ];
    mongodb = [
      pymongo
    ];
    sqs = [
      boto3
      urllib3
      pycurl
    ];
    zookeeper = [
      kazoo
    ];
    sqlalchemy = [
      sqlalchemy
    ];
    azurestoragequeues = [
      azure-identity
      azure-storage-queue
    ];
    azureservicebus = [
      azure-servicebus
    ];
    confluentkafka = [
      confluent-kafka
    ];
    # pyro4 doesn't suppport Python 3.11
    #pyro = [
    #  pyro4
    #];
  };

  nativeCheckInputs = [
    case
    hypothesis
    pytestCheckHook
  ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);

  pythonImportsCheck = [
    "kombu"
  ];

  disabledTests = [
    # Disable pyro4 test
    "test_driver_version"
  ];

  meta = with lib; {
    description = "Messaging library for Python";
    homepage = "https://github.com/celery/kombu";
    changelog = "https://github.com/celery/kombu/releases/tag/v${version}";
    license = licenses.bsd3;
    maintainers = with maintainers; [ fab ];
  };
}