Linux source install: Write path to bin dir into launcher scripts to make IPC more robust

This commit is contained in:
Kovid Goyal 2009-12-04 17:25:14 -07:00
parent 9a6754b01d
commit 90fb3e2108
2 changed files with 4 additions and 1 deletions

View File

@ -26,6 +26,7 @@ sys.path.insert(0, path)
sys.resources_location = os.environ.get('CALIBRE_RESOURCES_PATH', {resources!r})
sys.extensions_location = os.environ.get('CALIBRE_EXTENSIONS_PATH', {extensions!r})
sys.executables_location = os.environ.get('CALIBRE_EXECUTABLES_PATH', {executables!r})
'''
@ -184,6 +185,7 @@ class Develop(Command):
script = template.format(
module=mod, func=func,
path=self.libdir, resources=self.sharedir,
executables=self.staging_bindir,
extensions=self.j(self.libdir, 'calibre', 'plugins'))
path = self.j(self.staging_bindir, name)
if not os.path.exists(self.staging_bindir):

View File

@ -55,7 +55,8 @@ class Worker(object):
return os.path.join(contents, 'MacOS', self.osx_interpreter)
return os.path.join(getattr(sys, 'frozen_path'), 'calibre-parallel') \
if isfrozen else 'calibre-parallel'
if isfrozen else \
os.path.join(sys.executables_location, 'calibre-parallel')
@property
def gui_executable(self):