1{
2 lib,
3 aiohttp,
4 buildPythonPackage,
5 fetchFromGitHub,
6 pytestCheckHook,
7 pytest-aiohttp,
8 pythonOlder,
9 setuptools,
10}:
11
12buildPythonPackage rec {
13 pname = "aiohttp-retry";
14 version = "2.9.1";
15 pyproject = true;
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchFromGitHub {
20 owner = "inyutin";
21 repo = "aiohttp_retry";
22 tag = "v${version}";
23 hash = "sha256-8S4gjeN8ktdDNd8GUsejaZdCaG/VXYPo0RJpwrrttGQ=";
24 };
25
26 build-system = [ setuptools ];
27
28 dependencies = [ aiohttp ];
29
30 __darwinAllowLocalNetworking = true;
31
32 nativeCheckInputs = [
33 pytest-aiohttp
34 pytestCheckHook
35 ];
36
37 pythonImportsCheck = [ "aiohttp_retry" ];
38
39 pytestFlags = [ "--asyncio-mode=auto" ];
40
41 meta = with lib; {
42 description = "Retry client for aiohttp";
43 homepage = "https://github.com/inyutin/aiohttp_retry";
44 changelog = "https://github.com/inyutin/aiohttp_retry/releases/tag/${src.tag}";
45 license = licenses.mit;
46 maintainers = with maintainers; [ fab ];
47 };
48}