mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
setup: don't report full pathname when creating msgpack'ed resources
The full pathname in the log info was introduced as a side effect of moving off of pickle.
This commit is contained in:
parent
391ca722e0
commit
09e97e5af1
@ -64,7 +64,7 @@ class Coffee(Command): # {{{
|
|||||||
for src in self.COFFEE_DIRS:
|
for src in self.COFFEE_DIRS:
|
||||||
for f in glob.glob(self.j(self.SRC, __appname__, src,
|
for f in glob.glob(self.j(self.SRC, __appname__, src,
|
||||||
'*.coffee')):
|
'*.coffee')):
|
||||||
bn = os.path.basename(f).rpartition('.')[0]
|
bn = self.b(f).rpartition('.')[0]
|
||||||
arcname = src.replace('/', '.') + '.' + bn + '.js'
|
arcname = src.replace('/', '.') + '.' + bn + '.js'
|
||||||
try:
|
try:
|
||||||
with open(f, 'rb') as fs:
|
with open(f, 'rb') as fs:
|
||||||
@ -300,7 +300,7 @@ class Resources(Command): # {{{
|
|||||||
|
|
||||||
dest = self.j(self.RESOURCES, 'scripts.calibre_msgpack')
|
dest = self.j(self.RESOURCES, 'scripts.calibre_msgpack')
|
||||||
if self.newer(dest, self.j(self.SRC, 'calibre', 'linux.py')):
|
if self.newer(dest, self.j(self.SRC, 'calibre', 'linux.py')):
|
||||||
self.info('\tCreating ' + os.path.basename(dest))
|
self.info('\tCreating ' + self.b(dest))
|
||||||
with open(dest, 'wb') as f:
|
with open(dest, 'wb') as f:
|
||||||
f.write(msgpack_dumps(scripts))
|
f.write(msgpack_dumps(scripts))
|
||||||
|
|
||||||
@ -325,7 +325,7 @@ class Resources(Command): # {{{
|
|||||||
with zipfile.ZipFile(dest, 'w', zipfile.ZIP_STORED) as zf:
|
with zipfile.ZipFile(dest, 'w', zipfile.ZIP_STORED) as zf:
|
||||||
for n in sorted(files, key=self.b):
|
for n in sorted(files, key=self.b):
|
||||||
with open(n, 'rb') as f:
|
with open(n, 'rb') as f:
|
||||||
zf.writestr(os.path.basename(n), f.read())
|
zf.writestr(self.b(n), f.read())
|
||||||
|
|
||||||
dest = self.j(self.RESOURCES, 'ebook-convert-complete.calibre_msgpack')
|
dest = self.j(self.RESOURCES, 'ebook-convert-complete.calibre_msgpack')
|
||||||
files = []
|
files = []
|
||||||
@ -334,7 +334,7 @@ class Resources(Command): # {{{
|
|||||||
if f.endswith('.py'):
|
if f.endswith('.py'):
|
||||||
files.append(self.j(x[0], f))
|
files.append(self.j(x[0], f))
|
||||||
if self.newer(dest, files):
|
if self.newer(dest, files):
|
||||||
self.info('\tCreating ' + dest)
|
self.info('\tCreating ' + self.b(dest))
|
||||||
complete = {}
|
complete = {}
|
||||||
from calibre.ebooks.conversion.plumber import supported_input_formats
|
from calibre.ebooks.conversion.plumber import supported_input_formats
|
||||||
complete['input_fmts'] = set(supported_input_formats())
|
complete['input_fmts'] = set(supported_input_formats())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user