From 90fb3e210856aa38f01e2d855f44332fbae64f49 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 4 Dec 2009 17:25:14 -0700 Subject: [PATCH] Linux source install: Write path to bin dir into launcher scripts to make IPC more robust --- setup/install.py | 2 ++ src/calibre/utils/ipc/launch.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/setup/install.py b/setup/install.py index 0ac23582c7..4aab6a4761 100644 --- a/setup/install.py +++ b/setup/install.py @@ -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): diff --git a/src/calibre/utils/ipc/launch.py b/src/calibre/utils/ipc/launch.py index 0432143ae2..dbabfe86b2 100644 --- a/src/calibre/utils/ipc/launch.py +++ b/src/calibre/utils/ipc/launch.py @@ -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):