git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #19078 from FRidh/pypoppler

pythonPackages.pypoppler: init at 0.12.2

commit11d7e936246842f0362935611d73406104d8c6ed authorFrederik Rietdijk <freddyrietdijk@fridh.nl> dateSat 1 Oct 2016, 11:10 (10 years ago) parent253f964f0155e8
3 files changed+66
pkgs/development/python-modules/pypoppler-0.39.0.patch+23 pkgs/development/python-modules/pypoppler-poppler.c.patch+12 pkgs/top-level/python-packages.nix+31
pkgs/development/python-modules/pypoppler-0.39.0.patchnew file+23
@@ -0,0 +1,23 @@
1+diff --git a/poppler.defs b/poppler.defs
2+index 8b12e03..2b8fc16 100644
3+--- a/poppler.defs
4++++ b/poppler.defs
5+@@ -570,18 +570,6 @@
6+ )
7+ )
8+
9+-(define-enum Orientation
10+- (in-module "Poppler")
11+- (c-name "PopplerOrientation")
12+- (gtype-id "POPPLER_TYPE_ORIENTATION")
13+- (values
14+- '("portrait" "POPPLER_ORIENTATION_PORTRAIT")
15+- '("landscape" "POPPLER_ORIENTATION_LANDSCAPE")
16+- '("upsidedown" "POPPLER_ORIENTATION_UPSIDEDOWN")
17+- '("seascape" "POPPLER_ORIENTATION_SEASCAPE")
18+- )
19+-)
20+-
21+ (define-enum PageTransitionType
22+ (in-module "Poppler")
23+ (c-name "PopplerPageTransitionType")
pkgs/development/python-modules/pypoppler-poppler.c.patchnew file+12
@@ -0,0 +1,12 @@
1+diff --git a/poppler.c b/poppler.c
2+index 31b4489..16d0838 100644
3+--- a/poppler.c
4++++ b/poppler.c
5+@@ -4501,7 +4501,6 @@ py_poppler_add_constants(PyObject *module, const gchar *strip_prefix)
6+ pyg_enum_add(module, "FormTextType", strip_prefix, POPPLER_TYPE_FORM_TEXT_TYPE);
7+ pyg_enum_add(module, "FormChoiceType", strip_prefix, POPPLER_TYPE_FORM_CHOICE_TYPE);
8+ pyg_enum_add(module, "Error", strip_prefix, POPPLER_TYPE_ERROR);
9+- pyg_enum_add(module, "Orientation", strip_prefix, POPPLER_TYPE_ORIENTATION);
10+ pyg_enum_add(module, "PageTransitionType", strip_prefix, POPPLER_TYPE_PAGE_TRANSITION_TYPE);
11+ pyg_enum_add(module, "PageTransitionAlignment", strip_prefix, POPPLER_TYPE_PAGE_TRANSITION_ALIGNMENT);
12+ pyg_enum_add(module, "PageTransitionDirection", strip_prefix, POPPLER_TYPE_PAGE_TRANSITION_DIRECTION);
pkgs/top-level/python-packages.nix+31
@@ -8286,6 +8286,37 @@ in modules // {
82868286 inherit pythonOlder;
82878287 };
82888288
8289+ pypoppler = buildPythonPackage rec {
8290+ name = "pypoppler-${version}";
8291+ version = "0.12.2";
8292+
8293+ src = pkgs.fetchurl {
8294+ url = "mirror://pypi/p/pypoppler/${name}.tar.gz";
8295+ sha256 = "47e6ac99e5b114b9abf2d1dd1bca06f22c028d025432512989f659142470810f";
8296+ };
8297+
8298+ NIX_CFLAGS_COMPILE="-I${pkgs.poppler.dev}/include/poppler/";
8299+ buildInputs = [ pkgs.pkgconfig pkgs.poppler.dev ];
8300+ propagatedBuildInputs = with self; [ pycairo pygobject2 ];
8301+
8302+ patches = [
8303+ ../development/python-modules/pypoppler-0.39.0.patch
8304+ ../development/python-modules/pypoppler-poppler.c.patch
8305+ ];
8306+
8307+ # Not supported.
8308+ disabled = isPy3k;
8309+
8310+ # No tests in archive
8311+ doCheck = false;
8312+
8313+ meta = {
8314+ homepage = https://code.launchpad.net/~mriedesel/poppler-python/main;
8315+ description = "Python bindings for poppler-glib, unofficial branch including bug fixes, and removal of gtk dependencies";
8316+ license = licenses.gpl2;
8317+ };
8318+ };
8319+
82898320 python-axolotl = buildPythonPackage rec {
82908321 name = "python-axolotl-${version}";
82918322 version = "0.1.7";