1{ lib, buildPythonPackage, fetchPypi
2, billiard, click, click-didyoumean, click-plugins, click-repl, kombu, pytz, vine
3, boto3, case, moto, pytest, pytest-celery, pytest-subtests, pytest-timeout
4}:
5
6buildPythonPackage rec {
7 pname = "celery";
8 version = "5.1.2";
9
10 src = fetchPypi {
11 inherit pname version;
12 sha256 = "8d9a3de9162965e97f8e8cc584c67aad83b3f7a267584fa47701ed11c3e0d4b0";
13 };
14
15 # click is only used for the repl, in most cases this shouldn't impact
16 # downstream packages
17 postPatch = ''
18 substituteInPlace requirements/test.txt \
19 --replace "moto==1.3.7" moto
20 substituteInPlace requirements/default.txt \
21 --replace "click>=7.0,<8.0" click
22 '';
23
24 propagatedBuildInputs = [ billiard click click-didyoumean click-plugins click-repl kombu pytz vine ];
25
26 checkInputs = [ boto3 case moto pytest pytest-celery pytest-subtests pytest-timeout ];
27
28 # ignore test that's incompatible with pytest5
29 # test_eventlet touches network
30 # test_mongodb requires pymongo
31 # test_multi tries to create directories under /var
32 checkPhase = ''
33 pytest -k 'not restore_current_app_fallback and not msgpack and not on_apply and not pytest' \
34 --ignore=t/unit/contrib/test_pytest.py \
35 --ignore=t/unit/concurrency/test_eventlet.py \
36 --ignore=t/unit/bin/test_multi.py \
37 --ignore=t/unit/apps/test_multi.py \
38 --ignore=t/unit/backends/test_mongodb.py
39 '';
40
41 meta = with lib; {
42 homepage = "https://github.com/celery/celery/";
43 description = "Distributed task queue";
44 license = licenses.bsd3;
45 maintainers = [ ];
46 };
47}