1{
2 lib,
3 aiohttp,
4 buildPythonPackage,
5 fetchPypi,
6 jinja2,
7 pytest-aiohttp,
8 pytestCheckHook,
9 pythonOlder,
10 setuptools,
11}:
12
13buildPythonPackage rec {
14 pname = "aiohttp-jinja2";
15 version = "1.6";
16 pyproject = true;
17
18 disabled = pythonOlder "3.7";
19
20 src = fetchPypi {
21 inherit pname version;
22 hash = "sha256-o6f/UmTlvKUuiuVHu/0HYbcklSMNQ40FtsCRW+YZsOI=";
23 };
24
25 build-system = [ setuptools ];
26
27 dependencies = [
28 aiohttp
29 jinja2
30 ];
31
32 nativeCheckInputs = [
33 pytest-aiohttp
34 pytestCheckHook
35 ];
36
37 postPatch = ''
38 substituteInPlace pytest.ini \
39 --replace-fail "--cov=aiohttp_jinja2/ --cov=tests/ --cov-report term" ""
40 '';
41
42 pytestFlagsArray = [
43 "-W"
44 "ignore::DeprecationWarning"
45 ];
46
47 pythonImportsCheck = [ "aiohttp_jinja2" ];
48
49 meta = with lib; {
50 description = "Jinja2 support for aiohttp";
51 homepage = "https://github.com/aio-libs/aiohttp_jinja2";
52 license = licenses.asl20;
53 maintainers = with maintainers; [ ];
54 };
55}