wafsamba: Parse Python versions as integers separated by dots.
authorJelmer Vernooij <jelmer@samba.org>
Mon, 9 Apr 2012 18:05:06 +0000 (20:05 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Mon, 9 Apr 2012 21:16:17 +0000 (23:16 +0200)
This causes tdb "1.2.10" to no longer be considered older than "1.2.9".

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Mon Apr  9 23:16:17 CEST 2012 on sn-devel-104

buildtools/wafsamba/samba_bundled.py

index 7fc0fb97efd985a9402e52a274f7472e16c301bb..6df74542644fe9c2a16089745b9811a5be28c7da 100644 (file)
@@ -209,6 +209,9 @@ def CHECK_BUNDLED_SYSTEM(conf, libname, minversion='0.0.0',
     return False
 
 
+def tuplize_version(version_string):
+    return tuple([int(x) for x in version.split(".")])
+
 @runonce
 @conf
 def CHECK_BUNDLED_SYSTEM_PYTHON(conf, libname, modulename, minversion='0.0.0'):
@@ -233,7 +236,7 @@ def CHECK_BUNDLED_SYSTEM_PYTHON(conf, libname, modulename, minversion='0.0.0'):
         except AttributeError:
             found = False
         else:
-            found = tuple(version.split(".")) >= tuple(minversion.split("."))
+            found = tuplize_version(version) >= tuplize_version(minversion)
     if not found and not conf.LIB_MAY_BE_BUNDLED(libname):
         Logs.error('ERROR: Python module %s of version %s not found, and bundling disabled' % (libname, minversion))
         sys.exit(1)