3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/svglib/default.nix
2022-01-20 20:24:47 +00:00

49 lines
990 B
Nix

{ lib
, buildPythonPackage
, fetchPypi
, isPy3k
, cssselect2
, lxml
, pillow
, pytest
, reportlab
, tinycss2
}:
buildPythonPackage rec {
pname = "svglib";
version = "1.2.0";
src = fetchPypi {
inherit pname version;
sha256 = "33f075dc853807e56e92d6dc404104c6ccc7fb5388d96ab943d7b349b1c924c7";
};
disabled = !isPy3k;
propagatedBuildInputs = [
cssselect2
lxml
pillow
reportlab
tinycss2
];
checkInputs = [
pytest
];
# 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'
'';
meta = with lib; {
homepage = "https://github.com/deeplook/svglib";
description = "A pure-Python library for reading and converting SVG";
license = licenses.lgpl3;
maintainers = with maintainers; [ trepetti ];
};
}