Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Side by Side Diff: pylib/gyp/xcode_emulation.py

Issue 14163004: xcode_emulation: Do not redirect stderr when calling xcodebuild. (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 Google Inc. All rights reserved. 1 # Copyright (c) 2012 Google Inc. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """ 5 """
6 This module contains classes that help to emulate xcodebuild behavior on top of 6 This module contains classes that help to emulate xcodebuild behavior on top of
7 other build systems, such as make and ninja. 7 other build systems, such as make and ninja.
8 """ 8 """
9 9
10 import gyp.common 10 import gyp.common
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 def GetExecutablePath(self): 217 def GetExecutablePath(self):
218 """Returns the directory name of the bundle represented by this target. E.g. 218 """Returns the directory name of the bundle represented by this target. E.g.
219 Chromium.app/Contents/MacOS/Chromium.""" 219 Chromium.app/Contents/MacOS/Chromium."""
220 if self._IsBundle(): 220 if self._IsBundle():
221 return self._GetBundleBinaryPath() 221 return self._GetBundleBinaryPath()
222 else: 222 else:
223 return self._GetStandaloneBinaryPath() 223 return self._GetStandaloneBinaryPath()
224 224
225 def _GetSdkVersionInfoItem(self, sdk, infoitem): 225 def _GetSdkVersionInfoItem(self, sdk, infoitem):
226 job = subprocess.Popen(['xcodebuild', '-version', '-sdk', sdk, infoitem], 226 job = subprocess.Popen(['xcodebuild', '-version', '-sdk', sdk, infoitem],
227 stdout=subprocess.PIPE, 227 stdout=subprocess.PIPE)
228 stderr=subprocess.STDOUT)
229 out = job.communicate()[0] 228 out = job.communicate()[0]
230 if job.returncode != 0: 229 if job.returncode != 0:
231 sys.stderr.write(out + '\n') 230 sys.stderr.write(out + '\n')
232 raise GypError('Error %d running xcodebuild' % job.returncode) 231 raise GypError('Error %d running xcodebuild' % job.returncode)
233 return out.rstrip('\n') 232 return out.rstrip('\n')
234 233
235 def _SdkPath(self): 234 def _SdkPath(self):
236 sdk_root = self.GetPerTargetSetting('SDKROOT', default='macosx') 235 sdk_root = self.GetPerTargetSetting('SDKROOT', default='macosx')
237 if sdk_root.startswith('/'): 236 if sdk_root.startswith('/'):
238 return sdk_root 237 return sdk_root
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after
1076 def GetSpecPostbuildCommands(spec, quiet=False): 1075 def GetSpecPostbuildCommands(spec, quiet=False):
1077 """Returns the list of postbuilds explicitly defined on |spec|, in a form 1076 """Returns the list of postbuilds explicitly defined on |spec|, in a form
1078 executable by a shell.""" 1077 executable by a shell."""
1079 postbuilds = [] 1078 postbuilds = []
1080 for postbuild in spec.get('postbuilds', []): 1079 for postbuild in spec.get('postbuilds', []):
1081 if not quiet: 1080 if not quiet:
1082 postbuilds.append('echo POSTBUILD\\(%s\\) %s' % ( 1081 postbuilds.append('echo POSTBUILD\\(%s\\) %s' % (
1083 spec['target_name'], postbuild['postbuild_name'])) 1082 spec['target_name'], postbuild['postbuild_name']))
1084 postbuilds.append(gyp.common.EncodePOSIXShellList(postbuild['action'])) 1083 postbuilds.append(gyp.common.EncodePOSIXShellList(postbuild['action']))
1085 return postbuilds 1084 return postbuilds
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698