diff options
| author | Robin Gloster <mail@glob.in> | 2021-05-24 09:55:24 -0500 |
|---|---|---|
| committer | Robin Gloster <mail@glob.in> | 2021-05-24 09:55:24 -0500 |
| commit | 4bc5fbef9d159e143fb7e2c3231932e6e76f667c (patch) | |
| tree | e2198f5c552e0667d838b8ec764ddb3a4d8f6dec /pkgs/development/python-modules/pika | |
| parent | jq: fix build with structured-attrs on darwin (diff) | |
| parent | Merge pull request #123802 from superherointj/package-virtmanager-bugfix (diff) | |
| download | nixpkgs-origin/structured-attrs.tar.gz | |
Merge remote-tracking branch 'upstream/master' into structured-attrsorigin/structured-attrs
Diffstat (limited to 'pkgs/development/python-modules/pika')
| -rw-r--r-- | pkgs/development/python-modules/pika/default.nix | 33 |
1 files changed, 28 insertions, 5 deletions
diff --git a/pkgs/development/python-modules/pika/default.nix b/pkgs/development/python-modules/pika/default.nix index ef3250732164..1c8cae9f041c 100644 --- a/pkgs/development/python-modules/pika/default.nix +++ b/pkgs/development/python-modules/pika/default.nix @@ -1,6 +1,7 @@ { lib , buildPythonPackage -, fetchPypi +, fetchFromGitHub +, gevent , nose , mock , twisted @@ -11,12 +12,34 @@ buildPythonPackage rec { pname = "pika"; version = "1.2.0"; - src = fetchPypi { - inherit pname version; - sha256 = "f023d6ac581086b124190cb3dc81dd581a149d216fa4540ac34f9be1e3970b89"; + src = fetchFromGitHub { + owner = "pika"; + repo = "pika"; + rev = version; + sha256 = "sha256-Wog6Wxa8V/zv/bBrFOigZi6KE5qRf82bf1GK2XwvpDI="; }; - checkInputs = [ nose mock twisted tornado ]; + propagatedBuildInputs = [ gevent tornado twisted ]; + + checkInputs = [ nose mock ]; + + postPatch = '' + # don't stop at first test failure + # don't run acceptance tests because they access the network + # don't report test coverage + substituteInPlace setup.cfg \ + --replace "stop = 1" "stop = 0" \ + --replace "tests=tests/unit,tests/acceptance" "tests=tests/unit" \ + --replace "with-coverage = 1" "with-coverage = 0" + ''; + + checkPhase = '' + runHook preCheck + + PIKA_TEST_TLS=true nosetests + + runHook postCheck + ''; meta = with lib; { description = "Pure-Python implementation of the AMQP 0-9-1 protocol"; |
