From: Ali Saidi Date: Wed, 8 Oct 2008 22:34:19 +0000 (-0400) Subject: Scons: Update compare_versions() to ignore trailing charecters after an int. This... X-Git-Tag: m5_2.0_beta6 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9affd7adc64d16a7dd4733f5b90b2dfda5b1a279;p=gem5.git 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) --- diff --git a/SConstruct b/SConstruct index f91cb35fe..260c025bd 100644 --- a/SConstruct +++ b/SConstruct @@ -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