Merge pull request #23704 from ibrahn/fix-py3-x11detect

Fix gcc version check when running scons in python 3.
This commit is contained in:
Rémi Verschelde 2018-11-14 13:37:37 +01:00 committed by GitHub
commit 79c2608922
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,7 @@
import os
import platform
import sys
from compat import decode_utf8
def is_active():
@ -154,6 +155,7 @@ def configure(env):
import subprocess
proc = subprocess.Popen([env['CXX'], '--version'], stdout=subprocess.PIPE)
(stdout, _) = proc.communicate()
stdout = decode_utf8(stdout)
match = re.search('[0-9][0-9.]*', stdout)
if match is not None:
version = match.group().split('.')