Python project versioning -
the problem:
i need set versioning in pythonproject.
every time make release - merge production , development branches in vcs.
need make least amount of corrections in setting version of project , automate process.
what i`ve done:
- i`ve read pep 396 module versioning (it not need)
- i figured out how set version project
setup.pyfile in this documentation - i figured out how
djangoworks versions here
my next steps:
i need release:
- release date
- revision
- version number
so plan make release number format major.minor.changeset, because keeping release date in version makes pretty long. want create version.py file:
major_version = 1 minor_version = 1 release_date = '28 .08.2013 ' def get_revision (): ... def get_version (): .... and import version there when need (but i'm affraid can forget set proper date), , put file change.txt next describes release changes.
the question:
i want know how set versions in python projects , how should convert idea simplify scheme.
two related issues: (1) choices metadata track @ module level, including versioning, plus other useful information; , (2) way represent metadata.
a general approach module metadata explained @ http://epydoc.sourceforge.net/manual-fields.html#module-metadata-variables. says, use constants named __author__, __authors__, __contact__, __copyright__, __license__, __date__ , __version__. these commonly used, it's convention.
then how populate __version__ constant -- model versioning semantic versioning -- see http://semver.org/. basically, use 1.2.3 style in major changes when there's incompatible api change, minor changes when there's new functionality, , micro aka patch changes when there's bug fix. used commonly , therefore convention.
Comments
Post a Comment