diff options
Diffstat (limited to 'pkgs/development/python-modules/celery/default.nix')
-rw-r--r-- | pkgs/development/python-modules/celery/default.nix | 149 |
1 files changed, 83 insertions, 66 deletions
diff --git a/pkgs/development/python-modules/celery/default.nix b/pkgs/development/python-modules/celery/default.nix index a787e1fce4ea9..9e52b75e59afe 100644 --- a/pkgs/development/python-modules/celery/default.nix +++ b/pkgs/development/python-modules/celery/default.nix @@ -1,45 +1,56 @@ -{ stdenv -, lib -, backports-zoneinfo -, billiard -, boto3 -, buildPythonPackage -, case -, click -, click-didyoumean -, click-plugins -, click-repl -, dnspython -, fetchPypi -, kombu -, moto -, pymongo -, pytest-celery -, pytest-click -, pytest-subtests -, pytest-timeout -, pytest-xdist -, pytestCheckHook -, python-dateutil -, pythonOlder -, tzdata -, vine -, nixosTests +{ + stdenv, + lib, + buildPythonPackage, + fetchPypi, + pythonOlder, + + # build-system + setuptools, + + # dependencies + billiard, + kombu, + vine, + click, + click-didyoumean, + click-repl, + click-plugins, + tzdata, + python-dateutil, + + # optional-dependencies + google-cloud-storage, + moto, + msgpack, + pymongo, + pyyaml, + + # tests + pytest-celery, + pytest-click, + pytest-subtests, + pytest-timeout, + pytest-xdist, + pytestCheckHook, + nixosTests, }: buildPythonPackage rec { pname = "celery"; - version = "5.3.6"; - format = "setuptools"; + version = "5.4.0"; + pyproject = true; disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - hash = "sha256-hwzHHXN8AgDDlykNcwNEzJkdE6BXU0NT0STJOAJnqrk="; + hash = "sha256-UEoZFA6NMCnVrK2IMwxUHUw/ZMeJ2F+UdWdi2Lyn5wY="; }; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ billiard click click-didyoumean @@ -49,24 +60,30 @@ buildPythonPackage rec { python-dateutil tzdata vine - ] - ++ lib.optionals (pythonOlder "3.9") [ - backports-zoneinfo ]; - nativeCheckInputs = [ - boto3 - case - dnspython - moto - pymongo - pytest-celery - pytest-click - pytest-subtests - pytest-timeout - pytest-xdist - pytestCheckHook - ]; + optional-dependencies = { + gcs = [ google-cloud-storage ]; + mongodb = [ pymongo ]; + msgpack = [ msgpack ]; + yaml = [ pyyaml ]; + }; + + nativeCheckInputs = + [ + moto + pytest-celery + pytest-click + pytest-subtests + pytest-timeout + pytest-xdist + pytestCheckHook + ] + # based on https://github.com/celery/celery/blob/main/requirements/test.txt + ++ optional-dependencies.yaml + ++ optional-dependencies.msgpack + ++ optional-dependencies.mongodb + ++ optional-dependencies.gcs; disabledTestPaths = [ # test_eventlet touches network @@ -78,26 +95,26 @@ buildPythonPackage rec { "t/unit/backends/test_s3.py" ]; - disabledTests = [ - "msgpack" - "test_check_privileges_no_fchown" - # seems to only fail on higher core counts - # AssertionError: assert 3 == 0 - "test_setup_security_disabled_serializers" - # fails with pytest-xdist - "test_itercapture_limit" - "test_stamping_headers_in_options" - "test_stamping_with_replace" - ] ++ lib.optionals stdenv.isDarwin [ - # too many open files on hydra - "test_cleanup" - "test_with_autoscaler_file_descriptor_safety" - "test_with_file_descriptor_safety" - ]; + disabledTests = + [ + "msgpack" + "test_check_privileges_no_fchown" + # seems to only fail on higher core counts + # AssertionError: assert 3 == 0 + "test_setup_security_disabled_serializers" + # fails with pytest-xdist + "test_itercapture_limit" + "test_stamping_headers_in_options" + "test_stamping_with_replace" + ] + ++ lib.optionals stdenv.isDarwin [ + # too many open files on hydra + "test_cleanup" + "test_with_autoscaler_file_descriptor_safety" + "test_with_file_descriptor_safety" + ]; - pythonImportsCheck = [ - "celery" - ]; + pythonImportsCheck = [ "celery" ]; passthru.tests = { inherit (nixosTests) sourcehut; |