2020-04-24 23:36:52 +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-06-15 15:56:04 +00:00
|
|
|
version = "1.14.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
disabled = ! isPy3k;
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-06-15 15:56:04 +00:00
|
|
|
sha256 = "5b371c71b0da42d87371ed39973f07c7eb67d939ca5031f0c1637cfb3a2d79f5";
|
2020-04-24 23:36:52 +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 = ''
|
|
|
|
sed -i \
|
|
|
|
-e 's/^pytest .*/pytest/g' \
|
|
|
|
-e 's/^attrs .*/attrs/g' \
|
|
|
|
-e 's/^hypothesis .*/hypothesis/g' \
|
|
|
|
requirements/test.txt
|
|
|
|
'';
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|