2021-01-25 08:26:54 +00:00
|
|
|
{ lib
|
2018-10-26 16:51:53 +01:00
|
|
|
, buildPythonPackage
|
2019-03-04 22:07:44 +00:00
|
|
|
, fetchFromGitHub
|
2018-10-26 16:51:53 +01:00
|
|
|
, mock
|
|
|
|
, nose
|
|
|
|
, pamqp
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2020-09-13 18:57:34 +01:00
|
|
|
version = "2.0.1";
|
2018-10-26 16:51:53 +01:00
|
|
|
pname = "rabbitpy";
|
|
|
|
|
2019-03-04 22:07:44 +00:00
|
|
|
# No tests in the pypi tarball, so we directly fetch from git
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gmr";
|
|
|
|
repo = pname;
|
2019-03-17 21:46:39 +00:00
|
|
|
rev = version;
|
2020-09-13 18:57:34 +01:00
|
|
|
sha256 = "0m5z3i3d5adrz1wh6y35xjlls3cq6p4y9p1mzghw3k7hdvg26cck";
|
2018-10-26 16:51:53 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ pamqp ];
|
2019-03-04 22:07:44 +00:00
|
|
|
checkInputs = [ mock nose ];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
rm tests/integration_tests.py # Impure tests requiring network
|
|
|
|
nosetests tests
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# See: https://github.com/gmr/rabbitpy/issues/118
|
|
|
|
substituteInPlace setup.py \
|
2020-09-13 18:57:34 +01:00
|
|
|
--replace 'pamqp>=2,<3' 'pamqp'
|
2019-03-04 22:07:44 +00:00
|
|
|
'';
|
2018-10-26 16:51:53 +01:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-10-26 16:51:53 +01:00
|
|
|
description = "A pure python, thread-safe, minimalistic and pythonic RabbitMQ client library";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://pypi.python.org/pypi/rabbitpy";
|
2018-10-26 16:51:53 +01:00
|
|
|
license = licenses.bsd3;
|
2021-03-23 16:35:09 +00:00
|
|
|
|
|
|
|
# broken by pamqp==3, tracked in
|
|
|
|
# https://github.com/gmr/rabbitpy/issues/125
|
|
|
|
broken = true;
|
2018-10-26 16:51:53 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|