2020-08-20 17:08:02 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2022-06-16 17:23:12 +00:00
|
|
|
, pythonOlder
|
2020-08-20 17:08:02 +00:00
|
|
|
, fetchPypi
|
|
|
|
, cssselect2
|
|
|
|
, lxml
|
|
|
|
, pillow
|
2022-06-16 17:23:12 +00:00
|
|
|
, pytestCheckHook
|
2020-08-20 17:08:02 +00:00
|
|
|
, reportlab
|
|
|
|
, tinycss2
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "svglib";
|
2023-01-11 07:51:40 +00:00
|
|
|
version = "1.5.1";
|
|
|
|
format = "setuptools";
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-01-11 07:51:40 +00:00
|
|
|
hash = "sha256-Oudl06lAnuYMD7TSTC3raoBheqknBU9bzX/JjwaV5Yc=";
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
cssselect2
|
|
|
|
lxml
|
|
|
|
pillow
|
|
|
|
reportlab
|
|
|
|
tinycss2
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
2022-06-16 17:23:12 +00:00
|
|
|
pytestCheckHook
|
2020-08-20 17:08:02 +00:00
|
|
|
];
|
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
disabledTests = [
|
|
|
|
# Ignore tests that require network access (TestWikipediaFlags and TestW3CSVG), and tests that
|
|
|
|
# require files missing in the 1.0.0 PyPI release (TestOtherFiles).
|
|
|
|
"TestWikipediaFlags"
|
|
|
|
"TestW3CSVG"
|
|
|
|
"TestOtherFiles"
|
2022-06-16 17:23:12 +00:00
|
|
|
];
|
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"svglib.svglib"
|
|
|
|
];
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A pure-Python library for reading and converting SVG";
|
2023-01-11 07:51:40 +00:00
|
|
|
homepage = "https://github.com/deeplook/svglib";
|
|
|
|
changelog = "https://github.com/deeplook/svglib/blob/v${version}/CHANGELOG.rst";
|
|
|
|
license = licenses.lgpl3Only;
|
2020-08-20 17:08:02 +00:00
|
|
|
maintainers = with maintainers; [ trepetti ];
|
|
|
|
};
|
|
|
|
}
|