From 7cf78902dc63ec0db1f2310aa0e32d884ca96491 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 9 Apr 2012 20:05:06 +0200 Subject: wafsamba: Parse Python versions as integers separated by dots. This causes tdb "1.2.10" to no longer be considered older than "1.2.9". Autobuild-User: Jelmer Vernooij Autobuild-Date: Mon Apr 9 23:16:17 CEST 2012 on sn-devel-104 --- buildtools/wafsamba/samba_bundled.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'buildtools/wafsamba/samba_bundled.py') diff --git a/buildtools/wafsamba/samba_bundled.py b/buildtools/wafsamba/samba_bundled.py index 7fc0fb97ef..6df7454264 100644 --- a/buildtools/wafsamba/samba_bundled.py +++ b/buildtools/wafsamba/samba_bundled.py @@ -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) -- cgit