Scons: Update compare_versions() to ignore trailing charecters after an int. This is a fix for a mysql version number that includes a (E.g. 5.0.51a)

This commit is contained in:
Ali Saidi 2008-10-08 18:34:19 -04:00
parent fef5a4f49c
commit 9affd7adc6

View file

@ -91,7 +91,7 @@ def compare_versions(v1, v2):
if isinstance(v, (list,tuple)):
return v
elif isinstance(v, str):
return map(int, v.split('.'))
return map(lambda x: int(re.match('\d+', x).group()), v.split('.'))
else:
raise TypeError