--- a/SConstruct 2012-08-20 10:26:51.484835418 +0200 +++ b/SConstruct 2012-08-20 10:27:49.855374497 +0200 @@ -765,11 +765,16 @@ binaries = ['python', 'python2.5', 'python2.6', 'python2.7', 'python25', 'python26', 'python27'] for binary in binaries: try: - # py-2.4 compatible replacement for shell backticks - output = subprocess.Popen([binary, '--version'], stdout=subprocess.PIPE).communicate()[0] - match = version.search(output) - if match and float(match.group(1)) >= 2.5: - return binary + for path in smokeEnv['ENV']['PATH'].split(':'): + if os.path.isfile( '%s/%s' % (path, binary) ): + # py-2.4 compatible replacement for shell backticks + out, err = subprocess.Popen([binary, '-V'], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() + for stream in (out, err): + match = version.search(stream) + if match: + versiontuple = tuple(map(int, match.group(1).split('.'))) + if versiontuple >= (2, 5): + return binary except: pass