[Distutils] PEP440 "Local versions" idea in rpm/deb?

Nick Coghlan ncoghlan at gmail.com
Sat May 3 07:01:01 CEST 2014


On 2 May 2014 13:33, "Marcus Smith" <qwcode at gmail.com> wrote:
>
>
>
> On Fri, May 2, 2014 at 1:15 PM, Donald Stufft <donald at stufft.io> wrote:
>>
>> I’m pretty sure all the distros have some equivalent to it, often times
with similar syntax.
>
>
> e.g. look here
https://fedoraproject.org/wiki/Packaging:NamingGuidelines#Package_Versioning
> yes there's a parallel to our post-releases, namely "Post-Releases", but
I don't see a concept for local patches of rpms.
>
> to be clear to Daniel, I'm not asking how to package a "local version" of
a python package.  that's straightforward (I think) because that's all
contained in the "version" segment of the rpm.
>
> e.g., I recently created an rpm for virtualenv-1.11.4, because centos6
didn't have it yet:  python-virtualenv-1.11.4-1.el6.noarch.rpm
> what's the proper way to "localize" this to not conflict later when
1.11.4 is packaged?

Make the release portion of your custom RPM start with a 0 so it sorts
before the actual release. For example:
python-virtualenv-1.11.4-0.1.el6.noarch.rpm

(you can add additional identifying stuff as well - for Beaker QA builds,
we use "0.git.<hash>.el6" as the release field)

> again, sorry for the off-topic post, but I was *hoping* Nick (or someone)
would have the concept handy from the OS packaging world.

Yep, the distro release field is basically where "local version" comes
from. It's there so distros (and other redistributors) can eventually start
advertising the existence of distro specific patches in their Python
metadata without confusing version constraints on dependencies.

>From an upstream perspective, it's mostly just extra information for
debugging purposes - the version comparison operations deliberately ignore
the "local version" field.

Cheers,
Nick.

>
>
> _______________________________________________
> Distutils-SIG maillist  -  Distutils-SIG at python.org
> https://mail.python.org/mailman/listinfo/distutils-sig
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20140503/bedf74d1/attachment.html>


More information about the Distutils-SIG mailing list