aboutsummaryrefslogtreecommitdiff
path: root/environment.py
diff options
context:
space:
mode:
Diffstat (limited to 'environment.py')
-rwxr-xr-xenvironment.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/environment.py b/environment.py
index 45d0266..01c80e9 100755
--- a/environment.py
+++ b/environment.py
@@ -23,7 +23,7 @@ class EnvironmentException(Exception):
def detect_c_compiler(execmd):
exelist = execmd.split()
p = subprocess.Popen(exelist + ['--version'], stdout=subprocess.PIPE)
- (out, err) = p.communicate()
+ out = p.communicate()[0]
out = out.decode()
if (out.startswith('cc ') or out.startswith('gcc')) and \
'Free Software Foundation' in out:
@@ -165,20 +165,20 @@ class PkgConfigDependency():
p = subprocess.Popen(['pkg-config', '--modversion', name], stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
- (out, err) = p.communicate()
+ out = p.communicate()[0]
if p.returncode != 0:
raise RuntimeError('Dependency %s not known to pkg-config.' % name)
self.modversion = out.decode().strip()
p = subprocess.Popen(['pkg-config', '--cflags', name], stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
- (out, err) = p.communicate()
+ out = p.communicate()[0]
if p.returncode != 0:
raise RuntimeError('Could not generate cflags for %s.' % name)
self.cflags = out.decode().split()
p = subprocess.Popen(['pkg-config', '--libs', name], stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
- (out, err) = p.communicate()
+ out = p.communicate()[0]
if p.returncode != 0:
raise RuntimeError('Could not generate libs for %s.' % name)
self.libs = out.decode().split()
@@ -195,7 +195,7 @@ class PkgConfigDependency():
def check_pkgconfig(self):
p = subprocess.Popen(['pkg-config', '--version'], stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
- (out, err) = p.communicate()
+ out = p.communicate()[0]
if p.returncode != 0:
raise RuntimeError('Pkg-config executable not found.')
print('Found pkg-config version %s.' % out.decode().strip())