mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-09-11 22:47:45 +03:00
Allow the name of the lib directory in linux-package to be configurable. Fixes #372
This commit is contained in:
parent
ffc717717c
commit
2bf8e1b1a3
@ -94,7 +94,7 @@ int main(int argc, char *argv[]) {
|
|||||||
#ifdef FOR_LAUNCHER
|
#ifdef FOR_LAUNCHER
|
||||||
num = snprintf(lib, PATH_MAX, "%s%s", exe_dir, "/../Frameworks/kitty");
|
num = snprintf(lib, PATH_MAX, "%s%s", exe_dir, "/../Frameworks/kitty");
|
||||||
#else
|
#else
|
||||||
num = snprintf(lib, PATH_MAX, "%s%s", exe_dir, "/../lib/kitty");
|
num = snprintf(lib, PATH_MAX, "%s%s%s%s", exe_dir, "/../", LIB_DIR_NAME, "/kitty");
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
10
setup.py
10
setup.py
@ -485,6 +485,7 @@ def build_linux_launcher(args, launcher_dir='.', for_bundle=False, sh_launcher=F
|
|||||||
cflags.append('-DPYVER="{}"'.format(sysconfig.get_python_version()))
|
cflags.append('-DPYVER="{}"'.format(sysconfig.get_python_version()))
|
||||||
elif sh_launcher:
|
elif sh_launcher:
|
||||||
cflags.append('-DFOR_LAUNCHER')
|
cflags.append('-DFOR_LAUNCHER')
|
||||||
|
cflags.append('-DLIB_DIR_NAME="{}"'.format(args.libdir_name.strip('/')))
|
||||||
pylib = get_python_flags(cflags)
|
pylib = get_python_flags(cflags)
|
||||||
exe = 'kitty-profile' if args.profile else 'kitty'
|
exe = 'kitty-profile' if args.profile else 'kitty'
|
||||||
cflags += shlex.split(os.environ.get('CFLAGS', ''))
|
cflags += shlex.split(os.environ.get('CFLAGS', ''))
|
||||||
@ -498,7 +499,9 @@ def build_linux_launcher(args, launcher_dir='.', for_bundle=False, sh_launcher=F
|
|||||||
|
|
||||||
def package(args, for_bundle=False, sh_launcher=False): # {{{
|
def package(args, for_bundle=False, sh_launcher=False): # {{{
|
||||||
ddir = args.prefix
|
ddir = args.prefix
|
||||||
libdir = os.path.join(ddir, 'lib', 'kitty')
|
if for_bundle or sh_launcher:
|
||||||
|
args.libdir_name = 'lib'
|
||||||
|
libdir = os.path.join(ddir, args.libdir_name.strip('/'), 'kitty')
|
||||||
if os.path.exists(libdir):
|
if os.path.exists(libdir):
|
||||||
shutil.rmtree(libdir)
|
shutil.rmtree(libdir)
|
||||||
os.makedirs(os.path.join(libdir, 'logo'))
|
os.makedirs(os.path.join(libdir, 'logo'))
|
||||||
@ -676,6 +679,11 @@ def option_parser():
|
|||||||
action='store_true',
|
action='store_true',
|
||||||
help='Use the -pg compile flag to add profiling information'
|
help='Use the -pg compile flag to add profiling information'
|
||||||
)
|
)
|
||||||
|
p.add_argument(
|
||||||
|
'--libdir-name',
|
||||||
|
default='lib',
|
||||||
|
help='The name of the directory inside --prefix in which to store compiled files'
|
||||||
|
)
|
||||||
return p
|
return p
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user