diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-11-29 08:45:56 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2018-03-10 19:05:19 +0530 |
commit | 97904f7a1c0779828067c2e223083ef1482d3511 (patch) | |
tree | 0c8a351d930e50062501cfcc9430533e17476558 /tools | |
parent | 7c98ef9c86f5b04eb753cca9bbe60e5cfd7c0cc8 (diff) | |
download | gobject-introspection-97904f7a1c0779828067c2e223083ef1482d3511.tar.gz |
meson: Handle spaces in the full python path
If there is a space in the path to python, we cannot use it in the
shebang since there is no way to quote spaces. Use the basename
instead since we pass it to /usr/bin/env anyway.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/meson.build | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/meson.build b/tools/meson.build index e32937bf..1b4c6e97 100644 --- a/tools/meson.build +++ b/tools/meson.build @@ -1,6 +1,11 @@ libdir_abs = join_paths(get_option('prefix'), get_option('libdir')) datadir_abs = join_paths(get_option('prefix'), get_option('datadir')) python_path = python3.path() +# If there is a space in the path to python, we cannot use it in the shebang +# since there is no way to quote spaces. Use the basename instead. +if python_path.contains(' ') + python_path = python_path.split('/')[-1] +endif tools = [ ['g-ir-scanner', 'scannermain', 'scanner_main'], |