mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Merge branch 'kovidgoyal:master' into master
This commit is contained in:
commit
74020eb2ff
@ -207,9 +207,14 @@ else:
|
||||
uchardet_libs = pkgconfig_libs('uchardet', '', '')
|
||||
|
||||
|
||||
if 'PODOFO_PREFIX' in os.environ:
|
||||
os.environ['PODOFO_LIB_DIR'] = os.path.join(os.environ['PODOFO_PREFIX'], 'lib')
|
||||
os.environ['PODOFO_INC_DIR'] = os.path.join(os.environ['PODOFO_PREFIX'], 'include', 'podofo')
|
||||
os.environ['PODOFO_LIB_NAME'] = os.path.join(os.environ['PODOFO_PREFIX'], 'lib', 'libpodofo.so.1')
|
||||
podofo_lib = os.environ.get('PODOFO_LIB_DIR', podofo_lib)
|
||||
podofo_inc = os.environ.get('PODOFO_INC_DIR', podofo_inc)
|
||||
podofo = os.environ.get('PODOFO_LIB_NAME', 'podofo')
|
||||
|
||||
podofo_error = None if os.path.exists(os.path.join(podofo_inc, 'podofo.h')) else \
|
||||
('PoDoFo not found on your system. Various PDF related',
|
||||
' functionality will not work. Use the PODOFO_INC_DIR and',
|
||||
|
@ -77,7 +77,7 @@ class Check(Command):
|
||||
def file_has_errors(self, f):
|
||||
ext = os.path.splitext(f)[1]
|
||||
if ext in {'.py', '.recipe'}:
|
||||
p2 = subprocess.Popen(['ruff', '--no-update-check', f])
|
||||
p2 = subprocess.Popen(['ruff', 'check', f])
|
||||
return p2.wait() != 0
|
||||
if ext == '.pyj':
|
||||
p = subprocess.Popen(['rapydscript', 'lint', f])
|
||||
|
@ -822,11 +822,11 @@ class BuiltinIdentifierInList(BuiltinFormatterFunction):
|
||||
raise ValueError(_("{} requires 2 or 4 arguments").format(self.name))
|
||||
|
||||
l = [v.strip() for v in val.split(',') if v.strip()]
|
||||
(id_, _, regexp) = ident.partition(':')
|
||||
(id_, __, regexp) = ident.partition(':')
|
||||
if not id_:
|
||||
return nfv
|
||||
for candidate in l:
|
||||
i, _, v = candidate.partition(':')
|
||||
i, __, v = candidate.partition(':')
|
||||
if v and i == id_:
|
||||
if not regexp or re.search(regexp, v, flags=re.I):
|
||||
return candidate if fv_is_id else fv
|
||||
|
@ -131,6 +131,7 @@ object_as_reference(const PdfObject *o) {
|
||||
}
|
||||
|
||||
// Needed to avoid PoDoFo clobbering the /Info and XMP metadata with its own nonsense
|
||||
// rename to NoMetadataUdate after https://github.com/podofo/podofo/commit/96689eb6e45b71eae1577ecb2d4a796c52e9a813
|
||||
static const PdfSaveOptions save_options = PdfSaveOptions::NoModifyDateUpdate;
|
||||
|
||||
class PdfReferenceHasher {
|
||||
|
Loading…
x
Reference in New Issue
Block a user