summaryrefslogtreecommitdiff
path: root/app-text/pdfshuffler/files/pdfshuffler-PyPDF2.patch
diff options
context:
space:
mode:
Diffstat (limited to 'app-text/pdfshuffler/files/pdfshuffler-PyPDF2.patch')
-rw-r--r--app-text/pdfshuffler/files/pdfshuffler-PyPDF2.patch18
1 files changed, 18 insertions, 0 deletions
diff --git a/app-text/pdfshuffler/files/pdfshuffler-PyPDF2.patch b/app-text/pdfshuffler/files/pdfshuffler-PyPDF2.patch
new file mode 100644
index 000000000000..8228c1765143
--- /dev/null
+++ b/app-text/pdfshuffler/files/pdfshuffler-PyPDF2.patch
@@ -0,0 +1,18 @@
+diff -r -U2 pdfshuffler-0.6.0.orig/pdfshuffler/pdfshuffler.py pdfshuffler-0.6.0/pdfshuffler/pdfshuffler.py
+--- pdfshuffler-0.6.0.orig/pdfshuffler/pdfshuffler.py 2012-04-28 21:15:17.000000000 +0700
++++ pdfshuffler-0.6.0/pdfshuffler/pdfshuffler.py 2015-01-11 02:10:02.952809411 +0600
+@@ -72,5 +72,13 @@
+
+ import poppler #for the rendering of pdf pages
+-from pyPdf import PdfFileWriter, PdfFileReader
++
++try:
++ from PyPDF2 import PdfFileWriter, PdfFileReader
++except ImportError:
++ try:
++ from pyPdf import PdfFileWriter, PdfFileReader
++ except ImportError:
++ print('Neither PyPDF2 nor pyPdf found')
++ sys.exit(1)
+
+ from pdfshuffler_iconview import CellRendererImage