[pygobject: 2/8] dsextras.py: use distutils.spawn.find_executable for have_pkgconfig()
- From: Dieter Verfaillie <dieterv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject: 2/8] dsextras.py: use distutils.spawn.find_executable for have_pkgconfig()
- Date: Fri, 21 Jan 2011 08:35:45 +0000 (UTC)
commit 637c2c287cfb0e89365026531c651111f5593ac7
Author: Dieter Verfaillie <dieterv optionexplicit be>
Date: Tue Dec 14 12:24:41 2010 +0100
dsextras.py: use distutils.spawn.find_executable for have_pkgconfig()
dsextras.py | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/dsextras.py b/dsextras.py
index c5baf6f..7c5ec2b 100644
--- a/dsextras.py
+++ b/dsextras.py
@@ -15,6 +15,7 @@ from distutils.command.build_ext import build_ext
from distutils.command.install_lib import install_lib
from distutils.command.install_data import install_data
from distutils.extension import Extension
+from distutils.spawn import find_executable
try:
import codegen.createdefs
@@ -78,13 +79,8 @@ def getstatusoutput(cmd):
def have_pkgconfig():
'''Checks for the existence of pkg-config'''
- if (sys.platform == 'win32' and
- os.system('pkg-config --version > NUL') == 0):
-
+ if find_executable('pkg-config'):
return True
- else:
- if getstatusoutput('pkg-config')[0] == 256:
- return True
def list_files(dir):
'''List all files in a dir, with filename match support:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]