2019-03-14 03:13:56 +00:00
|
|
|
{ attrs
|
|
|
|
, buildPythonPackage
|
|
|
|
, defusedxml
|
|
|
|
, fetchPypi
|
|
|
|
, hypothesis
|
|
|
|
, isPy3k
|
|
|
|
, lxml
|
|
|
|
, pillow
|
|
|
|
, pybind11
|
|
|
|
, pytest
|
|
|
|
, pytest-helpers-namespace
|
|
|
|
, pytest-timeout
|
|
|
|
, pytest_xdist
|
|
|
|
, pytestrunner
|
|
|
|
, python-xmp-toolkit
|
|
|
|
, python3
|
|
|
|
, qpdf
|
|
|
|
, setuptools-scm-git-archive
|
|
|
|
, setuptools_scm
|
|
|
|
, stdenv
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pikepdf";
|
2020-05-09 09:01:05 +00:00
|
|
|
version = "1.11.2";
|
2019-03-14 03:13:56 +00:00
|
|
|
disabled = ! isPy3k;
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-05-09 09:01:05 +00:00
|
|
|
sha256 = "03y6xkkqz6rsk23304gg0mn4vgdb0mh1wi9xzrk5vz2ma2wyp8i6";
|
2019-03-14 03:13:56 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
pybind11
|
|
|
|
qpdf
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm-git-archive
|
|
|
|
setuptools_scm
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
attrs
|
|
|
|
hypothesis
|
|
|
|
pillow
|
|
|
|
pytest
|
|
|
|
pytest-helpers-namespace
|
|
|
|
pytest-timeout
|
|
|
|
pytest_xdist
|
|
|
|
pytestrunner
|
|
|
|
python-xmp-toolkit
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ defusedxml lxml ];
|
|
|
|
|
|
|
|
postPatch = ''
|
2019-08-31 22:14:44 +00: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
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = "https://github.com/pikepdf/pikepdf";
|
|
|
|
description = "Read and write PDFs with Python, powered by qpdf";
|
|
|
|
license = licenses.mpl20;
|
|
|
|
maintainers = [ maintainers.kiwi ];
|
|
|
|
};
|
|
|
|
}
|