[Distutils] Setting version from commandline or setup.cfg?
Maurits van Rees
m.van.rees at zestsoftware.nl
Tue Jan 11 14:41:11 CET 2011
Op 11-01-11 12:51, Alan Franzoni schreef:
> Hello,
> I'm trying to automate my release process from vcs - something like:
>
> run tests ->
> fetch current major, minor from branch (e.g. release_1.2) and
> revision from tag (e.g. v1.2.1) ->
> upload with current major, minor and revision +1>
> tag with such current major, minor and incremented revision.
>
>
> I'd like to set my version from outside my setup.py file, either via
> setup.py or a commandline option - I don't want to execute code in my
> setup.py since this usually causes all sort of headaches with missing
> dependencies.
>
> Is there any proper way to do it? Might I break other things unexpectedly?
I suggest using a tool like:
http://pypi.python.org/pypi/zest.releaser
http://pypi.python.org/pypi/jarn.mkrelease
http://pypi.python.org/pypi/collective.releaser
Depending on which vcs you are using you may need some extra packages, see:
http://pypi.python.org/pypi/zest.releaser/3.18#prepare-for-pypi-distribution
When testing any of these tools you may want to create a local
subversion/git/mercurial/whatever repository and create a small package
there to test releasing it.
--
Maurits van Rees
Programmer at Zest Software http://zestsoftware.nl
Personal website http://maurits.vanrees.org/
More information about the Distutils-SIG
mailing list