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