mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-26 10:12:17 +02:00
Use tic when building linux-package instead of hard coding terminfo directory structure
This commit is contained in:
10
setup.py
10
setup.py
@@ -217,16 +217,14 @@ def safe_makedirs(path):
|
|||||||
def package(args): # {{{
|
def package(args): # {{{
|
||||||
ddir = args.prefix
|
ddir = args.prefix
|
||||||
libdir = os.path.join(ddir, 'lib', 'kitty')
|
libdir = os.path.join(ddir, 'lib', 'kitty')
|
||||||
terminfo_sdir = ('78' if isosx else 'x')
|
|
||||||
terminfo_dir = os.path.join(ddir, 'share/terminfo/' + terminfo_sdir)
|
|
||||||
if os.path.exists(libdir):
|
if os.path.exists(libdir):
|
||||||
shutil.rmtree(libdir)
|
shutil.rmtree(libdir)
|
||||||
os.makedirs(os.path.join(libdir, 'terminfo/' + terminfo_sdir))
|
|
||||||
os.makedirs(os.path.join(libdir, 'logo'))
|
os.makedirs(os.path.join(libdir, 'logo'))
|
||||||
safe_makedirs(terminfo_dir)
|
for x in (libdir, os.path.join(ddir, 'share')):
|
||||||
|
odir = os.path.join(x, 'terminfo')
|
||||||
|
safe_makedirs(odir)
|
||||||
|
subprocess.check_call(['tic', '-o' + odir, 'terminfo/kitty.terminfo'])
|
||||||
shutil.copy2('__main__.py', libdir)
|
shutil.copy2('__main__.py', libdir)
|
||||||
shutil.copy2('terminfo/x/xterm-kitty', terminfo_dir)
|
|
||||||
shutil.copy2('terminfo/x/xterm-kitty', os.path.join(libdir, 'terminfo/' + terminfo_sdir))
|
|
||||||
shutil.copy2('logo/kitty.rgba', os.path.join(libdir, 'logo'))
|
shutil.copy2('logo/kitty.rgba', os.path.join(libdir, 'logo'))
|
||||||
|
|
||||||
def src_ignore(parent, entries):
|
def src_ignore(parent, entries):
|
||||||
|
|||||||
Reference in New Issue
Block a user