summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2008-08-24 22:36:08 +0000
committerColin Walters <walters@src.gnome.org>2008-08-24 22:36:08 +0000
commitad30dc17c0e05e535419d0e5c2b343ac3d79d85c (patch)
tree82fc965a50dc290bc5930172387b661c61b6097e /tools
parentad71356da2c792a3f214b40e01e8a75f5f63919c (diff)
downloadgobject-introspection-ad30dc17c0e05e535419d0e5c2b343ac3d79d85c.tar.gz
Use subprocess instead of commands, works on Windows and avoids the evil
2008-08-24 Colin Walters <walters@verbum.org> * tools/g-ir-scanner: Use subprocess instead of commands, works on Windows and avoids the evil shell on Unix. svn path=/trunk/; revision=486
Diffstat (limited to 'tools')
-rwxr-xr-xtools/g-ir-scanner9
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/g-ir-scanner b/tools/g-ir-scanner
index af245981..48c889e8 100755
--- a/tools/g-ir-scanner
+++ b/tools/g-ir-scanner
@@ -19,7 +19,7 @@
# 02110-1301, USA.
#
-import commands
+import subprocess
import optparse
import os
import sys
@@ -135,14 +135,15 @@ def main(args):
primary_library = options.libraries[0]
for package in options.packages:
- output = commands.getoutput('pkg-config --cflags %s' % (package, ))
+ output = subprocess.Popen(['pkg-config', '--cflags', package],
+ stdout=subprocess.PIPE).communicate()[0]
pkg_options, unused = parser.parse_args(output.split())
options.cpp_includes.extend(pkg_options.cpp_includes)
options.cpp_defines.extend(pkg_options.cpp_defines)
options.cpp_undefines.extend(pkg_options.cpp_undefines)
- output = commands.getoutput('pkg-config --libs-only-L %s' % (
- package, ))
+ output = subprocess.Popen(['pkg-config', '--libs-only-L', package],
+ stdout=subprocess.PIPE).communicate()[0]
pkg_options, unused = parser.parse_args(output.split())
options.library_paths.extend(pkg_options.library_paths)