nixpkgs/pkgs/development/python-modules/aiohttp-jinja2/default.nix
Guillaume Girol 33afbf39f6 treewide: switch to nativeCheckInputs
checkInputs used to be added to nativeBuildInputs. Now we have
nativeCheckInputs to do that instead. Doing this treewide change allows
to keep hashes identical to before the introduction of
nativeCheckInputs.
2023-01-21 12:00:00 +00:00

58 lines
1.1 KiB
Nix

{ lib
, aiohttp
, buildPythonPackage
, fetchPypi
, jinja2
, pytest-aiohttp
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "aiohttp-jinja2";
version = "1.5";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-fDul6sBgtpH05QU0ry15/KKnVxLr0rJeb8sSlYWfkQs=";
};
propagatedBuildInputs = [
aiohttp
jinja2
];
nativeCheckInputs = [
pytest-aiohttp
pytestCheckHook
];
postPatch = ''
substituteInPlace setup.cfg \
--replace " --cov=aiohttp_jinja2 --cov-report xml --cov-report html --cov-report term" ""
'';
pytestFlagsArray = [
"-W"
"ignore::DeprecationWarning"
];
pythonImportsCheck = [
"aiohttp_jinja2"
];
# Tests are outdated (1.5)
# pytest.PytestUnhandledCoroutineWarning: async def functions...
doCheck = false;
meta = with lib; {
description = "Jinja2 support for aiohttp";
homepage = "https://github.com/aio-libs/aiohttp_jinja2";
license = licenses.asl20;
maintainers = with maintainers; [ peterhoeg ];
};
}