about summary refs log tree commit diff
path: root/pkgs/development/python-modules/aio-pika/default.nix
blob: 10c311c220c9d2a950bd83b43b3e2c2a3b6f0441 (plain) (blame)
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
74
75
76
77
78
{
  lib,
  aiomisc-pytest,
  aiormq,
  buildPythonPackage,
  docker,
  fetchFromGitHub,
  pamqp,
  poetry-core,
  pytestCheckHook,
  pythonOlder,
  shortuuid,
  testcontainers,
  wrapt,
  yarl,
}:

buildPythonPackage rec {
  pname = "aio-pika";
  version = "9.4.1";
  pyproject = true;

  disabled = pythonOlder "3.9";

  src = fetchFromGitHub {
    owner = "mosquito";
    repo = "aio-pika";
    rev = "refs/tags/${version}";
    hash = "sha256-aRXYFW4fl3iXH3bwP30+TllRm4BkIUcGMX/lNfhiqjo=";
  };

  build-system = [ poetry-core ];

  dependencies = [
    aiormq
    yarl
  ];

  nativeCheckInputs = [
    aiomisc-pytest
    docker
    pamqp
    pytestCheckHook
    shortuuid
    testcontainers
    wrapt
  ];

  disabledTests = [
    # Tests attempt to connect to a RabbitMQ server
    "test_connection_interleave"
    "test_connection_happy_eyeballs_delay"
    "test_robust_connection_interleave"
    "test_robust_connection_happy_eyeballs_delay"
  ];

  disabledTestPaths = [
    # Tests attempt to connect to a RabbitMQ server
    "tests/test_amqp.py"
    "tests/test_amqp_robust.py"
    "tests/test_amqp_robust_proxy.py"
    "tests/test_amqps.py"
    "tests/test_master.py"
    "tests/test_memory_leak.py"
    "tests/test_rpc.py"
    "tests/test_types.py"
  ];

  pythonImportsCheck = [ "aio_pika" ];

  meta = with lib; {
    description = "AMQP 0.9 client designed for asyncio and humans";
    homepage = "https://github.com/mosquito/aio-pika";
    changelog = "https://github.com/mosquito/aio-pika/blob/${version}/CHANGELOG.md";
    license = licenses.asl20;
    maintainers = with maintainers; [ emilytrau ];
  };
}