about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/pytest-aio/default.nix
blob: 09c278a70e10492a0416df2d9d91a6aa85ddb0c0 (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
{ lib
, anyio
, buildPythonPackage
, curio
, fetchFromGitHub
, hypothesis
, pytest
, pytestCheckHook
, pythonOlder
, sniffio
, trio
, trio-asyncio
}:

buildPythonPackage rec {
  pname = "pytest-aio";
  version = "1.4.1";
  format = "setuptools";

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "klen";
    repo = "pytest-aio";
    rev = version;
    sha256 = "pLH0yXe/KS9ohI8+hWSprP1OA3Qjki2BPqeApMPMGDs=";
  };

  postPatch = ''
    sed -i '/addopts/d' setup.cfg
  '';

  buildInputs = [
    pytest
  ];

  checkInputs = [
    anyio
    curio
    hypothesis
    pytestCheckHook
    sniffio
    trio
    trio-asyncio
  ];

  pythonImportsCheck = [
    "pytest_aio"
  ];

  meta = with lib; {
    homepage = "https://github.com/klen/pytest-aio";
    description = "Pytest plugin for aiohttp support";
    license = licenses.mit;
    maintainers = with maintainers; [ fab ];
  };
}