Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e2ad364

Browse filesBrowse files
bnoordhuisBridgeAR
authored andcommitted
build: don't swallow pkg-config warnings
PR-URL: #28118 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Refael Ackermann (רפאל פלחי) <refack@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 6aa6451 commit e2ad364
Copy full SHA for e2ad364

File tree

Expand file treeCollapse file tree

1 file changed

+5
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-3
lines changed
Open diff view settings
Collapse file

‎configure.py‎

Copy file name to clipboardExpand all lines: configure.py
+5-3Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -628,18 +628,20 @@ def pkg_config(pkg):
628628
Returns ("-l flags", "-I flags", "-L flags", "version")
629629
otherwise (None, None, None, None)"""
630630
pkg_config = os.environ.get('PKG_CONFIG', 'pkg-config')
631+
args = [] # Print pkg-config warnings on first round.
631632
retval = ()
632633
for flag in ['--libs-only-l', '--cflags-only-I',
633634
'--libs-only-L', '--modversion']:
635+
args += [flag, pkg]
634636
try:
635-
proc = subprocess.Popen(
636-
shlex.split(pkg_config) + ['--silence-errors', flag, pkg],
637-
stdout=subprocess.PIPE)
637+
proc = subprocess.Popen(shlex.split(pkg_config) + args,
638+
stdout=subprocess.PIPE)
638639
val = proc.communicate()[0].strip()
639640
except OSError as e:
640641
if e.errno != errno.ENOENT: raise e # Unexpected error.
641642
return (None, None, None, None) # No pkg-config/pkgconf installed.
642643
retval += (val,)
644+
args = ['--silence-errors']
643645
return retval
644646

645647

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.