Merge pull request #120798 from eduardosm/python-poppler-qt5
pythonPackages.poppler-qt5: 0.24.2 -> 21.1.0
This commit is contained in:
commit
d721ebe9bd
@ -1,44 +1,64 @@
|
|||||||
{ buildPythonPackage, fetchPypi, lib, sip, qtbase, pyqt5, poppler, pkg-config, fetchpatch
|
{ stdenv
|
||||||
, substituteAll
|
, lib
|
||||||
|
, buildPythonPackage
|
||||||
|
, isPy3k
|
||||||
|
, fetchPypi
|
||||||
|
, pythonPackages
|
||||||
|
, sip_5
|
||||||
|
, qtbase
|
||||||
|
, qmake
|
||||||
|
, pyqt5
|
||||||
|
, pyqt-builder
|
||||||
|
, poppler
|
||||||
|
, pkg-config
|
||||||
|
, fetchpatch
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "python-poppler-qt5";
|
pname = "python-poppler-qt5";
|
||||||
version = "0.24.2";
|
version = "21.1.0";
|
||||||
|
|
||||||
|
disabled = !isPy3k;
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "0l69llw1fzwz8y90q0qp9q5pifbrqjjbwii7di54dwghw5fc6w1r";
|
sha256 = "0b82gm4i75q5v19kfbq0h4y0b2vcwr2213zkhxh6l0h45kdndmxd";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
(substituteAll {
|
# Fix for https://github.com/frescobaldi/python-poppler-qt5/issues/43 (from PR #45)
|
||||||
src = ./poppler-include-dir.patch;
|
|
||||||
poppler_include_dir = "${poppler.dev}/include/poppler";
|
|
||||||
})
|
|
||||||
(fetchpatch {
|
(fetchpatch {
|
||||||
url = "https://github.com/wbsoft/python-poppler-qt5/commit/faf4d1308f89560b0d849671226e3080dfc72e79.patch";
|
url = "https://github.com/frescobaldi/python-poppler-qt5/commit/40e71ad88173d02648bceb2438bc0567e60dacd5.patch";
|
||||||
sha256 = "18krhh6wzsnpxzlzv02nginb1vralla8ai24zqk10nc4mj6fkj86";
|
sha256 = "0c93d0k7b1n2s2njl8g92x6vw3z96da1fczah9qx07x08iw8dzi5";
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
setupPyBuildFlags = [
|
buildInputs = [ qtbase.dev poppler pyqt-builder ];
|
||||||
"--pyqt-sip-dir ${pyqt5}/share/sip/PyQt5"
|
nativeBuildInputs = [ pkg-config qmake sip_5 ];
|
||||||
"--qt-include-dir ${qtbase.dev}/include"
|
propagatedBuildInputs = [ pyqt5.dev ];
|
||||||
];
|
|
||||||
|
|
||||||
buildInputs = [ qtbase.dev poppler ];
|
format = "pyproject";
|
||||||
nativeBuildInputs = [ pkg-config ];
|
dontConfigure = true;
|
||||||
propagatedBuildInputs = [ sip pyqt5.dev ];
|
|
||||||
|
postPatch = ''
|
||||||
|
cat <<EOF >> pyproject.toml
|
||||||
|
sip-include-dirs = ["${pyqt5}/share/sip/PyQt5"]
|
||||||
|
|
||||||
|
[tool.sip.bindings.Poppler-Qt5]
|
||||||
|
include-dirs = ["${poppler.dev}/include/poppler"]
|
||||||
|
tags = ["${sip_5.platform_tag}"]
|
||||||
|
EOF
|
||||||
|
'';
|
||||||
|
|
||||||
# no tests, just bindings for `poppler_qt5`
|
# no tests, just bindings for `poppler_qt5`
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
pythonImportsCheck = [ "popplerqt5" ];
|
||||||
|
|
||||||
dontWrapQtApps = true;
|
dontWrapQtApps = true;
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://github.com/wbsoft/python-poppler-qt5";
|
homepage = "https://github.com/frescobaldi/python-poppler-qt5";
|
||||||
license = licenses.gpl2;
|
license = licenses.lgpl21Plus;
|
||||||
maintainers = with maintainers; [ ];
|
maintainers = with maintainers; [ eduardosm ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
diff --git a/setup.py b/setup.py
|
|
||||||
index 59a75b0..0a73268 100644
|
|
||||||
--- a/setup.py
|
|
||||||
+++ b/setup.py
|
|
||||||
@@ -169,6 +169,7 @@ class build_ext(build_ext_base):
|
|
||||||
'Please specify via --pyqt-sip-flags=')
|
|
||||||
|
|
||||||
self.include_dirs += (self.qt_include_dir,
|
|
||||||
+ '@poppler_include_dir@',
|
|
||||||
os.path.join(self.qt_include_dir, 'QtCore'),
|
|
||||||
os.path.join(self.qt_include_dir, 'QtGui'),
|
|
||||||
os.path.join(self.qt_include_dir, 'QtXml'))
|
|
@ -5077,7 +5077,7 @@ in {
|
|||||||
poolsense = callPackage ../development/python-modules/poolsense { };
|
poolsense = callPackage ../development/python-modules/poolsense { };
|
||||||
|
|
||||||
poppler-qt5 = callPackage ../development/python-modules/poppler-qt5 {
|
poppler-qt5 = callPackage ../development/python-modules/poppler-qt5 {
|
||||||
inherit (pkgs.qt5) qtbase;
|
inherit (pkgs.qt5) qtbase qmake;
|
||||||
inherit (pkgs.libsForQt5) poppler;
|
inherit (pkgs.libsForQt5) poppler;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user