diff options
author | Stefan Behnel <scoder@users.berlios.de> | 2011-08-25 08:42:35 +0200 |
---|---|---|
committer | Stefan Behnel <scoder@users.berlios.de> | 2011-08-25 08:42:35 +0200 |
commit | 3bb491696d64c6d25b13e857e49c187266bdbc0d (patch) | |
tree | 10c7b96beb22a0172e9dac71dedc7f27d7809710 /buildlibxml.py | |
parent | 486113ca8aed244ad5468f0e0da932ffcc243e66 (diff) | |
download | python-lxml-3bb491696d64c6d25b13e857e49c187266bdbc0d.tar.gz |
fix library version handling in buildlibxml.py
Diffstat (limited to 'buildlibxml.py')
-rw-r--r-- | buildlibxml.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/buildlibxml.py b/buildlibxml.py index acef12f3..1e43bf96 100644 --- a/buildlibxml.py +++ b/buildlibxml.py @@ -143,14 +143,15 @@ def download_library(dest_dir, location, name, version_re, filename, if fn.startswith(name+'-'): match = match_libfile_version(fn) if match: - version = tuple(map(tryint, match.group(1).split('.'))) - if version > latest: - latest = version + version_tuple = tuple(map(tryint, match.group(1).split('.'))) + if version_tuple > latest: + latest = version_tuple filename = fn - break - else: + version = None + if latest == (0,0,0): raise - filename = filename % version + if version: + filename = filename % version full_url = urljoin(location, filename) dest_filename = os.path.join(dest_dir, filename) if os.path.exists(dest_filename): |