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):