diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2017-04-08 21:25:25 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-08 21:25:25 +0300 |
commit | 761b28371a52ddb34457e15a801fd26b68e30381 (patch) | |
tree | 3ac51b036bdb953e39acb19a2f8e4371e3074ad6 /mesonbuild/scripts/commandrunner.py | |
parent | 664c2c909b35e8c37becf7bdfc948bf365a38e80 (diff) | |
parent | 27f5f0a9633b310f537f09ba0fdd79d86fcb962a (diff) | |
download | meson-761b28371a52ddb34457e15a801fd26b68e30381.zip meson-761b28371a52ddb34457e15a801fd26b68e30381.tar.gz meson-761b28371a52ddb34457e15a801fd26b68e30381.tar.bz2 |
Merge pull request #1518 from centricular/mesonintrospect-evar
Export MESONINTROSPECT to postconf/install/run_command scripts
Diffstat (limited to 'mesonbuild/scripts/commandrunner.py')
-rw-r--r-- | mesonbuild/scripts/commandrunner.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/mesonbuild/scripts/commandrunner.py b/mesonbuild/scripts/commandrunner.py index cf2770d..87e3b8b 100644 --- a/mesonbuild/scripts/commandrunner.py +++ b/mesonbuild/scripts/commandrunner.py @@ -17,11 +17,11 @@ what to run, sets up the environment and executes the command.""" import sys, os, subprocess, shutil -def run_command(source_dir, build_dir, subdir, command, arguments): +def run_command(source_dir, build_dir, subdir, mesonintrospect, command, arguments): env = {'MESON_SOURCE_ROOT': source_dir, 'MESON_BUILD_ROOT': build_dir, 'MESON_SUBDIR': subdir, - } + 'MESONINTROSPECT': mesonintrospect} cwd = os.path.join(source_dir, subdir) child_env = os.environ.copy() child_env.update(env) @@ -47,9 +47,10 @@ def run(args): src_dir = args[0] build_dir = args[1] subdir = args[2] - command = args[3] - arguments = args[4:] - pc = run_command(src_dir, build_dir, subdir, command, arguments) + mesonintrospect = args[3] + command = args[4] + arguments = args[5:] + pc = run_command(src_dir, build_dir, subdir, mesonintrospect, command, arguments) pc.wait() return pc.returncode |