Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / python-modules / pikepdf / default.nix
blobc536f4c69f031f4f17126d6361c5ab6f9d3348c7
1 { lib
2 , attrs
3 , buildPythonPackage
4 , defusedxml
5 , fetchPypi
6 , hypothesis
7 , isPy3k
8 , lxml
9 , pillow
10 , psutil
11 , pybind11
12 , pytest-cov
13 , pytest-helpers-namespace
14 , pytest-timeout
15 , pytest-xdist
16 , pytestCheckHook
17 , python-dateutil
18 , python-xmp-toolkit
19 , qpdf
20 , setuptools
21 , setuptools-scm
22 , setuptools-scm-git-archive
25 buildPythonPackage rec {
26   pname = "pikepdf";
27   version = "2.11.1";
28   disabled = ! isPy3k;
30   src = fetchPypi {
31     inherit pname version;
32     sha256 = "0vs7qa3s4scfhyldfw99hhxpna6rj49rsbr2k0j6b4qx1bw8h141";
33   };
35   buildInputs = [
36     pybind11
37     qpdf
38   ];
40   nativeBuildInputs = [
41     setuptools-scm-git-archive
42     setuptools-scm
43   ];
45   checkInputs = [
46     attrs
47     hypothesis
48     pytest-helpers-namespace
49     pytest-timeout
50     pytest-xdist
51     psutil
52     pytest-cov
53     pytestCheckHook
54     python-dateutil
55     python-xmp-toolkit
56   ];
58   propagatedBuildInputs = [
59     defusedxml
60     lxml
61     pillow
62     setuptools
63   ];
65   preBuild = ''
66     HOME=$TMPDIR
67   '';
69   pythonImportsCheck = [ "pikepdf" ];
71   meta = with lib; {
72     homepage = "https://github.com/pikepdf/pikepdf";
73     description = "Read and write PDFs with Python, powered by qpdf";
74     license = licenses.mpl20;
75     maintainers = [ maintainers.kiwi ];
76     changelog = "https://github.com/pikepdf/pikepdf/blob/${version}/docs/release_notes.rst";
77   };