gcc.py (scons-4.2.0) | : | gcc.py (SCons-4.3.0) | ||
---|---|---|---|---|
skipping to change at line 88 | skipping to change at line 88 | |||
if pipe.wait() != 0: | if pipe.wait() != 0: | |||
return version | return version | |||
with pipe.stdout: | with pipe.stdout: | |||
# -dumpversion variant: | # -dumpversion variant: | |||
# line = pipe.stdout.read().strip() | # line = pipe.stdout.read().strip() | |||
# --version variant: | # --version variant: | |||
line = SCons.Util.to_str(pipe.stdout.readline()) | line = SCons.Util.to_str(pipe.stdout.readline()) | |||
# Non-GNU compiler's output (like AIX xlc's) may exceed the stdout buffe r: | # Non-GNU compiler's output (like AIX xlc's) may exceed the stdout buffe r: | |||
# So continue with reading to let the child process actually terminate. | # So continue with reading to let the child process actually terminate. | |||
while SCons.Util.to_str(pipe.stdout.readline()): | # We don't need to know the rest of the data, so don't bother decoding. | |||
while pipe.stdout.readline(): | ||||
pass | pass | |||
# -dumpversion variant: | # -dumpversion variant: | |||
# if line: | # if line: | |||
# version = line | # version = line | |||
# --version variant: | # --version variant: | |||
match = re.search(r'[0-9]+(\.[0-9]+)+', line) | match = re.search(r'[0-9]+(\.[0-9]+)+', line) | |||
if match: | if match: | |||
version = match.group(0) | version = match.group(0) | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 2 lines changed or added |