2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, mock
|
|
|
|
, nose
|
|
|
|
, pamqp
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2020-09-25 04:45:31 +00:00
|
|
|
version = "2.0.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "rabbitpy";
|
|
|
|
|
|
|
|
# No tests in the pypi tarball, so we directly fetch from git
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gmr";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2020-09-25 04:45:31 +00:00
|
|
|
sha256 = "0m5z3i3d5adrz1wh6y35xjlls3cq6p4y9p1mzghw3k7hdvg26cck";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ pamqp ];
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ mock nose ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
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-25 04:45:31 +00:00
|
|
|
--replace 'pamqp>=2,<3' 'pamqp'
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A pure python, thread-safe, minimalistic and pythonic RabbitMQ client library";
|
|
|
|
homepage = "https://pypi.python.org/pypi/rabbitpy";
|
|
|
|
license = licenses.bsd3;
|
2021-03-23 19:22:30 +00:00
|
|
|
|
|
|
|
# broken by pamqp==3, tracked in
|
|
|
|
# https://github.com/gmr/rabbitpy/issues/125
|
|
|
|
broken = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|