1{
2 lib,
3 amqp,
4 azure-identity,
5 azure-servicebus,
6 azure-storage-queue,
7 boto3,
8 buildPythonPackage,
9 confluent-kafka,
10 fetchPypi,
11 hypothesis,
12 kazoo,
13 msgpack,
14 pycurl,
15 pymongo,
16 #, pyro4
17 pytestCheckHook,
18 pythonOlder,
19 pyyaml,
20 redis,
21 setuptools,
22 sqlalchemy,
23 typing-extensions,
24 tzdata,
25 urllib3,
26 vine,
27}:
28
29buildPythonPackage rec {
30 pname = "kombu";
31 version = "5.4.2";
32 pyproject = true;
33
34 disabled = pythonOlder "3.9";
35
36 src = fetchPypi {
37 inherit pname version;
38 hash = "sha256-7vVy3S/Z/GFLN1gOPK6v3Vr0bB7/Mef7qJE4zbQG8s8=";
39 };
40
41 build-system = [ setuptools ];
42
43 propagatedBuildInputs = [
44 amqp
45 tzdata
46 vine
47 ] ++ lib.optionals (pythonOlder "3.10") [ typing-extensions ];
48
49 optional-dependencies = {
50 msgpack = [ msgpack ];
51 yaml = [ pyyaml ];
52 redis = [ redis ];
53 mongodb = [ pymongo ];
54 sqs = [
55 boto3
56 urllib3
57 pycurl
58 ];
59 zookeeper = [ kazoo ];
60 sqlalchemy = [ sqlalchemy ];
61 azurestoragequeues = [
62 azure-identity
63 azure-storage-queue
64 ];
65 azureservicebus = [ azure-servicebus ];
66 confluentkafka = [ confluent-kafka ];
67 # pyro4 doesn't suppport Python 3.11
68 #pyro = [
69 # pyro4
70 #];
71 };
72
73 nativeCheckInputs = [
74 hypothesis
75 pytestCheckHook
76 ] ++ lib.flatten (lib.attrValues optional-dependencies);
77
78 pythonImportsCheck = [ "kombu" ];
79
80 disabledTests = [
81 # Disable pyro4 test
82 "test_driver_version"
83 # AssertionError: assert [call('WATCH'..., 'test-tag')] ==...
84 "test_global_keyprefix_transaction"
85 ];
86
87 meta = with lib; {
88 description = "Messaging library for Python";
89 homepage = "https://github.com/celery/kombu";
90 changelog = "https://github.com/celery/kombu/blob/v${version}/Changelog.rst";
91 license = licenses.bsd3;
92 maintainers = with maintainers; [ fab ];
93 };
94}