[gegl] Use python to get envvar instead of trying to concat with bash
- From: Øyvind "pippin" Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] Use python to get envvar instead of trying to concat with bash
- Date: Tue, 18 Feb 2020 20:27:43 +0000 (UTC)
commit 2cde4679b9e84de71e277637a10f9289f7093a68
Author: Félix Piédallu <felix piedallu me>
Date: Tue Feb 18 13:25:11 2020 +0100
Use python to get envvar instead of trying to concat with bash
bin/lua/meson.build | 2 +-
tests/python/meson.build | 17 +++++++++++------
2 files changed, 12 insertions(+), 7 deletions(-)
---
diff --git a/bin/lua/meson.build b/bin/lua/meson.build
index 61ffcd710..8f067f1cb 100644
--- a/bin/lua/meson.build
+++ b/bin/lua/meson.build
@@ -28,6 +28,6 @@ lua_files = files(
if lua.found()
install_data(
lua_files,
- install_dir: get_option('datadir') / api_name / 'lua'
+ install_dir: get_option('datadir') / api_name / 'lua'
)
endif
diff --git a/tests/python/meson.build b/tests/python/meson.build
index bd1451118..1bb69ead3 100644
--- a/tests/python/meson.build
+++ b/tests/python/meson.build
@@ -7,18 +7,23 @@ testnames = [
'gegl',
]
+ld_library_path = run_command(python, '-c',
+ '''import os; print(os.environ['LD_LIBRARY_PATH'])'''
+).stdout().strip()
+gi_typelib_path = run_command(python, '-c',
+ '''import os; print(os.environ['GI_TYPELIB_PATH'])'''
+).stdout().strip()
+
if python.found() and pygobject_found
foreach testname : testnames
testfile = 'test-' + testname + '.py'
test(testname,
- bash,
- args: [
- '-c',
- 'LD_LIBRARY_PATH='+ meson.build_root() / 'gegl' + ':$LD_LIBRARY_PATH',
- 'GI_TYPELIB_PATH='+ meson.build_root() / 'gegl' + ':$GI_TYPELIB_PATH',
+ find_program(testfile),
+ env: [
+ 'LD_LIBRARY_PATH='+ meson.build_root() / 'gegl' + ':' + ld_library_path,
+ 'GI_TYPELIB_PATH='+ meson.build_root() / 'gegl' + ':' + gi_typelib_path,
'GEGL_PATH=' + meson.build_root() / 'operations',
'GEGL_SWAP=RAM',
- python.path(), files(testfile),
],
suite: 'python',
is_parallel: false,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]