And we have frozen builds working with kitty-tool
This commit is contained in:
parent
1c7d6f8bc6
commit
e9e7b97c48
@ -77,6 +77,15 @@ def run_tests(kitty_exe):
|
||||
raise SystemExit('Checking of kitty build failed')
|
||||
|
||||
|
||||
def build_frozen_tools(kitty_exe):
|
||||
cmd = SETUP_CMD + ['--prefix', os.path.dirname(kitty_exe)] + ['build-frozen-tools']
|
||||
if run(*cmd, cwd=build_frozen_launcher.writeable_src_dir) != 0:
|
||||
print('Building of frozen kitty-tool failed', file=sys.stderr)
|
||||
os.chdir(KITTY_DIR)
|
||||
run_shell()
|
||||
raise SystemExit('Building of kitty-tool launcher failed')
|
||||
|
||||
|
||||
def sanitize_source_folder(path: str) -> None:
|
||||
for q in walk(path):
|
||||
if os.path.splitext(q)[1] not in ('.py', '.glsl', '.ttf', '.otf'):
|
||||
|
||||
@ -238,10 +238,12 @@ def main():
|
||||
files = find_binaries(env)
|
||||
fix_permissions(files)
|
||||
add_ca_certs(env)
|
||||
kitty_exe = os.path.join(env.base, 'bin', 'kitty')
|
||||
iv['build_frozen_tools'](kitty_exe)
|
||||
if not args.dont_strip:
|
||||
strip_binaries(files)
|
||||
if not args.skip_tests:
|
||||
iv['run_tests'](os.path.join(env.base, 'bin', 'kitty'))
|
||||
iv['run_tests'](kitty_exe)
|
||||
create_tarfile(env, args.compression_level)
|
||||
|
||||
|
||||
|
||||
@ -171,6 +171,7 @@ class Freeze(object):
|
||||
self.add_misc_libraries()
|
||||
self.freeze_python()
|
||||
self.add_ca_certs()
|
||||
self.build_frozen_tools()
|
||||
if not self.dont_strip:
|
||||
self.strip_files()
|
||||
if not self.skip_tests:
|
||||
@ -378,6 +379,10 @@ class Freeze(object):
|
||||
if f.endswith('.so') or f.endswith('.dylib'):
|
||||
self.fix_dependencies_in_lib(f)
|
||||
|
||||
@flush
|
||||
def build_frozen_tools(self):
|
||||
iv['build_frozen_tools'](join(self.contents_dir, 'MacOS', 'kitty'))
|
||||
|
||||
@flush
|
||||
def add_site_packages(self):
|
||||
print('\nAdding site-packages')
|
||||
|
||||
5
setup.py
5
setup.py
@ -1483,6 +1483,7 @@ def option_parser() -> argparse.ArgumentParser: # {{{
|
||||
'macos-freeze',
|
||||
'build-launcher',
|
||||
'build-frozen-launcher',
|
||||
'build-frozen-tools',
|
||||
'clean',
|
||||
'export-ci-bundles',
|
||||
'build-dep',
|
||||
@ -1689,7 +1690,8 @@ def main() -> None:
|
||||
init_env_from_args(args, False)
|
||||
bundle_type = ('macos' if is_macos else 'linux') + '-freeze'
|
||||
build_launcher(args, launcher_dir=os.path.join(args.prefix, 'bin'), bundle_type=bundle_type)
|
||||
build_kitty_tool(args, launcher_dir=os.path.join(args.prefix, 'bin'))
|
||||
elif args.action == 'build-frozen-tools':
|
||||
build_kitty_tool(args, launcher_dir=args.prefix)
|
||||
elif args.action == 'linux-package':
|
||||
build(args, native_optimizations=False)
|
||||
package(args, bundle_type='linux-package')
|
||||
@ -1699,7 +1701,6 @@ def main() -> None:
|
||||
elif args.action == 'macos-freeze':
|
||||
init_env_from_args(args, native_optimizations=False)
|
||||
build_launcher(args, launcher_dir=launcher_dir)
|
||||
build_kitty_tool(args, launcher_dir=launcher_dir)
|
||||
build(args, native_optimizations=False, call_init=False)
|
||||
package(args, bundle_type='macos-freeze')
|
||||
elif args.action == 'kitty.app':
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user