From 9f0e75bb409e07f27f4f75663572c2139a860f20 Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Wed, 3 Jun 2020 17:28:41 +0100 Subject: Also adjust PATH in gtkdochelper for Cygwin Also do Windows loader specific PATH adjustment (to emulate rpath) in gtkdochelper for Cygwin. --- mesonbuild/scripts/gtkdochelper.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'mesonbuild/scripts/gtkdochelper.py') diff --git a/mesonbuild/scripts/gtkdochelper.py b/mesonbuild/scripts/gtkdochelper.py index 6b174a6..812604a 100644 --- a/mesonbuild/scripts/gtkdochelper.py +++ b/mesonbuild/scripts/gtkdochelper.py @@ -16,7 +16,7 @@ import sys, os import subprocess import shutil import argparse -from ..mesonlib import MesonException, Popen_safe, is_windows, split_args +from ..mesonlib import MesonException, Popen_safe, is_windows, is_cygwin, split_args from . import destdir_join parser = argparse.ArgumentParser() @@ -55,16 +55,18 @@ def gtkdoc_run_check(cmd, cwd, library_paths=None): library_paths = [] env = dict(os.environ) - if is_windows(): + if is_windows() or is_cygwin(): if 'PATH' in env: library_paths.extend(env['PATH'].split(os.pathsep)) env['PATH'] = os.pathsep.join(library_paths) - cmd.insert(0, sys.executable) else: if 'LD_LIBRARY_PATH' in env: library_paths.extend(env['LD_LIBRARY_PATH'].split(os.pathsep)) env['LD_LIBRARY_PATH'] = os.pathsep.join(library_paths) + if is_windows(): + cmd.insert(0, sys.executable) + # Put stderr into stdout since we want to print it out anyway. # This preserves the order of messages. p, out = Popen_safe(cmd, cwd=cwd, env=env, stderr=subprocess.STDOUT)[0:2] -- cgit v1.1