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

Side by Side Diff: build/linux/pkg_config_wrapper.py

Issue 42340: Update the gyp Linux build: (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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 | « build/common.gypi ('k') | build/linux/system.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:mergeinfo
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 #!/bin/env python
2 # Copyright (c) 2009 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 __doc__ = """
7 Wrapper script for executing pkg-config with the arguments supplied
8 on the command line and suppressing the exit status and error output
9 when the error is simply that the specified package isn't installed.
10 """
11
12 import sys
13 import subprocess
14
15 p = subprocess.Popen(['pkg-config'] + sys.argv[1:],
16 stderr=subprocess.PIPE)
17 (stdout, stderr) = p.communicate()
18
19 exit_status = p.wait()
20
21 if exit_status == 1:
22 import re
23 if re.search('No package.*found', stderr):
24 # Exit status of 1 with a presumably "normal" not found message.
25 # Just swallow the "error."
26 sys.exit(0)
27
28 sys.stderr.write(stderr)
29
30 sys.exit(exit_status)
OLDNEW
« no previous file with comments | « build/common.gypi ('k') | build/linux/system.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698