From 93d4eca2d447bd6bd082f11a35848b2553d8aec2 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 28 Apr 2021 13:11:01 +0530 Subject: [PATCH] Fix kitty.conf man page being installed in incorrect location Fixes #3543 --- setup.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index c56df6fe7..e77095026 100755 --- a/setup.py +++ b/setup.py @@ -827,6 +827,7 @@ def copy_man_pages(ddir: str) -> None: safe_makedirs(mandir) with suppress(FileNotFoundError): shutil.rmtree(os.path.join(mandir, 'man1')) + shutil.rmtree(os.path.join(mandir, 'man5')) src = 'docs/_build/man' if not os.path.exists(src): raise SystemExit('''\ @@ -834,7 +835,10 @@ The kitty man page is missing. If you are building from git then run: make && make docs (needs the sphinx documentation system to be installed) ''') - shutil.copytree(src, os.path.join(mandir, 'man1')) + for x in '15': + os.makedirs(os.path.join(mandir, f'man{x}')) + for y in glob.glob(os.path.join(src, f'*.{x}')): + shutil.copy2(y, os.path.join(mandir, f'man{x}')) def copy_html_docs(ddir: str) -> None: