1{
2 lib,
3 stdenv,
4 azure-identity,
5 azure-storage-blob,
6 billiard,
7 buildPythonPackage,
8 click-didyoumean,
9 click-plugins,
10 click-repl,
11 click,
12 fetchPypi,
13 gevent,
14 google-cloud-firestore,
15 google-cloud-storage,
16 kombu,
17 moto,
18 msgpack,
19 nixosTests,
20 pymongo,
21 redis,
22 pydantic,
23 pytest-celery,
24 pytest-click,
25 pytest-subtests,
26 pytest-timeout,
27 pytest-xdist,
28 pytestCheckHook,
29 python-dateutil,
30 pythonOlder,
31 pyyaml,
32 setuptools,
33 vine,
34}:
35
36buildPythonPackage rec {
37 pname = "celery";
38 version = "5.5.3";
39 pyproject = true;
40
41 disabled = pythonOlder "3.8";
42
43 src = fetchPypi {
44 inherit pname version;
45 hash = "sha256-bJcq55aMK1KBIn8Bw6P5hAN9IcUSnQe/NVDMKvxrEKU=";
46 };
47
48 build-system = [ setuptools ];
49
50 dependencies = [
51 billiard
52 click
53 click-didyoumean
54 click-plugins
55 click-repl
56 kombu
57 python-dateutil
58 vine
59 ];
60
61 optional-dependencies = {
62 azureblockblob = [
63 azure-identity
64 azure-storage-blob
65 ];
66 gevent = [ gevent ];
67 gcs = [
68 google-cloud-firestore
69 google-cloud-storage
70 ];
71 mongodb = [ pymongo ];
72 msgpack = [ msgpack ];
73 yaml = [ pyyaml ];
74 redis = [ redis ];
75 pydantic = [ pydantic ];
76 };
77
78 nativeCheckInputs = [
79 moto
80 pytest-celery
81 pytest-click
82 pytest-subtests
83 pytest-timeout
84 pytest-xdist
85 pytestCheckHook
86 ]
87 ++ lib.flatten (builtins.attrValues optional-dependencies);
88
89 disabledTestPaths = [
90 # test_eventlet touches network
91 "t/unit/concurrency/test_eventlet.py"
92 # test_multi tries to create directories under /var
93 "t/unit/bin/test_multi.py"
94 "t/unit/apps/test_multi.py"
95 # Test requires moto<5
96 "t/unit/backends/test_s3.py"
97 ];
98
99 disabledTests = [
100 "msgpack"
101 "test_check_privileges_no_fchown"
102 # seems to only fail on higher core counts
103 # AssertionError: assert 3 == 0
104 "test_setup_security_disabled_serializers"
105 # Test is flaky, especially on hydra
106 "test_ready"
107 # Tests fail with pytest-xdist
108 "test_itercapture_limit"
109 "test_stamping_headers_in_options"
110 "test_stamping_with_replace"
111 ]
112 ++ lib.optionals stdenv.hostPlatform.isDarwin [
113 # Too many open files on hydra
114 "test_cleanup"
115 "test_with_autoscaler_file_descriptor_safety"
116 "test_with_file_descriptor_safety"
117 ];
118
119 pythonImportsCheck = [ "celery" ];
120
121 meta = with lib; {
122 description = "Distributed task queue";
123 homepage = "https://github.com/celery/celery/";
124 changelog = "https://github.com/celery/celery/releases/tag/v${version}";
125 license = licenses.bsd3;
126 maintainers = with maintainers; [ fab ];
127 mainProgram = "celery";
128 };
129}