mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-05-13 08:26:56 +00:00
Allow building kitty-tool as a static binary
This commit is contained in:
parent
12d9787d0e
commit
21b572d69a
1 changed files with 3 additions and 1 deletions
4
setup.py
4
setup.py
|
|
@ -887,7 +887,7 @@ def update_go_generated_files(args: Options, kitty_exe: str) -> None:
|
|||
raise SystemExit(cp.returncode)
|
||||
|
||||
|
||||
def build_kitty_tool(args: Options, launcher_dir: str, for_freeze: bool = False) -> str:
|
||||
def build_kitty_tool(args: Options, launcher_dir: str, for_freeze: bool = False, build_static: bool = False) -> str:
|
||||
sys.stdout.flush()
|
||||
sys.stderr.flush()
|
||||
go = shutil.which('go')
|
||||
|
|
@ -911,6 +911,8 @@ def build_kitty_tool(args: Options, launcher_dir: str, for_freeze: bool = False)
|
|||
print(shlex.join(c))
|
||||
e = os.environ.copy()
|
||||
e.update(env)
|
||||
if build_static:
|
||||
e['CGO_ENABLED'] = '0'
|
||||
cp = subprocess.run(c, env=e)
|
||||
if cp.returncode != 0:
|
||||
raise SystemExit(cp.returncode)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue