1{ lib
2, buildPythonPackage
3, fetchPypi
4, isPy3k
5, cssselect2
6, lxml
7, pillow
8, pytest
9, reportlab
10, tinycss2
11}:
12
13buildPythonPackage rec {
14 pname = "svglib";
15 version = "1.1.0";
16
17 src = fetchPypi {
18 inherit pname version;
19 sha256 = "520ee5290ee2ebeebd20ca0d7d995c08c903b364fcf515826bab43a1288d422e";
20 };
21
22 disabled = !isPy3k;
23
24 propagatedBuildInputs = [
25 cssselect2
26 lxml
27 pillow
28 reportlab
29 tinycss2
30 ];
31
32 checkInputs = [
33 pytest
34 ];
35
36 # Ignore tests that require network access (TestWikipediaFlags and TestW3CSVG), and tests that
37 # require files missing in the 1.0.0 PyPI release (TestOtherFiles).
38 checkPhase = ''
39 py.test svglib tests -k 'not TestWikipediaFlags and not TestW3CSVG and not TestOtherFiles'
40 '';
41
42 meta = with lib; {
43 homepage = "https://github.com/deeplook/svglib";
44 description = "A pure-Python library for reading and converting SVG";
45 license = licenses.lgpl3;
46 maintainers = with maintainers; [ trepetti ];
47 };
48}