Fix the spawn test in the bypy environment

Required the launcher to be built since the pre-built
one was being used. Fixes #2881
This commit is contained in:
Kovid Goyal
2020-07-29 15:11:35 +05:30
parent 65f6b142a5
commit 67f60847ee
3 changed files with 21 additions and 8 deletions

View File

@@ -47,6 +47,18 @@ def build_c_extensions(ext_dir, args):
shutil.copytree(
KITTY_DIR, writeable_src_dir, symlinks=True,
ignore=shutil.ignore_patterns('b', 'build', 'dist', '*_commands.json', '*.o'))
# Build the launcher as it is needed for the spawn test
try:
os.remove(os.path.join(writeable_src_dir, 'kitty', 'launcher', 'kitty'))
except FileNotFoundError:
pass
if run(PYTHON, 'setup.py', 'build-launcher', cwd=writeable_src_dir) != 0:
print('Building of kitty launcher failed', file=sys.stderr)
os.chdir(KITTY_DIR)
run_shell()
raise SystemExit('Building of kitty launcher failed')
cmd = [PYTHON, 'setup.py']
bundle = 'macos-freeze' if ismacos else 'linux-freeze'
cmd.append(bundle)