2019-03-14 03:13:56 +00:00
|
|
|
{ attrs
|
|
|
|
, buildPythonPackage
|
|
|
|
, defusedxml
|
|
|
|
, fetchPypi
|
|
|
|
, hypothesis
|
|
|
|
, isPy3k
|
|
|
|
, lxml
|
|
|
|
, pillow
|
|
|
|
, pybind11
|
2020-12-01 01:28:31 +00:00
|
|
|
, pytestCheckHook
|
2019-03-14 03:13:56 +00:00
|
|
|
, pytest-helpers-namespace
|
|
|
|
, pytest-timeout
|
|
|
|
, pytest_xdist
|
|
|
|
, pytestrunner
|
2020-12-01 01:28:31 +00:00
|
|
|
, python-dateutil
|
2019-03-14 03:13:56 +00:00
|
|
|
, python-xmp-toolkit
|
|
|
|
, python3
|
|
|
|
, qpdf
|
|
|
|
, setuptools-scm-git-archive
|
|
|
|
, setuptools_scm
|
2021-01-25 08:26:54 +00:00
|
|
|
, lib
|
2019-03-14 03:13:56 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pikepdf";
|
2020-11-29 14:04:36 +00:00
|
|
|
version = "2.2.0";
|
2019-03-14 03:13:56 +00:00
|
|
|
disabled = ! isPy3k;
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-11-29 14:04:36 +00:00
|
|
|
sha256 = "74300a32c41b3d578772f6933f23a88b19f74484185e71e5225ce2f7ea5aea78";
|
2019-03-14 03:13:56 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
pybind11
|
|
|
|
qpdf
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm-git-archive
|
|
|
|
setuptools_scm
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
attrs
|
|
|
|
hypothesis
|
|
|
|
pillow
|
2020-12-01 01:28:31 +00:00
|
|
|
pytestCheckHook
|
2019-03-14 03:13:56 +00:00
|
|
|
pytest-helpers-namespace
|
|
|
|
pytest-timeout
|
|
|
|
pytest_xdist
|
|
|
|
pytestrunner
|
2020-12-01 01:28:31 +00:00
|
|
|
python-dateutil
|
2019-03-14 03:13:56 +00:00
|
|
|
python-xmp-toolkit
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ defusedxml lxml ];
|
|
|
|
|
|
|
|
postPatch = ''
|
2019-08-31 23:14:44 +01:00
|
|
|
sed -i \
|
|
|
|
-e 's/^pytest .*/pytest/g' \
|
|
|
|
-e 's/^attrs .*/attrs/g' \
|
|
|
|
-e 's/^hypothesis .*/hypothesis/g' \
|
|
|
|
requirements/test.txt
|
2019-03-14 03:13:56 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
HOME=$TMPDIR
|
|
|
|
'';
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|