nixpkgs/pkgs/development/python-modules/pikepdf/default.nix

76 lines
1.3 KiB
Nix
Raw Normal View History

2019-03-14 04:13:56 +01: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";
2019-10-16 11:43:11 +02:00
version = "1.6.4";
2019-03-14 04:13:56 +01:00
disabled = ! isPy3k;
src = fetchPypi {
inherit pname version;
2019-10-16 11:43:11 +02:00
sha256 = "50ad2f2903db21b9105c1092ef947b456134a77355b4386535492dc28a6a4e52";
2019-03-14 04:13:56 +01: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
2019-03-14 04:13:56 +01: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 ];
};
}