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