<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"><html><head><meta name="qrichtext" content="1" /><style type="text/css">p, li { white-space: pre-wrap; }</style></head><body style=" font-family:'Tahoma'; font-size:12pt; font-weight:400; font-style:normal;">My solution tackles it from another direction, using observed egg packaging practices. This is what I have observed in setup.pys, and eggs' requires.txts so far:<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>1.2dev: refers to unspecified not-even-alpha quality checkout or source drop<br>
1.2dev-r5667: refers to the checkout of revision 5667, not-even-alpha<br>
1.2a1: refers to Alpha 1 of intended version 1.2<br>
1.2a2: refers to Alpha 2 of intended version 1.2<br>
1.2b1: refers to Beta 1 of intended version 1.2<br>
1.2: refers to official 1.2 release<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>Note NO UNDERSCORES. In order to satisfy the fedora package naming guidelines and RPM's lexicographical sort, this is what happens within my patches:<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>1.2dev: version 1.2 release 0.0.0dev REGARDLESS of user-specified release <br>
1.2dev-r56: version 1.2 release 0.0.56devr REGARDLESS of user-specified rel<br>
1.2a1: version 1.2 release 0.<user-specified release>.a1<br>
1.2a2: version 1.2 release 0.<user-specified release>.a2<br>
1.2b1: version 1.2 release 0.<user-specified release>.b1<br>
(note in the last three it is the responsibility of the builder to bump the <release> manually, there is really nothing we can do about it)<br>
1.2: version 1.2 release <user-specified release><br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>In this manner we can accurately map existing practice (what people are actually DOING at least in a significant amount of eggs -- the plone ones) in python egg versioning numbers to RPM lexicographical sort in a manner that lets package managers "do the right thing".<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>Also, we need a standard way of trolling the requires.txt for the egg dependencies and transforming them into RPM dependencies, otherwise your RPMs won't work in concert. Code for that in my workbench yum.rudd-o.com subdir SCRIPTS, it is documented step by step, but this should really be integrated within the setuptools bdist_rpm kludge. Really.<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>I am exhausted.<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>El Miércoles 11 Marzo 2009, Gerry Reno escribió:<br>
> Manuel Amador (Rudd-O) wrote:<br>
> > Hello, guys,<br>
> ><br>
> ><br>
> > I have fixed distutils (and setuptools remains working) with the<br>
> > attached patch. Now, RPMs will be built according to the Fedora<br>
> > Package Naming Guidelines:<br>
> ><br>
> ><br>
> > http://fedoraproject.org/wiki/Packaging/NamingGuidelines#Non-Numeric_Vers<br>
> >ion_in_Release<br>
> ><br>
> ><br>
> > which I understand to be the most useful reference in terms of naming<br>
> > pre-release packages. This should work correctly in at least:<br>
> ><br>
> ><br>
> > - Fedora<br>
> > - RHEL<br>
> > - SUSE<br>
> ><br>
> ><br>
> > I urge you patch your python 2.4s and 2.5s and 2.6s and push this<br>
> > update to distributions. I have done that myself at my own repository.<br>
> ><br>
> ><br>
> > Now we can enjoy one more reason to build RPMs (and eggs! ...<br>
> > according to my workbench at http://yum.rudd-o.com/SCRIPTS/ -- feel<br>
> > free to pick its brains) DIRECTLY from the cheese shop, especially if<br>
> > you're using pip.<br>
> ><br>
> ><br>
> > Oh, I also have pip at my repo (cd ../RPMS/noarch in my workbench).<br>
> ><br>
> ><br>
> > See attached patch. I will log bugs where it corresponds too.<br>
> > --<br>
> ><br>
> ><br>
> > Manuel Amador (Rudd-O) <rudd-o@rudd-o.com><br>
> > Rudd-O.com - http://rudd-o.com/<br>
> > GPG key ID 0xC8D28B92 at http://wwwkeys.pgp.net/<br>
> ><br>
> ><br>
> > Now playing, courtesy of Amarok: Aqua - Cartoon heroes<br>
> > Windows 95 is not a virus. Viruses actually do something.<br>
><br>
> Hi Manuel,<br>
> You worked on my problem! Great.<br>
> So today what we have been doing to deal with the pre-release and<br>
> lexical ordering problem involving pre-releases is this:<br>
> We impose a restriction on how the pre-release is identified. So<br>
> for example if you intend to end up with a final version-release of<br>
> 5.0.0-1 and you want to first put out some betas or release candidates<br>
> then we have to name them as, 5.0.0-0_beta1, or 5.0.0-0_rc1 and this is<br>
> so that the lexical ordering for RPM will be correct. In other words<br>
> you must put the pre-release designation into the 'release' part of<br>
> VERSION-RELEASE. What we had seen developers doing previously was to<br>
> name these as 5.0.0_beta1 or 5.0.0_rc1 (making the pre-release<br>
> designation part of the 'version' string) which then did not work for<br>
> the lexical ordering of the final release of 5.0.0-1 because 5.0.0<br>
> (version) was not lexically superior to 5.0.0_rc1. So we were able to<br>
> solve this problem without any code changes to distutils. But this also<br>
> presented a challenge for the other distribution targets such as 'sdist'<br>
> because they were totally unaware of this 'version-release' combination<br>
> and only knew about 'version'. So as a workaround we were doing this:<br>
> # WORKAROUND<br>
> # define both version AND release<br>
> version='5.0.0'<br>
> release='1'<br>
> # combine them for all targets except 'bdist_rpm'<br>
> if sys.argv[1] != 'bdist_rpm':<br>
> version = version+'-'+release<br>
> So this wasn't perfect but it actually worked quite well and we could<br>
> get 'sdist' to work properly in conjunction with 'bdist_rpm'.<br>
> So now with your patch all the targets should be able to set and use<br>
> both 'version' and 'release' and we don't need our workaround and that<br>
> will be great.<br>
><br>
> Regards,<br>
> Gerry<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>-- <br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>        Manuel Amador (Rudd-O) <rudd-o@rudd-o.com><br>
        Rudd-O.com - http://rudd-o.com/<br>
        GPG key ID 0xC8D28B92 at http://wwwkeys.pgp.net/<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>Example is not the main thing in influencing others. It is the only thing.<br>
                -- Albert Schweitzer<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p></body></html>