source: pdfshuffler/trunk/fuentes/debian/patches/use-pypdf2 @ 337

Last change on this file since 337 was 337, checked in by jrpelegrina, 5 years ago

Firs release to xenial

File size: 772 bytes
Line 
1From: Jeremy Lainé <jeremy.laine@m4x.org>
2Description: Use PyPDF2 instead of pyPdf
3
4Debian now ships PyPDF2 instead of the original pyPdf, see:
5
6    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=749321
7
8This patch allows pdfshuffler to use either pyPdf or PyPDF2.
9
10--- a/pdfshuffler/pdfshuffler.py        2012-04-28 16:15:17.000000000 +0200
11+++ b/pdfshuffler/pdfshuffler.py        2014-09-27 14:12:20.868185865 +0200
12@@ -71,7 +71,10 @@
13 import cairo
14 
15 import poppler      #for the rendering of pdf pages
16-from pyPdf import PdfFileWriter, PdfFileReader
17+try:
18+    from pyPdf import PdfFileWriter, PdfFileReader
19+except ImportError:
20+    from PyPDF2 import PdfFileWriter, PdfFileReader
21 
22 from pdfshuffler_iconview import CellRendererImage
23 gobject.type_register(CellRendererImage)
Note: See TracBrowser for help on using the repository browser.