diff --git a/linux_installer.py b/linux_installer.py index e30e2bbeca..6a1acb40cd 100644 --- a/linux_installer.py +++ b/linux_installer.py @@ -133,7 +133,7 @@ for dirpath, dirnames, filenames in os.walk(plugdir): binaries += plugins manifest = '/tmp/manifest' -open(manifest, 'wb').write('\\n'.join(executables)) +open(manifest, 'wb').write('\n'.join(executables)) version = '/tmp/version' open(version, 'wb').write(__version__) coll = COLLECT(binaries, pyz, diff --git a/src/calibre/linux.py b/src/calibre/linux.py index a7999050bb..d292f244ce 100644 --- a/src/calibre/linux.py +++ b/src/calibre/linux.py @@ -360,7 +360,14 @@ def install_man_pages(fatal_errors): '--section', '1', '--no-info', '--include', f.name, '--manual', __appname__) manfile = os.path.join(manpath, prog+'.1'+__appname__+'.bz2') - p = subprocess.Popen(help2man, stdout=subprocess.PIPE) + try: + p = subprocess.Popen(help2man, stdout=subprocess.PIPE) + except OSError, err: + import errno + if err.errno != errno.ENOENT: + raise + print 'Failed to install MAN pages as help2man is missing from your system' + break raw = re.compile(r'^\.IP\s*^([A-Z :]+)$', re.MULTILINE).sub(r'.SS\n\1', p.stdout.read()) if not raw.strip(): print 'Unable to create MAN page for', prog