nixpkgs/pkgs/development/python-modules/kombu/default.nix

45 lines
921 B
Nix
Raw Normal View History

2019-10-27 16:37:13 +00:00
{ lib, buildPythonPackage, fetchPypi
, amqp
2020-06-12 19:05:50 +01:00
, botocore
2019-10-27 16:37:13 +00:00
, case
, Pyro4
, pytest
, pytz
, sqlalchemy
, importlib-metadata
, pythonOlder
2019-10-27 16:37:13 +00:00
}:
2018-07-14 12:19:09 +01:00
buildPythonPackage rec {
pname = "kombu";
2021-06-18 22:47:24 +01:00
version = "5.1.0";
2018-07-14 12:19:09 +01:00
src = fetchPypi {
inherit pname version;
2021-06-18 22:47:24 +01:00
sha256 = "01481d99f4606f6939cdc9b637264ed353ee9e3e4f62cfb582324142c41a572d";
2018-07-14 12:19:09 +01:00
};
postPatch = ''
2019-10-27 16:37:13 +00:00
substituteInPlace requirements/test.txt \
--replace "pytest-sugar" ""
2018-07-14 12:19:09 +01:00
'';
propagatedBuildInputs = [
amqp
] ++ lib.optionals (pythonOlder "3.8") [
importlib-metadata
];
2018-07-14 12:19:09 +01:00
2020-06-12 19:05:50 +01: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 12:19:09 +01:00
meta = with lib; {
description = "Messaging library for Python";
homepage = "https://github.com/celery/kombu";
2018-07-14 12:19:09 +01:00
license = licenses.bsd3;
};
}