1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
{
lib,
buildPythonPackage,
isPy3k,
fetchPypi,
sip,
qtbase,
qmake,
pyqt5,
pyqt-builder,
poppler,
pkg-config,
setuptools,
}:
buildPythonPackage rec {
pname = "python-poppler-qt5";
version = "21.3.0";
disabled = !isPy3k;
src = fetchPypi {
inherit pname version;
sha256 = "sha256-tHfohB8OoOCf2rby8wXPON+XfZ4ULlaTo3RgXXXdb+A=";
};
buildInputs = [
qtbase.dev
poppler
pyqt-builder
];
nativeBuildInputs = [
pkg-config
qmake
sip
setuptools
];
propagatedBuildInputs = [ pyqt5.dev ];
format = "pyproject";
dontConfigure = true;
postPatch = ''
cat <<EOF >> pyproject.toml
[tool.sip.bindings.Poppler-Qt5]
include-dirs = ["${poppler.dev}/include/poppler"]
EOF
'';
# no tests, just bindings for `poppler_qt5`
doCheck = false;
pythonImportsCheck = [ "popplerqt5" ];
dontWrapQtApps = true;
meta = with lib; {
homepage = "https://github.com/frescobaldi/python-poppler-qt5";
license = licenses.lgpl21Plus;
maintainers = with maintainers; [ ];
};
}
|