blob: 2d01a7e115f62c812c80d7c126c2d384e93a4428 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
{
lib,
buildPythonPackage,
fetchFromGitHub,
# build-system
setuptools,
# dependencies
gevent,
twisted,
tornado,
# tests
nose2,
mock,
}:
buildPythonPackage rec {
pname = "pika";
version = "1.3.2";
pyproject = true;
src = fetchFromGitHub {
owner = "pika";
repo = "pika";
tag = version;
hash = "sha256-60Z+y3YXazUghfnOy4e7HzM18iju5m5OEt4I3Wg6ty4=";
};
nativeBuildInputs = [ setuptools ];
propagatedBuildInputs = [
gevent
tornado
twisted
];
nativeCheckInputs = [
nose2
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 nose2.cfg \
--replace "stop = 1" "stop = 0" \
--replace "tests=tests/unit,tests/acceptance" "tests=tests/unit" \
--replace "with-coverage = 1" "with-coverage = 0"
'';
doCheck = false; # tests require rabbitmq instance, unsure how to skip
checkPhase = ''
runHook preCheck
PIKA_TEST_TLS=true nose2 -v
runHook postCheck
'';
meta = {
changelog = "https://github.com/pika/pika/releases/tag/${version}";
description = "Pure-Python implementation of the AMQP 0-9-1 protocol";
downloadPage = "https://github.com/pika/pika";
homepage = "https://pika.readthedocs.org";
license = lib.licenses.bsd3;
maintainers = [ ];
};
}
|