python310Packages.pygal: update dependencies

authored by Robert Schütz and committed by Jonathan Ringer d8c38002 17e9bab2

+14 -28
+14 -28
pkgs/development/python-modules/pygal/default.nix
··· 1 1 { lib 2 2 , buildPythonPackage 3 3 , fetchPypi 4 - , fetchpatch 5 - , isPyPy 6 - , flask 4 + , lxml 5 + , cairosvg 7 6 , pyquery 8 - , pytest 9 - , pytest-runner 10 - , cairosvg 11 - , tinycss 12 - , cssselect 13 - , lxml 7 + , pytestCheckHook 14 8 }: 15 9 16 10 buildPythonPackage rec { 17 11 pname = "pygal"; 18 12 version = "3.0.0"; 19 - 20 - doCheck = !isPyPy; # one check fails with pypy 21 13 22 14 src = fetchPypi { 23 15 inherit pname version; 24 16 sha256 = "sha256-KSP5XS5RWTCqWplyGdzO+/PZK36vX8HJ/ruVsJk1/bI="; 25 17 }; 26 18 27 - buildInputs = [ 28 - flask 29 - pyquery 19 + postPatch = '' 20 + substituteInPlace setup.py \ 21 + --replace pytest-runner "" 22 + ''; 30 23 31 - # Should be a check input, but upstream lists it under "setup_requires". 32 - # https://github.com/Kozea/pygal/issues/430 33 - pytest-runner 34 - ]; 24 + passthru.optional-dependencies = { 25 + lxml = [ lxml ]; 26 + png = [ cairosvg ]; 27 + }; 35 28 36 29 checkInputs = [ 37 - pytest 38 - ]; 30 + pyquery 31 + pytestCheckHook 32 + ] ++ passthru.optional-dependencies.png; 39 33 40 34 preCheck = '' 41 35 # necessary on darwin to pass the testsuite 42 36 export LANG=en_US.UTF-8 43 37 ''; 44 38 45 - postPatch = '' 46 - substituteInPlace setup.cfg --replace "[pytest]" "[tool:pytest]" 47 - ''; 48 - 49 - propagatedBuildInputs = [ cairosvg tinycss cssselect ] 50 - ++ lib.optionals (!isPyPy) [ lxml ]; 51 - 52 39 meta = with lib; { 53 40 description = "Sexy and simple python charting"; 54 41 homepage = "http://www.pygal.org"; 55 42 license = licenses.lgpl3Plus; 56 43 maintainers = with maintainers; [ sjourdois ]; 57 44 }; 58 - 59 45 }