2018-10-26 16:51:53 +01:00
|
|
|
{ stdenv
|
|
|
|
, buildPythonPackage
|
2019-03-04 22:07:44 +00:00
|
|
|
, fetchFromGitHub
|
2018-10-26 16:51:53 +01:00
|
|
|
, mock
|
|
|
|
, nose
|
|
|
|
, pamqp
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2018-11-04 10:35:15 +00:00
|
|
|
version = "1.0.0";
|
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;
|
2019-03-04 22:07:44 +00:00
|
|
|
sha256 = "0fd80zlr4p2sh77rxyyfi9l0h2zqi2csgadr0rhnpgpqsy10qck6";
|
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 \
|
|
|
|
--replace 'pamqp>=1.6.1,<2.0' 'pamqp'
|
|
|
|
'';
|
2018-10-26 16:51:53 +01:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|