Migrated pypdf2 to the now active developed pypdf
This commit is contained in:
parent
791bc9621a
commit
c21a870b8e
|
@ -37,16 +37,22 @@ except (ImportError, RuntimeError) as e:
|
|||
use_generic_pdf_cover = True
|
||||
|
||||
try:
|
||||
from PyPDF2 import PdfReader
|
||||
from PyPDF import PdfReader
|
||||
use_pdf_meta = True
|
||||
except ImportError as ex:
|
||||
log.debug('PyPDF2 is recommended for best performance in metadata extracting from pdf files: %s', ex)
|
||||
log.debug('PyPDF is recommended for best performance in metadata extracting from pdf files: %s', ex)
|
||||
try:
|
||||
from PyPDF3 import PdfFileReader as PdfReader
|
||||
from PyPDF2 import PdfReader
|
||||
use_pdf_meta = True
|
||||
except ImportError as e:
|
||||
log.debug('Cannot import PyPDF3/PyPDF2, extracting pdf metadata will not work: %s / %s', e)
|
||||
use_pdf_meta = False
|
||||
except ImportError as ex:
|
||||
log.debug('PyPDF is recommended for best performance in metadata extracting from pdf files: %s', ex)
|
||||
log.debug('PyPdf2 is also possible for metadata extracting from pdf files, but not recommended anymore')
|
||||
try:
|
||||
from PyPDF3 import PdfFileReader as PdfReader
|
||||
use_pdf_meta = True
|
||||
except ImportError as e:
|
||||
log.debug('Cannot import PyPDF3/PyPDF2, extracting pdf metadata will not work: %s / %s', e)
|
||||
use_pdf_meta = False
|
||||
|
||||
try:
|
||||
from . import epub
|
||||
|
|
|
@ -7,7 +7,7 @@ Flask-Principal>=0.3.2,<0.5.1
|
|||
backports_abc>=0.4
|
||||
Flask>=1.0.2,<2.2.0
|
||||
iso-639>=0.4.5,<0.5.0
|
||||
PyPDF2>=1.28,<3.1.0
|
||||
PyPDF>=3.0.0,<3.3.0
|
||||
pytz>=2016.10
|
||||
requests>=2.11.1,<2.28.0
|
||||
SQLAlchemy>=1.3.0,<1.5.0
|
||||
|
|
|
@ -23,6 +23,7 @@ classifiers =
|
|||
Programming Language :: Python :: 3.8
|
||||
Programming Language :: Python :: 3.9
|
||||
Programming Language :: Python :: 3.10
|
||||
Programming Language :: Python :: 3.11
|
||||
Operating System :: OS Independent
|
||||
keywords =
|
||||
calibre
|
||||
|
@ -46,7 +47,7 @@ install_requires =
|
|||
backports_abc>=0.4
|
||||
Flask>=1.0.2,<2.2.0
|
||||
iso-639>=0.4.5,<0.5.0
|
||||
PyPDF2>=1.28,<3.1.0
|
||||
PyPDF>=3.0.0,<3.3.0
|
||||
pytz>=2016.10
|
||||
requests>=2.11.1,<2.28.0
|
||||
SQLAlchemy>=1.3.0,<1.5.0
|
||||
|
|
Loading…
Reference in New Issue
Block a user