From 2759ec1fe1466a00a7e45f72aac788f48641fecf Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 11 Nov 2023 15:55:56 +0530 Subject: [PATCH] Add an option to setup.py to skip building kitten Fixes #6809 --- setup.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/setup.py b/setup.py index c3e2b6959..1a2507e45 100755 --- a/setup.py +++ b/setup.py @@ -145,6 +145,7 @@ class Options: prefix: str = './linux-package' dir_for_static_binaries: str = 'build/static' skip_code_generation: bool = False + skip_building_kitten: bool = False clean_for_cross_compile: bool = False python_compiler_flags: str = '' python_linker_flags: str = '' @@ -959,6 +960,9 @@ def build_static_kittens( args: Options, launcher_dir: str, destination_dir: str = '', for_freeze: bool = False, for_platform: Optional[Tuple[str, str]] = None ) -> str: + if args.skip_building_kitten: + print('Skipping building of the kitten binary because of a command line option. Build is incomplete', file=sys.stderr) + return sys.stdout.flush() sys.stderr.flush() go = shutil.which('go') @@ -1653,6 +1657,12 @@ def option_parser() -> argparse.ArgumentParser: # {{{ help='Do not create the *_generated.* source files. This is useful if they' ' have already been generated by a previous build, for example during a two-stage cross compilation.' ) + p.add_argument( + '--skip-building-kitten', + default=Options.skip_building_kitten, + action='store_true', + help='Do not build the kitten binary. Useful if you want to build it separately.' + ) p.add_argument( '--clean-for-cross-compile', default=Options.clean_for_cross_compile,