More robust in bundle launcher

Ignores environment, user settings. Should minimize the chances of
conflict with any other python installations on the system.
This commit is contained in:
Kovid Goyal
2017-02-02 14:26:26 +05:30
parent 543af0dd89
commit af1f3cc7c7
2 changed files with 52 additions and 12 deletions

View File

@@ -239,9 +239,10 @@ def package(args, for_bundle=False): # {{{
os.chmod(path, 0o755 if f.endswith('.so') else 0o644)
launcher_dir = os.path.join(ddir, 'bin')
safe_makedirs(launcher_dir)
cflags = '-O3'.split()
cflags = '-O3 -Wall -Werror'.split()
if for_bundle:
cflags.append('-DFOR_BUNDLE')
cflags.append('-DPYVER="{}"'.format(sysconfig.get_python_version()))
pylib = get_python_flags(cflags)
cmd = [cc] + cflags + ['linux-launcher.c', '-o', os.path.join(launcher_dir, 'kitty')] + pylib
run_tool(cmd)