git.iko.soy/typeable/nixpkgs
on master help sign in
pythonPackages.pypoppler: init at 0.12.2
commitf0155e8d70f1d78873b491dbbe297ca8fc279727 authorFrederik Rietdijk <fridh@fridh.nl> dateThu 29 Sep 2016, 14:36 (10 years ago) parentf3d7afa
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
@@ -8214,6 +8214,37 @@ in modules // {
82148214 inherit pythonOlder;
82158215 };
82168216
8217+ pypoppler = buildPythonPackage rec {
8218+ name = "pypoppler-${version}";
8219+ version = "0.12.2";
8220+
8221+ src = pkgs.fetchurl {
8222+ url = "mirror://pypi/p/pypoppler/${name}.tar.gz";
8223+ sha256 = "47e6ac99e5b114b9abf2d1dd1bca06f22c028d025432512989f659142470810f";
8224+ };
8225+
8226+ NIX_CFLAGS_COMPILE="-I${pkgs.poppler.dev}/include/poppler/";
8227+ buildInputs = [ pkgs.pkgconfig pkgs.poppler.dev ];
8228+ propagatedBuildInputs = with self; [ pycairo pygobject2 ];
8229+
8230+ patches = [
8231+ ../development/python-modules/pypoppler-0.39.0.patch
8232+ ../development/python-modules/pypoppler-poppler.c.patch
8233+ ];
8234+
8235+ # Not supported.
8236+ disabled = isPy3k;
8237+
8238+ # No tests in archive
8239+ doCheck = false;
8240+
8241+ meta = {
8242+ homepage = https://code.launchpad.net/~mriedesel/poppler-python/main;
8243+ description = "Python bindings for poppler-glib, unofficial branch including bug fixes, and removal of gtk dependencies";
8244+ license = licenses.gpl2;
8245+ };
8246+ };
8247+
82178248 python-axolotl = buildPythonPackage rec {
82188249 name = "python-axolotl-${version}";
82198250 version = "0.1.7";