Skip to content

Commit aa8854e

Browse files
committed
python3Packages.python-poppler: init at 0.4.1
1 parent bc68570 commit aa8854e

File tree

3 files changed

+73
-0
lines changed

3 files changed

+73
-0
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{
2+
lib,
3+
buildPythonPackage,
4+
fetchPypi,
5+
pythonOlder,
6+
pytestCheckHook,
7+
setuptools,
8+
meson-python,
9+
ninja,
10+
meson,
11+
poppler,
12+
pkg-config,
13+
pybind11,
14+
}:
15+
16+
buildPythonPackage rec {
17+
pname = "python-poppler";
18+
version = "0.4.1";
19+
pyproject = true;
20+
21+
disabled = pythonOlder "3.6";
22+
23+
src = fetchPypi {
24+
inherit version;
25+
pname = "python_poppler";
26+
hash = "sha256-5spcI+wCNQvyzvhaa/nxsmF5ZDbbR4F2+dJPsU7uzGo=";
27+
};
28+
29+
patches = [
30+
# Prevent Meson from downloading pybind11, use system version instead
31+
./use_system_pybind11.patch
32+
];
33+
34+
build-system = [ meson-python ];
35+
36+
buildInputs = [ pybind11 ];
37+
38+
nativeBuildInputs = [
39+
ninja
40+
pkg-config
41+
];
42+
43+
propagatedBuildInputs = [ poppler ];
44+
45+
nativeCheckInputs = [ pytestCheckHook ];
46+
47+
pythonImportCheck = [ "poppler" ];
48+
49+
meta = {
50+
description = "Python binding to poppler-cpp";
51+
homepage = "https://github.com/cbrunet/python-poppler";
52+
changelog = "https://cbrunet.net/python-poppler/changelog.html";
53+
# Contradictory license definition
54+
# https://github.com/cbrunet/python-poppler/issues/90
55+
license = lib.licenses.gpl2Plus;
56+
maintainers = [ lib.maintainers.onny ];
57+
};
58+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/meson.build b/meson.build
2+
index c1ac57a..1d1ad1f 100644
3+
--- a/meson.build
4+
+++ b/meson.build
5+
@@ -13,7 +13,6 @@ poppler_dep = dependency('poppler-cpp', version: '>=0.26.0')
6+
python_mod = import('python')
7+
python3 = python_mod.find_installation('python3', pure: false)
8+
9+
-pybind11_proj = subproject('pybind11')
10+
-pybind11_dep = pybind11_proj.get_variable('pybind11_dep')
11+
+pybind11_dep = dependency('pybind11')
12+
13+
subdir('src')

pkgs/top-level/python-packages.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10474,6 +10474,8 @@ self: super: with self; {
1047410474

1047510475
python-owasp-zap-v2-4 = callPackage ../development/python-modules/python-owasp-zap-v2-4 { };
1047610476

10477+
python-poppler = callPackage ../development/python-modules/python-poppler { };
10478+
1047710479
python-pptx = callPackage ../development/python-modules/python-pptx { };
1047810480

1047910481
python-songpal = callPackage ../development/python-modules/python-songpal { };

0 commit comments

Comments
 (0)