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

80 lines
1.4 KiB
Nix
Raw Normal View History

{ lib
, attrs
2019-03-14 03:13:56 +00:00
, buildPythonPackage
, defusedxml
, fetchPypi
, hypothesis
, isPy3k
, jbig2dec
2019-03-14 03:13:56 +00:00
, lxml
, mupdf
2019-03-14 03:13:56 +00:00
, pillow
, psutil
2019-03-14 03:13:56 +00:00
, pybind11
, 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
, setuptools
, setuptools-scm
2019-03-14 03:13:56 +00:00
, setuptools-scm-git-archive
, substituteAll
2019-03-14 03:13:56 +00:00
}:
buildPythonPackage rec {
pname = "pikepdf";
version = "3.2.0";
2019-03-14 03:13:56 +00:00
disabled = ! isPy3k;
src = fetchPypi {
inherit pname version;
sha256 = "a0582f00440668c07edb8403e82724961c7812c8e6c30655e34825b2645f15cd";
2019-03-14 03:13:56 +00:00
};
patches = [
(substituteAll {
src = ./paths.patch;
jbig2dec = "${lib.getBin jbig2dec}/bin/jbig2dec";
mudraw = "${lib.getBin mupdf}/bin/mudraw";
})
];
2019-03-14 03:13:56 +00:00
buildInputs = [
pybind11
qpdf
];
nativeBuildInputs = [
setuptools-scm-git-archive
setuptools-scm
2019-03-14 03:13:56 +00:00
];
checkInputs = [
attrs
hypothesis
pytest-xdist
psutil
pytestCheckHook
2020-12-01 01:28:31 +00:00
python-dateutil
2019-03-14 03:13:56 +00:00
python-xmp-toolkit
];
propagatedBuildInputs = [
defusedxml
lxml
pillow
setuptools
];
2019-03-14 03:13:56 +00:00
pythonImportsCheck = [ "pikepdf" ];
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 = with maintainers; [ kiwi dotlambda ];
changelog = "https://github.com/pikepdf/pikepdf/blob/${version}/docs/release_notes.rst";
2019-03-14 03:13:56 +00:00
};
}