summary refs log tree commit diff
path: root/pkgs/development/python-modules/aiohttp-remotes/default.nix
blob: 66f81b1232980095011241b4af870dd21db61799 (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
{ lib
, aiohttp
, buildPythonPackage
, fetchPypi
, flit
, pytest-aiohttp
, pytestCheckHook
, pythonOlder
, typing-extensions
}:

buildPythonPackage rec {
  pname = "aiohttp-remotes";
  version = "1.2.0";
  format = "pyproject";

  disabled = pythonOlder "3.6";

  src = fetchPypi {
    pname = "aiohttp_remotes";
    inherit version;
    sha256 = "f95c3a6be5e2de746a85ce9af49ec548da6db8378d7e81bb171ec77b13562a6c";
  };

  nativeBuildInputs = [
    flit
  ];

  propagatedBuildInputs = [
    aiohttp
  ] ++ lib.optionals (pythonOlder "3.7") [
    typing-extensions
  ];

  nativeCheckInputs = [
    pytest-aiohttp
    pytestCheckHook
  ];

  postPatch = ''
    substituteInPlace setup.cfg \
      --replace " --no-cov-on-fail --cov-branch --cov=aiohttp_remotes --cov-report=term --cov-report=html" ""
  '';

  pythonImportsCheck = [
    "aiohttp_remotes"
  ];

  pytestFlagsArray = [
    "-W"
    "ignore::DeprecationWarning"
    "--asyncio-mode=auto"
  ];

  meta = with lib; {
    description = "Set of useful tools for aiohttp.web server";
    homepage = "https://github.com/wikibusiness/aiohttp-remotes";
    license = licenses.mit;
    maintainers = with maintainers; [ qyliss ];
  };
}