[Distutils] Review of latest draft of PEP 426 (Python package etadata v1.3)

Vinay Sajip vinay_sajip at yahoo.co.uk
Tue Jan 29 16:19:52 CET 2013


Paul Moore <p.f.moore <at> gmail.com> writes:

> (Warning - bikeshed discussion. I won't prolong the debate beyond this
> one comment. I'm happy for Nick to simply pronounce on this). I'm not
> sure I like having "setuptools" as a name mandated in a PEP (just
> because it's a 3rd party package). Does the distutils LooseVersion
> class not give the same sort results? If it does, I would not want to

Hence my suggestion of "legacy". The setuptools method is different from
LooseVersion - for example, it normalises things so that e.g. X.Y.0 will be
equivalent to X.Y for sorting (and comparison) purposes.

>>> import distutils.version
>>> v1 = distutils.version.LooseVersion('1.0')
>>> v2 = distutils.version.LooseVersion('1.0.0')
>>> v1 == v2
False
>>> v1 < v2
True

Regards,

Vinay Sajip



More information about the Distutils-SIG mailing list