mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-10 18:48:54 +02:00
Merge branch 'filter_tic_output' of https://github.com/Luflosi/kitty
This commit is contained in:
6
setup.py
6
setup.py
@@ -599,7 +599,11 @@ def package(args, for_bundle=False, sh_launcher=False):
|
||||
for x in (libdir, os.path.join(ddir, 'share')):
|
||||
odir = os.path.join(x, 'terminfo')
|
||||
safe_makedirs(odir)
|
||||
subprocess.check_call(['tic', '-x', '-o' + odir, 'terminfo/kitty.terminfo'])
|
||||
proc = subprocess.run(['tic', '-x', '-o' + odir, 'terminfo/kitty.terminfo'], check=True, stderr=subprocess.PIPE)
|
||||
regex = '^"terminfo/kitty.terminfo", line [0-9]+, col [0-9]+, terminal \'xterm-kitty\': older tic versions may treat the description field as an alias$'
|
||||
for error in proc.stderr.decode('utf-8').splitlines():
|
||||
if not re.match(regex, error):
|
||||
print(error, file=sys.stderr)
|
||||
if not glob.glob(os.path.join(odir, '*/xterm-kitty')):
|
||||
raise SystemExit('tic failed to output the compiled kitty terminfo file')
|
||||
shutil.copy2('__main__.py', libdir)
|
||||
|
||||
Reference in New Issue
Block a user