2021-01-25 08:26:54 +00:00
|
|
|
{ lib
|
2018-10-26 01:33:56 +00:00
|
|
|
, buildPythonPackage
|
2021-05-15 10:02:26 +00:00
|
|
|
, fetchFromGitHub
|
2021-05-08 18:52:02 +00:00
|
|
|
, gevent
|
2018-10-26 01:33:56 +00:00
|
|
|
, nose
|
|
|
|
, mock
|
|
|
|
, twisted
|
|
|
|
, tornado
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pika";
|
2021-03-24 09:28:20 +00:00
|
|
|
version = "1.2.0";
|
2018-10-26 01:33:56 +00:00
|
|
|
|
2021-05-15 10:02:26 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pika";
|
|
|
|
repo = "pika";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "sha256-Wog6Wxa8V/zv/bBrFOigZi6KE5qRf82bf1GK2XwvpDI=";
|
2018-10-26 01:33:56 +00:00
|
|
|
};
|
|
|
|
|
2021-05-15 10:02:26 +00:00
|
|
|
propagatedBuildInputs = [ gevent tornado twisted ];
|
|
|
|
|
|
|
|
checkInputs = [ nose mock ];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# don't stop at first test failure
|
|
|
|
# don't run acceptance tests because they access the network
|
|
|
|
# don't report test coverage
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "stop = 1" "stop = 0" \
|
|
|
|
--replace "tests=tests/unit,tests/acceptance" "tests=tests/unit" \
|
|
|
|
--replace "with-coverage = 1" "with-coverage = 0"
|
|
|
|
'';
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
|
|
|
|
PIKA_TEST_TLS=true nosetests
|
|
|
|
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
2018-10-26 01:33:56 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-10-26 01:33:56 +00:00
|
|
|
description = "Pure-Python implementation of the AMQP 0-9-1 protocol";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://pika.readthedocs.org";
|
2018-10-26 01:33:56 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|