Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / python-modules / kombu / default.nix
bloba5ca1a7ab2a4ee82ccd6f7236db8ad0836c63c92
1 { lib, buildPythonPackage, fetchPypi
2 , amqp
3 , botocore
4 , case
5 , Pyro4
6 , pytest
7 , pytz
8 , sqlalchemy
9 , importlib-metadata
10 , pythonOlder
13 buildPythonPackage rec {
14   pname = "kombu";
15   version = "5.0.2";
17   src = fetchPypi {
18     inherit pname version;
19     sha256 = "f4965fba0a4718d47d470beeb5d6446e3357a62402b16c510b6a2f251e05ac3c";
20   };
22   postPatch = ''
23     substituteInPlace requirements/test.txt \
24       --replace "pytest-sugar" ""
25   '';
27   propagatedBuildInputs = [
28     amqp
29   ] ++ lib.optionals (pythonOlder "3.8") [
30     importlib-metadata
31   ];
33   checkInputs = [ botocore pytest case pytz Pyro4 sqlalchemy ];
34   # test_redis requires fakeredis, which isn't trivial to package
35   checkPhase = ''
36     pytest --ignore t/unit/transport/test_redis.py
37   '';
39   meta = with lib; {
40     description = "Messaging library for Python";
41     homepage    = "https://github.com/celery/kombu";
42     license     = licenses.bsd3;
43   };