[Python-ideas] bdist naming scheme (compatibility tags) PEP
p.f.moore at gmail.com
Wed Sep 26 16:45:22 CEST 2012
On 9 September 2012 13:16, Nick Coghlan <ncoghlan at gmail.com> wrote:
> Yep, those rules look sensible to me (and thanks for clarifying the
> intended semantics of the "py2" and "py3" version markers)
One (relatively minor) point: the Python tag isn't easily parseable.
To split the implementation and version bits, you can do tag[:2],
tag[2;} except for "Other Python implementations should use
sys.implementation.name". Or you could use tag[:-2], tag[-2:] except
for "py2". So you need to use a regex match to split off the trailing
digits, which is a bit excessive.
My current approach is the [:2], [2:] one, calling YAGNI on
implementations not covered by the 2-letter codes...
More information about the Python-ideas