[Distutils] Setting version from commandline or setup.cfg?

Alan Franzoni mailing at franzoni.eu
Sun Jan 16 23:08:08 CET 2011


On Sun, Jan 16, 2011 at 8:50 PM, Maurits van Rees
<m.van.rees at zestsoftware.nl> wrote:
> I would say just run the tests manually first (possibly as simple as running
> bin/test if you have a good buildout configuration) and then use the
> fullrelease command from zest.releaser.

Yup, I'm tinkering with something like that, and it seems fine in
fact. I don't know why I thought it was harder.

>> and I'd really like to pull version numbers from the branch name and
>> latest revision from the tag info - nor version.txt neither setup.py
>> should be committed at any time - that's often an issue because when
>> working with multiple branches, the forward merge of version changes
>> often produces merge errors that must be corrected manually. Saving
>> version info in metadata like branch names or tags is a better
>> solution, I think.
>
> When you upload your package to pypi.python.org setup.py needs to know what
> version it is.  In other words: you need some way of having 'python setup.py
> --version' come up with the correct version.

I have noticed that, and it ultimately makes sense. Once it's a
.tar.gz there's no VCS under it, it can't possibly know which version
is around.

> Yes, merging can produce conflicts, but if version conflicts in a changelog
> and a setup.py are your worst merge problems then you can count yourself
> blessed. :-)

Wherever there's unneeded manual work, there's something to fix.

Such problems does not arise in Python projects, it's often very
painful when developing Java with Maven as well; and can sometimes
have hellish consequences. If after a long-and-painful merge anyone
forgets to put the correct version number in the version file and then
goes on by releasing it, stakes are high that problems will arise.

> Cool.  I get the feeling you are trying to solve a problem that I don't have
> or that I do not consider a problem though, so don't get your hopes up too
> high that changes are accepted for a release.

That's probable. In that case I won't modify the releaser, maybe I
could start a totally different project, but I'd like to reuse what
can be reused.

-- 
Alan Franzoni
--
contact me at public@[mysurname].eu


More information about the Distutils-SIG mailing list