2021-01-10 23:54:33 -08:00
|
|
|
{ lib, stdenv
|
2018-10-26 08:51:53 -07:00
|
|
|
, buildPythonPackage
|
2019-03-04 14:07:44 -08:00
|
|
|
, fetchFromGitHub
|
2018-10-26 08:51:53 -07:00
|
|
|
, mock
|
|
|
|
, nose
|
|
|
|
, pamqp
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2020-09-13 10:57:34 -07:00
|
|
|
version = "2.0.1";
|
2018-10-26 08:51:53 -07:00
|
|
|
pname = "rabbitpy";
|
|
|
|
|
2019-03-04 14:07:44 -08:00
|
|
|
# No tests in the pypi tarball, so we directly fetch from git
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gmr";
|
|
|
|
repo = pname;
|
2019-03-17 14:46:39 -07:00
|
|
|
rev = version;
|
2020-09-13 10:57:34 -07:00
|
|
|
sha256 = "0m5z3i3d5adrz1wh6y35xjlls3cq6p4y9p1mzghw3k7hdvg26cck";
|
2018-10-26 08:51:53 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ pamqp ];
|
2019-03-04 14:07:44 -08: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 10:57:34 -07:00
|
|
|
--replace 'pamqp>=2,<3' 'pamqp'
|
2019-03-04 14:07:44 -08:00
|
|
|
'';
|
2018-10-26 08:51:53 -07:00
|
|
|
|
2021-01-10 23:54:33 -08:00
|
|
|
meta = with lib; {
|
2018-10-26 08:51:53 -07:00
|
|
|
description = "A pure python, thread-safe, minimalistic and pythonic RabbitMQ client library";
|
2020-03-31 18:11:51 -07:00
|
|
|
homepage = "https://pypi.python.org/pypi/rabbitpy";
|
2018-10-26 08:51:53 -07:00
|
|
|
license = licenses.bsd3;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|