Line 0
Link Here
|
|
|
1 |
diff --git a/setup.py b/setup.py |
2 |
index 7c4295bd..8d31e2d1 100755 |
3 |
--- a/setup.py |
4 |
+++ b/setup.py |
5 |
@@ -856,6 +856,14 @@ Categories=System;TerminalEmulator; |
6 |
os.makedirs(os.path.dirname(in_src_launcher), exist_ok=True) |
7 |
os.symlink(os.path.relpath(launcher, os.path.dirname(in_src_launcher)), in_src_launcher) |
8 |
|
9 |
+def terminfo(args): |
10 |
+ ddir = args.prefix |
11 |
+ libdir = os.path.join(ddir, args.libdir_name.strip('/'), 'kitty') |
12 |
+ build_terminfo = runpy.run_path('build-terminfo', run_name='import_build') |
13 |
+ for x in (libdir, os.path.join(ddir, 'share')): |
14 |
+ odir = os.path.join(x, 'terminfo') |
15 |
+ safe_makedirs(odir) |
16 |
+ build_terminfo['compile_terminfo'](odir) |
17 |
|
18 |
def macos_info_plist() -> bytes: |
19 |
import plistlib |
20 |
@@ -1022,7 +1030,7 @@ def clean() -> None: |
21 |
|
22 |
safe_remove( |
23 |
'build', 'compile_commands.json', 'link_commands.json', |
24 |
- 'linux-package', 'kitty.app', 'asan-launcher', |
25 |
+ 'linux-package', 'linux-terminfo', 'kitty.app', 'asan-launcher', |
26 |
'kitty-profile', 'kitty/launcher') |
27 |
exclude = ('.git',) |
28 |
for root, dirs, files in os.walk('.', topdown=True): |
29 |
@@ -1045,7 +1053,7 @@ def option_parser() -> argparse.ArgumentParser: # {{{ |
30 |
'action', |
31 |
nargs='?', |
32 |
default=Options.action, |
33 |
- choices='build test linux-package kitty.app linux-freeze macos-freeze build-launcher clean'.split(), |
34 |
+ choices='build test linux-package linux-terminfo kitty.app linux-freeze macos-freeze build-launcher clean'.split(), |
35 |
help='Action to perform (default is build)' |
36 |
) |
37 |
p.add_argument( |
38 |
@@ -1166,6 +1174,8 @@ def main() -> None: |
39 |
elif args.action == 'linux-package': |
40 |
build(args, native_optimizations=False) |
41 |
package(args, bundle_type='linux-package') |
42 |
+ elif args.action == 'linux-terminfo': |
43 |
+ terminfo(args) |
44 |
elif args.action == 'linux-freeze': |
45 |
build(args, native_optimizations=False) |
46 |
package(args, bundle_type='linux-freeze') |