Commits

gu...@infinidat.com  committed a8d1b10

fix for version parsing

  • Participants
  • Parent commits aff44fc

Comments (0)

Files changed (1)

File pkg_resources.py

 def _parse_version_parts(s):
     for part in component_re.split(s):
         part = replace(part,part)
-        if not part or part=='.':
+        if part in ['', '.']:
             continue
         if part[:1] in '0123456789':
             yield part.zfill(8)    # pad for numeric comparison
     parts = []
     for part in _parse_version_parts(s.lower()):
         if part.startswith('*'):
-            if part<'*final':   # remove '-' before a prerelease tag
-                while parts and parts[-1]=='*final-': parts.pop()
             # remove trailing zeros from each series of numeric parts
             while parts and parts[-1]=='00000000':
                 parts.pop()