From 0bb1bedab16c0d5e6fbe0fec3b5fa7dc81296baa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 31 May 2022 02:30:45 +0000 Subject: [PATCH] python310Packages.svglib: use pytestCheckHook --- .../python-modules/svglib/default.nix | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/svglib/default.nix b/pkgs/development/python-modules/svglib/default.nix index 4231c5fd4929..7f1a8d8facd7 100644 --- a/pkgs/development/python-modules/svglib/default.nix +++ b/pkgs/development/python-modules/svglib/default.nix @@ -1,11 +1,11 @@ { lib , buildPythonPackage +, pythonOlder , fetchPypi -, isPy3k , cssselect2 , lxml , pillow -, pytest +, pytestCheckHook , reportlab , tinycss2 }: @@ -14,13 +14,15 @@ buildPythonPackage rec { pname = "svglib"; version = "1.3.0"; + disabled = pythonOlder "3.7"; + + format = "setuptools"; + src = fetchPypi { inherit pname version; sha256 = "sha256-o4mYuV0buZVk3J3/rxXk6UU3YfJ5DS3UFHpK1fusEHg="; }; - disabled = !isPy3k; - propagatedBuildInputs = [ cssselect2 lxml @@ -30,14 +32,16 @@ buildPythonPackage rec { ]; checkInputs = [ - pytest + pytestCheckHook ]; # Ignore tests that require network access (TestWikipediaFlags and TestW3CSVG), and tests that # require files missing in the 1.0.0 PyPI release (TestOtherFiles). - checkPhase = '' - py.test svglib tests -k 'not TestWikipediaFlags and not TestW3CSVG and not TestOtherFiles' - ''; + pytestFlagsArray = [ + "-k 'not TestWikipediaFlags and not TestW3CSVG and not TestOtherFiles'" + ]; + + pythonImportsCheck = [ "svglib.svglib" ]; meta = with lib; { homepage = "https://github.com/deeplook/svglib";