diff options
author | bradnelson@google.com <bradnelson@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-23 02:00:06 +0000 |
---|---|---|
committer | bradnelson@google.com <bradnelson@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-23 02:00:06 +0000 |
commit | 8f0a63257098458cb6e603bfc506541d669f9512 (patch) | |
tree | ef3dc22c064e2cc6c354c20d2925c0054a6d6223 /build/gyp_chromium | |
parent | 7ca4c2dbb99fb595ef72c66e5435895019bda7e2 (diff) | |
download | chromium_src-8f0a63257098458cb6e603bfc506541d669f9512.zip chromium_src-8f0a63257098458cb6e603bfc506541d669f9512.tar.gz chromium_src-8f0a63257098458cb6e603bfc506541d669f9512.tar.bz2 |
Causing gyp_chromium to fall back on win32 hermetic python if it is
ever run with cygwin python.
BUG=http://code.google.com/p/gyp/issues/detail?id=178
TEST=None
Review URL: http://codereview.chromium.org/6538104
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75695 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/gyp_chromium')
-rwxr-xr-x | build/gyp_chromium | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/build/gyp_chromium b/build/gyp_chromium index 2171770..7709d07 100755 --- a/build/gyp_chromium +++ b/build/gyp_chromium @@ -10,6 +10,7 @@ import glob import os import shlex +import subprocess import sys script_dir = os.path.dirname(__file__) @@ -78,6 +79,19 @@ def additional_include_files(args=[]): if __name__ == '__main__': args = sys.argv[1:] + # Fall back on hermetic python if we happen to get run under cygwin. + # TODO(bradnelson): take this out once this issue is fixed: + # http://code.google.com/p/gyp/issues/detail?id=177 + if sys.platform == 'cygwin': + python_dir = os.path.join(chrome_src, 'third_party', 'python_26') + env = os.environ.copy() + env['PATH'] = python_dir + os.pathsep + env.get('PATH', '') + p = subprocess.Popen( + [os.path.join(python_dir, 'python.exe')] + sys.argv, + env=env, shell=False) + p.communicate() + sys.exit(p.returncode) + if 'SKIP_CHROMIUM_GYP_ENV' not in os.environ: # Update the environment based on chromium.gyp_env gyp_env_path = os.path.join(os.path.dirname(chrome_src), 'chromium.gyp_env') |