From 3e2a7ed31ef817a2ba0d207717c2f21b24f951f6 Mon Sep 17 00:00:00 2001 From: TomaSajt <62384384+TomaSajt@users.noreply.github.com> Date: Tue, 7 May 2024 00:19:28 +0200 Subject: [PATCH] python312Packages.aiohttp-jinja2: use pyproject = true, enable tests --- .../python-modules/aiohttp-jinja2/default.nix | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/aiohttp-jinja2/default.nix b/pkgs/development/python-modules/aiohttp-jinja2/default.nix index 8e78784457ca..9584316d8554 100644 --- a/pkgs/development/python-modules/aiohttp-jinja2/default.nix +++ b/pkgs/development/python-modules/aiohttp-jinja2/default.nix @@ -6,12 +6,13 @@ , pytest-aiohttp , pytestCheckHook , pythonOlder +, setuptools }: buildPythonPackage rec { pname = "aiohttp-jinja2"; version = "1.6"; - format = "setuptools"; + pyproject = true; disabled = pythonOlder "3.7"; @@ -20,7 +21,11 @@ buildPythonPackage rec { hash = "sha256-o6f/UmTlvKUuiuVHu/0HYbcklSMNQ40FtsCRW+YZsOI="; }; - propagatedBuildInputs = [ + build-system = [ + setuptools + ]; + + dependencies = [ aiohttp jinja2 ]; @@ -31,8 +36,8 @@ buildPythonPackage rec { ]; postPatch = '' - substituteInPlace setup.cfg \ - --replace " --cov=aiohttp_jinja2 --cov-report xml --cov-report html --cov-report term" "" + substituteInPlace pytest.ini \ + --replace-fail "--cov=aiohttp_jinja2/ --cov=tests/ --cov-report term" "" ''; pytestFlagsArray = [ @@ -44,10 +49,6 @@ buildPythonPackage rec { "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";