[Python-bugs-list] [ python-Bugs-417796 ] illegal version 1.0.2pre

noreply@sourceforge.net noreply@sourceforge.net
Sat, 21 Apr 2001 07:15:38 -0700


Bugs item #417796, was updated on 2001-04-20 21:24
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=417796&group_id=5470

Category: Distutils
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Garth T Kidd (gtk)
>Assigned to: Thomas Heller (theller)
Summary: illegal version 1.0.2pre

Initial Comment:
Description: 

The version in distutils/__init__ doesn't conform to 
the strict versioning guidelines in distutils/version, 
resulting in failure when trying to use distutils to 
install 4Suite (and perhaps other modules). 

Workaround: 

Hand-edit distutils/__init__.py to remove "pre". 

Pointers to vital stuff in code: 

Lib/distutils/__init__.py: 
__version__ = "1.0.2pre"

Lib/distutils/version.py:
A version number consists of two or three dot-
separated numeric components, with an optional "pre-
release" tag on the end. The pre-release tag consists 
of the letter 'a' or 'b' followed by a number.  

Demonstration of problem: 

Python 2.1 (#1, Apr 18 2001, 10:49:25)
[GCC 2.95.2 19991024 (release)] on sunos5
Type "copyright", "credits" or "license" for more 
information.
>>> import distutils
>>> import distutils.version
>>> v = distutils.version.StrictVersion
(distutils.__version__)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  
File "/usr/local/lib/python2.1/distutils/version.py", 
line 42, in __init__
    self.parse(vstring)
  
File "/usr/local/lib/python2.1/distutils/version.py", 
line 109, in parse
    raise ValueError, "invalid version number '%s'" % 
vstring
ValueError: invalid version number '1.0.2pre'
>>>




----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=417796&group_id=5470