Use base instead of cwd when checking for docs

This commit is contained in:
Kovid Goyal 2018-06-12 09:24:36 +05:30
parent 2db83ecf1e
commit 561fe81d00
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -543,7 +543,7 @@ def copy_man_pages(ddir):
shutil.rmtree(os.path.join(mandir, 'man1')) shutil.rmtree(os.path.join(mandir, 'man1'))
except FileNotFoundError: except FileNotFoundError:
pass pass
src = 'docs/_build/man' src = os.path.join(base, 'docs/_build/man')
if not os.path.exists(src): if not os.path.exists(src):
raise SystemExit('''\ raise SystemExit('''\
The kitty man page is missing. If you are building from git then run: The kitty man page is missing. If you are building from git then run:
@ -560,7 +560,7 @@ def copy_html_docs(ddir):
shutil.rmtree(htmldir) shutil.rmtree(htmldir)
except FileNotFoundError: except FileNotFoundError:
pass pass
src = 'docs/_build/html' src = os.path.join(base, 'docs/_build/html')
if not os.path.exists(src): if not os.path.exists(src):
raise SystemExit('''\ raise SystemExit('''\
The kitty html docs are missing. If you are building from git then run: The kitty html docs are missing. If you are building from git then run:
@ -790,7 +790,7 @@ def main():
) )
elif args.action == 'linux-package': elif args.action == 'linux-package':
build(args, native_optimizations=False) build(args, native_optimizations=False)
if not os.path.exists(os.path.join('docs/_build/html/index.html')): if not os.path.exists(os.path.join(base, 'docs/_build/html')):
run_tool(['make', 'docs']) run_tool(['make', 'docs'])
package(args) package(args)
elif args.action == 'osx-bundle': elif args.action == 'osx-bundle':