1{ stdenv
2, lib
3, backports-zoneinfo
4, billiard
5, boto3
6, buildPythonPackage
7, case
8, click
9, click-didyoumean
10, click-plugins
11, click-repl
12, dnspython
13, fetchPypi
14, kombu
15, moto
16, pymongo
17, pytest-celery
18, pytest-click
19, pytest-subtests
20, pytest-timeout
21, pytestCheckHook
22, python-dateutil
23, pythonOlder
24, tzdata
25, vine
26, nixosTests
27}:
28
29buildPythonPackage rec {
30 pname = "celery";
31 version = "5.3.4";
32 format = "setuptools";
33
34 disabled = pythonOlder "3.8";
35
36 src = fetchPypi {
37 inherit pname version;
38 hash = "sha256-kCPfaoli2nnrMMDITV9IY9l5OkZjVMyTHX9yQjmW3ig=";
39 };
40
41 propagatedBuildInputs = [
42 billiard
43 click
44 click-didyoumean
45 click-plugins
46 click-repl
47 kombu
48 python-dateutil
49 tzdata
50 vine
51 ]
52 ++ lib.optionals (pythonOlder "3.9") [
53 backports-zoneinfo
54 ];
55
56 nativeCheckInputs = [
57 boto3
58 case
59 dnspython
60 moto
61 pymongo
62 pytest-celery
63 pytest-click
64 pytest-subtests
65 pytest-timeout
66 pytestCheckHook
67 ];
68
69 disabledTestPaths = [
70 # test_eventlet touches network
71 "t/unit/concurrency/test_eventlet.py"
72 # test_multi tries to create directories under /var
73 "t/unit/bin/test_multi.py"
74 "t/unit/apps/test_multi.py"
75 ];
76
77 disabledTests = [
78 "msgpack"
79 "test_check_privileges_no_fchown"
80 ] ++ lib.optionals stdenv.isDarwin [
81 # too many open files on hydra
82 "test_cleanup"
83 "test_with_autoscaler_file_descriptor_safety"
84 "test_with_file_descriptor_safety"
85 ];
86
87 pythonImportsCheck = [
88 "celery"
89 ];
90
91 passthru.tests = {
92 inherit (nixosTests) sourcehut;
93 };
94
95 meta = with lib; {
96 description = "Distributed task queue";
97 homepage = "https://github.com/celery/celery/";
98 changelog = "https://github.com/celery/celery/releases/tag/v${version}";
99 license = licenses.bsd3;
100 maintainers = with maintainers; [ fab ];
101 };
102}