mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
pep8
This commit is contained in:
parent
3bb7e0c23f
commit
6fe7c2c662
@ -112,7 +112,6 @@ class LinuxFreeze(Command):
|
||||
else:
|
||||
ffi = glob.glob('/usr/lib/libffi.so.?')[-1]
|
||||
|
||||
|
||||
for x in binary_includes + [stdcpp, ffi]:
|
||||
dest = self.bin_dir if '/bin/' in x else self.lib_dir
|
||||
shutil.copy2(x, dest)
|
||||
@ -226,7 +225,6 @@ class LinuxFreeze(Command):
|
||||
except:
|
||||
self.warn('Failed to byte-compile', y)
|
||||
|
||||
|
||||
def run_builder(self, cmd, verbose=True):
|
||||
p = subprocess.Popen(cmd, stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE)
|
||||
@ -256,7 +254,6 @@ class LinuxFreeze(Command):
|
||||
self.info('Archive %s created: %.2f MB'%(dist,
|
||||
os.stat(dist).st_size/(1024.**2)))
|
||||
|
||||
|
||||
def build_launchers(self):
|
||||
self.obj_dir = self.j(self.src_root, 'build', 'launcher')
|
||||
if not os.path.exists(self.obj_dir):
|
||||
@ -268,7 +265,8 @@ class LinuxFreeze(Command):
|
||||
cflags = '-fno-strict-aliasing -W -Wall -c -O2 -pipe -DPYTHON_VER="python%s"'%self.py_ver
|
||||
cflags = cflags.split() + ['-I/usr/include/python'+self.py_ver]
|
||||
for src, obj in zip(sources, objects):
|
||||
if not self.newer(obj, headers+[src, __file__]): continue
|
||||
if not self.newer(obj, headers+[src, __file__]):
|
||||
continue
|
||||
cmd = ['gcc'] + cflags + ['-fPIC', '-o', obj, src]
|
||||
self.run_builder(cmd)
|
||||
|
||||
@ -330,7 +328,6 @@ class LinuxFreeze(Command):
|
||||
|
||||
self.run_builder(cmd, verbose=False)
|
||||
|
||||
|
||||
def create_site_py(self): # {{{
|
||||
with open(self.j(self.py_dir, 'site.py'), 'wb') as f:
|
||||
f.write(textwrap.dedent('''\
|
||||
|
@ -37,7 +37,6 @@ class OSX32_Freeze(Command):
|
||||
action='store_true',
|
||||
help='Only build launchers')
|
||||
|
||||
|
||||
def run(self, opts):
|
||||
global info, warn
|
||||
info, warn = self.info, self.warn
|
||||
@ -332,7 +331,7 @@ class Py2App(object):
|
||||
def create_plist(self):
|
||||
from calibre.ebooks import BOOK_EXTENSIONS
|
||||
env = dict(**ENV)
|
||||
env['CALIBRE_LAUNCHED_FROM_BUNDLE']='1';
|
||||
env['CALIBRE_LAUNCHED_FROM_BUNDLE']='1'
|
||||
docs = [{'CFBundleTypeName':'E-book',
|
||||
'CFBundleTypeExtensions':list(BOOK_EXTENSIONS),
|
||||
'CFBundleTypeRole':'Viewer',
|
||||
@ -395,7 +394,6 @@ class Py2App(object):
|
||||
self.install_dylib(os.path.join(SW, 'lib', 'libpng12.0.dylib'))
|
||||
self.install_dylib(os.path.join(SW, 'lib', 'libpng.3.dylib'))
|
||||
|
||||
|
||||
@flush
|
||||
def add_fontconfig(self):
|
||||
info('\nAdding fontconfig')
|
||||
@ -607,7 +605,6 @@ class Py2App(object):
|
||||
shutil.copy2(join(base, 'site.py'), join(self.resources_dir, 'Python',
|
||||
'lib', 'python'+self.version_info))
|
||||
|
||||
|
||||
@flush
|
||||
def makedmg(self, d, volname,
|
||||
destdir='dist',
|
||||
|
Loading…
x
Reference in New Issue
Block a user