From 204df00c7a079edcd27c46a05834a98cd06ec0bd Mon Sep 17 00:00:00 2001 From: James Booth Date: Fri, 26 Jun 2015 11:07:52 +0100 Subject: [PATCH] fix condaci purging for PEP440 --- condaci.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/condaci.py b/condaci.py index bbcd230..411c216 100755 --- a/condaci.py +++ b/condaci.py @@ -272,8 +272,8 @@ def all_info(self): name_from_filename = lambda fn: fn.split('-')[0] version_from_filename = lambda fn: fn.split('-')[1] platform_from_filepath = lambda fp: p.split(p.split(fp)[0])[-1] -version_is_tag = lambda v: '_' not in v - +version_is_tag = lambda v: '+' not in v +same_version_different_build = lambda v1, v2: v2.startswith(v1.split('+')[0]) def channels_for_user(b, user): return b.list_channels(user).keys() @@ -308,7 +308,8 @@ def files_to_remove(b, user, channel, filepath): f.configuration == configuration and f.platform == platform_ and f.version != version and - not version_is_tag(f.version)] + not version_is_tag(f.version) and + same_version_different_build(version, f.version)] def purge_old_files(b, user, channel, filepath):