[Distutils] the usecase of continious integration based release-management (which could use more support on the ds2 side)

Mark Sienkiewicz sienkiew at stsci.edu
Wed Mar 23 21:59:35 CET 2011


Ronny Pfannschmidt wrote:
> Hi,
>
> i'd like to propose making the work-flow of creating releases by just
> pushing vcs tags to a ci system as easy as possible
>
> personally all i ever want to do to release a new version is::
>
>   $vcs tag $version
>   $vcs push
>
> currently that would require various nasty hacks to get the version
> meta-data static on sdist and to grab the version number in a setup hook
>   

Maybe you should go the other way:  Put the version number in your 
source code.  Make a short script that picks out the version number and 
constructs a tag name for the vcs.  Raise an error if the tag already 
exists.

This method is easy to implement for your project alone, it is easy to 
distribute to others who want to do the same thing, and there are no 
nasty hacks involved.  For example,
 
% python tagdist.py
You didn't change the version number!
% emacs setup.cfg
% python tagdist.py
Tagging release 0.0.2
%

If you find it works well in practice, you might then propose to move 
the script into "python setup.py tagdist".



More information about the Distutils-SIG mailing list