pythonPackages.rabbitpy: Fix build

authored by Josef Kemetmüller and committed by worldofpeace 2016b374 1a2c78b4

+22 -5
+22 -5
pkgs/development/python-modules/rabbitpy/default.nix
··· 1 { stdenv 2 , buildPythonPackage 3 - , fetchPypi 4 , mock 5 , nose 6 , pamqp ··· 10 version = "1.0.0"; 11 pname = "rabbitpy"; 12 13 - src = fetchPypi { 14 - inherit pname version; 15 - sha256 = "54d33746d0c6a686417cd354346803945df0740b39fb92842d259387100db126"; 16 }; 17 18 - buildInputs = [ mock nose ]; 19 propagatedBuildInputs = [ pamqp ]; 20 21 meta = with stdenv.lib; { 22 description = "A pure python, thread-safe, minimalistic and pythonic RabbitMQ client library";
··· 1 { stdenv 2 , buildPythonPackage 3 + , fetchFromGitHub 4 , mock 5 , nose 6 , pamqp ··· 10 version = "1.0.0"; 11 pname = "rabbitpy"; 12 13 + # No tests in the pypi tarball, so we directly fetch from git 14 + src = fetchFromGitHub { 15 + owner = "gmr"; 16 + repo = pname; 17 + rev = "${version}"; 18 + sha256 = "0fd80zlr4p2sh77rxyyfi9l0h2zqi2csgadr0rhnpgpqsy10qck6"; 19 }; 20 21 propagatedBuildInputs = [ pamqp ]; 22 + doCheck = true; 23 + checkInputs = [ mock nose ]; 24 + 25 + checkPhase = '' 26 + runHook preCheck 27 + rm tests/integration_tests.py # Impure tests requiring network 28 + nosetests tests 29 + runHook postCheck 30 + ''; 31 + 32 + postPatch = '' 33 + # See: https://github.com/gmr/rabbitpy/issues/118 34 + substituteInPlace setup.py \ 35 + --replace 'pamqp>=1.6.1,<2.0' 'pamqp' 36 + ''; 37 38 meta = with stdenv.lib; { 39 description = "A pure python, thread-safe, minimalistic and pythonic RabbitMQ client library";