2021-02-07 13:42:29 +00:00
|
|
|
{ lib
|
|
|
|
, attrs
|
2019-03-14 03:13:56 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, defusedxml
|
|
|
|
, fetchPypi
|
|
|
|
, hypothesis
|
|
|
|
, isPy3k
|
|
|
|
, lxml
|
|
|
|
, pillow
|
2021-02-07 13:42:29 +00:00
|
|
|
, psutil
|
2019-03-14 03:13:56 +00:00
|
|
|
, pybind11
|
2021-02-07 13:42:29 +00:00
|
|
|
, pytest-cov
|
2019-03-14 03:13:56 +00:00
|
|
|
, pytest-helpers-namespace
|
|
|
|
, pytest-timeout
|
2021-02-07 13:42:29 +00:00
|
|
|
, pytest-xdist
|
|
|
|
, pytestCheckHook
|
2020-12-01 01:28:31 +00:00
|
|
|
, python-dateutil
|
2019-03-14 03:13:56 +00:00
|
|
|
, python-xmp-toolkit
|
|
|
|
, qpdf
|
2021-02-07 13:42:29 +00:00
|
|
|
, setuptools-scm
|
2019-03-14 03:13:56 +00:00
|
|
|
, setuptools-scm-git-archive
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pikepdf";
|
2021-02-07 13:42:29 +00:00
|
|
|
version = "2.5.2";
|
2019-03-14 03:13:56 +00:00
|
|
|
disabled = ! isPy3k;
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-02-07 13:42:29 +00:00
|
|
|
sha256 = "sha256-j8PpeyTa+9SxrAV8jxRMGEZ85V00KhqMQmiIkOrVjvM=";
|
2019-03-14 03:13:56 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
pybind11
|
|
|
|
qpdf
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm-git-archive
|
2021-02-07 13:42:29 +00:00
|
|
|
setuptools-scm
|
2019-03-14 03:13:56 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
attrs
|
|
|
|
hypothesis
|
|
|
|
pytest-helpers-namespace
|
|
|
|
pytest-timeout
|
2021-02-07 13:42:29 +00:00
|
|
|
pytest-xdist
|
|
|
|
psutil
|
|
|
|
pytest-cov
|
|
|
|
pytestCheckHook
|
2020-12-01 01:28:31 +00:00
|
|
|
python-dateutil
|
2019-03-14 03:13:56 +00:00
|
|
|
python-xmp-toolkit
|
|
|
|
];
|
|
|
|
|
2021-02-07 13:42:29 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
defusedxml
|
|
|
|
lxml
|
|
|
|
pillow
|
|
|
|
];
|
2019-03-14 03:13:56 +00:00
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
HOME=$TMPDIR
|
|
|
|
'';
|
|
|
|
|
2021-02-07 13:42:29 +00:00
|
|
|
pythonImportsCheck = [ "pikepdf" ];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-03-14 03:13:56 +00:00
|
|
|
homepage = "https://github.com/pikepdf/pikepdf";
|
|
|
|
description = "Read and write PDFs with Python, powered by qpdf";
|
|
|
|
license = licenses.mpl20;
|
|
|
|
maintainers = [ maintainers.kiwi ];
|
|
|
|
};
|
|
|
|
}
|