[Distutils] PEP 386 status - last round here ?

Piotr Ozarowski ozarow at gmail.com
Fri Nov 27 14:00:57 CET 2009


[Tarek Ziadé, 2009-11-27]
> On Fri, Nov 27, 2009 at 1:24 PM, Tarek Ziadé <ziade.tarek at gmail.com> wrote:
> [..]
> >> don't worry about Debian, we'll simply replace "-" with "~" (we use "~"
> >> and "+" right now[0]). I'm not sure about rpm, but I bet it has
> >> something similar and it will be much easier for us to simply handle two
> >> characters instead of recognizing that dev1 < a1 < b1 < c1 == rc1 ...
> >
> > It's different from RPMs, since they use a strcmp(), segment  by segment,
> > so I think they have to extract the dev/post suffixes and to put them in front
> > as an epoch marker maybe ? (ccing Toshio)

We use that as well. Epoch cannot be used here, though (IMO). Unless you're
talking about segment's epoch, not the whole version one, but then, "-"
and "+" will be still much easier for rpm. Let's wait for Toshio's
reply...

> That makes me think that a nice add-on to the lib and the PEP would be
> to provide APIs
> to translate a Python PEP 386 version to a Debian/Ubuntu or RPM ones -
> and any major
> packaging system out there. (whatever scheme we pick)

that would be nice, but we still have to implement it on our side, f.e. in
tools like uscan (or in its configuration files: debian/watch). uscan
scans upstream repositories (like PyPi) for new tarballs, then uses
regular expressions to change the versions, compares them and
downloads/renames/notifies maintainer. My point is: it's easier to
feed uscan with s/-/~/g instead of s/rc/~rc/;s/\<c/~rc/g;s/\<a/~a/g;...
but it's not a very big problem - we handle much uglier upstream version
shemas ;-). If all pypi packages would use the same rules, it would
allow us to handle it in uscan instead of in per package basis
(debian/watch files), though.
-- 
Piotr Ożarowski                         Debian GNU/Linux Developer
www.ozarowski.pl          www.griffith.cc           www.debian.org
GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645


More information about the Distutils-SIG mailing list