[Python-checkins] r50978 - in python/trunk: Lib/distutils/__init__.py Misc/NEWS

M.-A. Lemburg mal at egenix.com
Sun Jul 30 18:03:22 CEST 2006


Martin v. Löwis wrote:
> Nick Coghlan schrieb:
>>> -__version__ = "2.5.0"
>>> +import sys
>>> +__version__ = "%d.%d.%d" % sys.version_info[:3]
>>> +del sys
>> Won't this give a wrong answer if someone runs a mismatched distutils version? 
>> e.g. distutils 2.5.0 would claim to be distutils 2.4.3 if you ran it with the 
>> latest 2.4 release.

I agree with Nick. The patch isn't all that helpful.

> How would you do this? Distutils is not released stand-alone anymore,

Maybe not publically, but it's certainly possible to use a distutils
package from SVN with Python 2.3 (and eGenix for example uses this
approach in order to minimize the number of versions of distutils
we have to support).

> so
> you explicitly need to fiddle with your Python installation. If you do
> this, you also have to update the distutils version, or it will give
> you the wrong version. You might have to do more backporting to use
> distutils, anyway, since it might not work at all with a previous Python
> version.

setup.py files do have to check for the version of the distutils
package they are used with and if distutil's version is simply a
copy of sys.version the __version__ attribute is pretty much
useless.

I would much rather see distutils use its own version number
again - not all Python releases do contain major changes
in distutils.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Jul 30 2006)
>>> Python/Zope Consulting and Support ...        http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::


More information about the Python-checkins mailing list