From 60134ddcbadfb6af9737c5fa303f10d13f34344c Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 5 Dec 2013 14:43:32 -0500 Subject: [PATCH] remove unnecessary and *nix-centric LANG= from start of command used to get gcc version; use python's platform.uname() rather than os.uname() to get platform information --- wscript | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wscript b/wscript index 6fe36608d6..d6410848f2 100644 --- a/wscript +++ b/wscript @@ -6,6 +6,7 @@ import re import string import subprocess import sys +import platform as PLATFORM def fetch_git_revision (): cmd = "git describe HEAD" @@ -85,7 +86,7 @@ i18n_children = [ # Version stuff def fetch_gcc_version (CC): - cmd = "LANG= %s --version" % CC + cmd = "%s --version" % CC output = subprocess.Popen(cmd, shell=True, stderr=subprocess.STDOUT, stdout=subprocess.PIPE).communicate()[0].splitlines() o = output[0].decode('utf-8') version = o.split(' ')[2].split('.') @@ -127,7 +128,7 @@ def set_compiler_flags (conf,opt): optimization_flags = [] debug_flags = [] - u = os.uname () + u = PLATFORM.uname () cpu = u[4] platform = u[0].lower() version = u[2]