mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 06:45:16 +01:00
pythonPackages.rabbitpy: Fix build
This commit is contained in:
parent
1a2c78b420
commit
2016b37495
1 changed files with 22 additions and 5 deletions
|
@ -1,6 +1,6 @@
|
|||
{ stdenv
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, fetchFromGitHub
|
||||
, mock
|
||||
, nose
|
||||
, pamqp
|
||||
|
@ -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";
|
||||
|
|
Loading…
Reference in a new issue