diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2012-04-09 20:05:06 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2012-04-09 23:16:17 +0200 |
commit | 7cf78902dc63ec0db1f2310aa0e32d884ca96491 (patch) | |
tree | c15a7f79eba55038218d2c7b8ea5bb633e5dc0ed | |
parent | 5701a4d8611ad1e310b76b00b146b0902c9b34ff (diff) | |
download | samba-7cf78902dc63ec0db1f2310aa0e32d884ca96491.tar.gz samba-7cf78902dc63ec0db1f2310aa0e32d884ca96491.tar.bz2 samba-7cf78902dc63ec0db1f2310aa0e32d884ca96491.zip |
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 <jelmer@samba.org>
Autobuild-Date: Mon Apr 9 23:16:17 CEST 2012 on sn-devel-104
-rw-r--r-- | buildtools/wafsamba/samba_bundled.py | 5 |
1 files changed, 4 insertions, 1 deletions
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) |