Skip to content

Commit

Permalink
pythonPackages.rabbitpy: Fix build
Browse files Browse the repository at this point in the history
(cherry picked from commit 2016b37)
ZHF: #56826
  • Loading branch information
knedlsepp authored and worldofpeace committed Mar 17, 2019
1 parent 6a3a055 commit 0e6990d
Showing 1 changed file with 22 additions and 5 deletions.
27 changes: 22 additions & 5 deletions pkgs/development/python-modules/rabbitpy/default.nix
@@ -1,6 +1,6 @@
{ stdenv
, buildPythonPackage
, fetchPypi
, fetchFromGitHub
, mock
, nose
, pamqp
Expand All @@ -10,13 +10,30 @@ buildPythonPackage rec {
version = "1.0.0";
pname = "rabbitpy";

src = fetchPypi {
inherit pname version;
sha256 = "54d33746d0c6a686417cd354346803945df0740b39fb92842d259387100db126";
# No tests in the pypi tarball, so we directly fetch from git
src = fetchFromGitHub {
owner = "gmr";
repo = pname;
rev = "${version}";
sha256 = "0fd80zlr4p2sh77rxyyfi9l0h2zqi2csgadr0rhnpgpqsy10qck6";
};

buildInputs = [ mock nose ];
propagatedBuildInputs = [ pamqp ];
doCheck = true;
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'
'';

meta = with stdenv.lib; {
description = "A pure python, thread-safe, minimalistic and pythonic RabbitMQ client library";
Expand Down

0 comments on commit 0e6990d

Please sign in to comment.