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

"Martin v. Löwis" martin at v.loewis.de
Sun Jul 30 15:42:58 CEST 2006


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.

How would you do this? Distutils is not released stand-alone anymore, 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.

Regards,
Martin


More information about the Python-checkins mailing list