diff options
author | Richard Jones <richard@mechanicalcat.net> | 2012-10-02 09:56:41 +1000 |
---|---|---|
committer | Richard Jones <richard@mechanicalcat.net> | 2012-10-02 09:56:41 +1000 |
commit | fdae0b77bf432b9fbc2508534308e1918befb294 (patch) | |
tree | 4a57ca518d4046035e45ee3b2336e9fc5493a31a | |
parent | 1640c5091c39e733cd2893753db4d243b2b69fa9 (diff) | |
download | decorator-fdae0b77bf432b9fbc2508534308e1918befb294.tar.gz |
work around bug in verlib
-rw-r--r-- | store.py | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -480,14 +480,20 @@ class Store: # give up if we can't even do that assert norm_version is not None - norm_to_orig[norm_version] = version - current_ordering[norm_version] = ordering - versions.append(NormalizedVersion(norm_version)) + # actually objectify the version as the formal parsing and + # re-stringification has a bug we need to work around: + # >>> NormalizedVersion('0.0.2.post1') + # NormalizedVersion('0.0.2.post1.z') + s_norm_version = NormalizedVersion(norm_version) + + norm_to_orig[s_norm_version] = version + current_ordering[s_norm_version] = ordering + versions.append(norm_version) # just in case we did modify the new_version we need to update # it for later comparison if version == new_version: - new_version = norm_version + new_version = s_norm_version except Exception: # fall back on the old distutils LooseVersion versions = [] |