2019-10-27 17:37:13 +01:00
|
|
|
{ lib, buildPythonPackage, fetchPypi
|
|
|
|
, amqp
|
2020-06-12 20:05:50 +02:00
|
|
|
, botocore
|
2019-10-27 17:37:13 +01:00
|
|
|
, case
|
|
|
|
, Pyro4
|
|
|
|
, pytest
|
|
|
|
, pytz
|
|
|
|
, sqlalchemy
|
2020-03-12 11:00:21 +01:00
|
|
|
, importlib-metadata
|
|
|
|
, pythonOlder
|
2019-10-27 17:37:13 +01:00
|
|
|
}:
|
2018-07-14 13:19:09 +02:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2019-02-15 00:01:55 +01:00
|
|
|
pname = "kombu";
|
2020-11-29 15:04:32 +01:00
|
|
|
version = "5.0.2";
|
2018-07-14 13:19:09 +02:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-11-29 15:04:32 +01:00
|
|
|
sha256 = "f4965fba0a4718d47d470beeb5d6446e3357a62402b16c510b6a2f251e05ac3c";
|
2018-07-14 13:19:09 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
2019-10-27 17:37:13 +01:00
|
|
|
substituteInPlace requirements/test.txt \
|
|
|
|
--replace "pytest-sugar" ""
|
|
|
|
substituteInPlace requirements/default.txt \
|
|
|
|
--replace "amqp==2.5.1" "amqp~=2.5"
|
2018-07-14 13:19:09 +02:00
|
|
|
'';
|
|
|
|
|
2020-03-12 11:00:21 +01:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
amqp
|
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
|
|
|
importlib-metadata
|
|
|
|
];
|
2018-07-14 13:19:09 +02:00
|
|
|
|
2020-06-12 20:05:50 +02:00
|
|
|
checkInputs = [ botocore pytest case pytz Pyro4 sqlalchemy ];
|
2019-10-27 17:37:13 +01:00
|
|
|
# test_redis requires fakeredis, which isn't trivial to package
|
|
|
|
checkPhase = ''
|
|
|
|
pytest --ignore t/unit/transport/test_redis.py
|
|
|
|
'';
|
|
|
|
|
2018-07-14 13:19:09 +02:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Messaging library for Python";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/celery/kombu";
|
2018-07-14 13:19:09 +02:00
|
|
|
license = licenses.bsd3;
|
|
|
|
};
|
|
|
|
}
|