1{ lib
2, aiohttp
3, buildPythonPackage
4, fetchPypi
5, flit
6, pytest-aiohttp
7, pytestCheckHook
8, pythonOlder
9, typing-extensions
10}:
11
12buildPythonPackage rec {
13 pname = "aiohttp-remotes";
14 version = "1.2.0";
15 format = "pyproject";
16
17 disabled = pythonOlder "3.6";
18
19 src = fetchPypi {
20 pname = "aiohttp_remotes";
21 inherit version;
22 sha256 = "f95c3a6be5e2de746a85ce9af49ec548da6db8378d7e81bb171ec77b13562a6c";
23 };
24
25 nativeBuildInputs = [
26 flit
27 ];
28
29 propagatedBuildInputs = [
30 aiohttp
31 ] ++ lib.optionals (pythonOlder "3.7") [
32 typing-extensions
33 ];
34
35 nativeCheckInputs = [
36 pytest-aiohttp
37 pytestCheckHook
38 ];
39
40 postPatch = ''
41 substituteInPlace setup.cfg \
42 --replace " --no-cov-on-fail --cov-branch --cov=aiohttp_remotes --cov-report=term --cov-report=html" ""
43 '';
44
45 pythonImportsCheck = [
46 "aiohttp_remotes"
47 ];
48
49 pytestFlagsArray = [
50 "-W"
51 "ignore::DeprecationWarning"
52 "--asyncio-mode=auto"
53 ];
54
55 meta = with lib; {
56 description = "Set of useful tools for aiohttp.web server";
57 homepage = "https://github.com/wikibusiness/aiohttp-remotes";
58 license = licenses.mit;
59 maintainers = with maintainers; [ qyliss ];
60 };
61}