Decode tic stderr using utf-8
This commit is contained in:
parent
f08f0f9dbd
commit
a045ac3bd7
4
setup.py
4
setup.py
@ -599,9 +599,9 @@ def package(args, for_bundle=False, sh_launcher=False):
|
|||||||
for x in (libdir, os.path.join(ddir, 'share')):
|
for x in (libdir, os.path.join(ddir, 'share')):
|
||||||
odir = os.path.join(x, 'terminfo')
|
odir = os.path.join(x, 'terminfo')
|
||||||
safe_makedirs(odir)
|
safe_makedirs(odir)
|
||||||
proc = subprocess.run(['tic', '-x', '-o' + odir, 'terminfo/kitty.terminfo'], check=True, text=True, stderr=subprocess.PIPE)
|
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$'
|
regex = '^"terminfo/kitty.terminfo", line [0-9]+, col [0-9]+, terminal \'xterm-kitty\': older tic versions may treat the description field as an alias$'
|
||||||
err_msg = proc.stderr.rstrip()
|
err_msg = proc.stderr.decode('utf-8').rstrip()
|
||||||
if not re.match(regex, err_msg):
|
if not re.match(regex, err_msg):
|
||||||
print(err_msg, file=sys.stderr)
|
print(err_msg, file=sys.stderr)
|
||||||
if not glob.glob(os.path.join(odir, '*/xterm-kitty')):
|
if not glob.glob(os.path.join(odir, '*/xterm-kitty')):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user