ansible-later: 2.0.22 -> 2.0.23
[NixPkgs.git] / pkgs / development / python-modules / cairosvg / default.nix
blobdf6600e3faacd95d26633c0f1dc8e4990fd578dc
1 { lib
2 , buildPythonPackage
3 , fetchPypi
4 , isPy3k
5 , cairocffi
6 , cssselect2
7 , defusedxml
8 , pillow
9 , tinycss2
10 , pytestCheckHook
13 buildPythonPackage rec {
14   pname = "CairoSVG";
15   version = "2.5.2";
16   disabled = !isPy3k;
18   src = fetchPypi {
19     inherit pname version;
20     sha256 = "sha256-sLmSnPXboAUXjXRqgDb88AJVUPSYylTbYYczIjhHg7w=";
21   };
23   propagatedBuildInputs = [ cairocffi cssselect2 defusedxml pillow tinycss2 ];
25   propagatedNativeBuildInputs = [ cairocffi ];
27   checkInputs = [ pytestCheckHook ];
29   postPatch = ''
30     substituteInPlace setup.cfg \
31       --replace "pytest-runner" "" \
32       --replace "pytest-flake8" "" \
33       --replace "pytest-isort" "" \
34       --replace "pytest-cov" "" \
35       --replace "--flake8" "" \
36       --replace "--isort" ""
37   '';
39   pytestFlagsArray = [
40     "cairosvg/test_api.py"
41   ];
43   pythonImportsCheck = [ "cairosvg" ];
45   meta = with lib; {
46     homepage = "https://cairosvg.org";
47     license = licenses.lgpl3Plus;
48     description = "SVG converter based on Cairo";
49     maintainers = with maintainers; [ SuperSandro2000 ];
50   };