[Distutils] Bug in setuptools version parsing when appending '.dev'?

Alexander Michael lxander.m at gmail.com
Mon Aug 4 19:41:19 CEST 2008

On Mon, Aug 4, 2008 at 1:24 PM, Dave Peterson <dpeterson at enthought.com> wrote:
> Alexander Michael wrote:
>> The rationale is probably that dev releases represent "early"
>> development releases, while beta releases are closer to the final
>> release than dev releases. What I think is missing is a way of saying
>> (silently) that this a dev of the final, and that final is newer than
>> beta (and especially a dev of a beta).
> Actually, you can append the tag 'final' and it seems to work fine:
>>>> pv('3.0.final.dev') > pv(3.0b1')
> True
> I just hate to add the tag 'final' to a final release due to the extra
> typing it causes people.   It seems to me the community expectation is to be
> able to do things like "easy_install Traits==3.0"  rather than "easy_install
> Traits==3.0.final"

I thought this might work, which is why I suggested that maybe it
could be done "silently". For example, in the setup.py files but not
at the easy_install command-line. This implicit complication would
probably lead to other wonkiness though...

>> To work with what we have now, I think you need to set the trunk
>> version to 3b2.dev (the next in-development version). And then when
>> you're ready for the final version of 3, bump your working copy of the
>> trunk to 3 (final) and do a test build with the .dev dropped (perhaps
>> from the command-line with python setup.py egg_info -RDb "" sdist
>> bdist_egg) in a virtualenv or similar sandbox where you can easily
>> manually wipe site-packages in case you need to iterate. Once that's
>> good, commit, branch and tag, release, and then immediately commit the
>> trunk version to 3.1.dev (3.0.1 bug-fix releases will be prepared in
>> the branch).
> The problem here is that we *released* Traits 3.0.  It is no longer a beta.
> But other projects that wanted to rely on it as soon as it was in a stable
> beta put in a requirement of "Traits >=3.0b1".  Unfortunately, if developers
> check-out the tag of the release and do a build, they get Traits with
> version "3.0.dev-rXXXXX' which setuptools says doesn't satisfy "Traits
>>=3.0b1".    They get the '.dev' because we have historically not modified
> the source's setup.cfg when tagging the release (we do NO changes between
> the last build/test cycle and the tagging.)

Again, attempting to offer up practical solutions. Edit the
setup.cfg's to drop the dev option in the release branches and update
the trunk to the next version (i.e. 3.1.dev-rXXXXX)? That way,
checkouts of the release branches will be 3.0-rXXXXX (a post release
of 3) and the trunk will be a post of a pre-release that is newer than
anything else in the repository. Just a thought...


P.S. And serious congrats on the Traits release-- Traits rocks!

More information about the Distutils-SIG mailing list