diff options
author | PJ Eby <distutils-sig@python.org> | 2005-12-06 17:41:36 +0000 |
---|---|---|
committer | PJ Eby <distutils-sig@python.org> | 2005-12-06 17:41:36 +0000 |
commit | bd28408ff49d304ae822acf9f46f0b65bb138c04 (patch) | |
tree | 75cecab952c652149b44f488724f06b23a912917 /pkg_resources.py | |
parent | 45885095198f5ec1d7e80791a73c7385f2620b38 (diff) | |
download | external_python_setuptools-bd28408ff49d304ae822acf9f46f0b65bb138c04.tar.gz external_python_setuptools-bd28408ff49d304ae822acf9f46f0b65bb138c04.tar.bz2 external_python_setuptools-bd28408ff49d304ae822acf9f46f0b65bb138c04.zip |
Changed ``parse_version()`` to remove dashes before pre-release tags, so
that ``0.2-rc1`` is considered an *older* version than ``0.2``, and is equal
to ``0.2rc1``. The idea that a dash *always* meant a post-release version
was highly non-intuitive to setuptools users and Python developers, who
seem to want to use ``-rc`` version numbers a lot.
--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041630
Diffstat (limited to 'pkg_resources.py')
-rw-r--r-- | pkg_resources.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg_resources.py b/pkg_resources.py index 37995cd0..ba4cf861 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1589,14 +1589,14 @@ def parse_version(s): 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() parts.append(part) return tuple(parts) - - class EntryPoint(object): """Object representing an advertised importable object""" |