[gobject-introspection/gnome-3-30] meson: add back /usr/bin/env to the python-cmd. Fixes #237
- From: Christoph Reiter <creiter src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection/gnome-3-30] meson: add back /usr/bin/env to the python-cmd. Fixes #237
- Date: Mon, 5 Nov 2018 20:01:43 +0000 (UTC)
commit b4458bb5981b703f7d41277958314e2fb09a295d
Author: Havard Graff <havard pexip com>
Date: Thu Oct 18 15:54:24 2018 +0200
meson: add back /usr/bin/env to the python-cmd. Fixes #237
From nirbheek:
"The shebang parsing goes like this: everything before the first space is
the interpreter, everything after that is a single argument to that
interpreter. So in meson, if the interpreter in the shebang is `env`,
we ignore it and slurp the rest as the actual interpreter and parse it
with shell syntax to handle spaces correctly.
IIRC the py.exe python launcher on windows also knows that it should
ignore /usr/bin/env and look at the rest to find the actual interpreter
you want to use."
tools/meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/tools/meson.build b/tools/meson.build
index 912eb6ba..1552dc6c 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -10,7 +10,7 @@ if get_option('doctool')
endif
if cc.get_id() == 'msvc'
- python_cmd = python.get_variable('prefix') + '\\python.exe'
+ python_cmd = '/usr/bin/env ' + python.get_variable('prefix') + '\\python.exe'
else
python_cmd = '/usr/bin/env python@0@'.format(python.language_version().split('.')[0])
endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]