MantisBT - PyRosetta
View Issue Details
0000032PyRosetta[All Projects] Documentationpublic2012-06-29 18:392012-08-03 14:04
oconchus 
Sergey 
lowminoralways
resolvedfixed 
All platformsAnyAny
 
 
PyRosetta
python
49759
0000032: No __version__ element in PyRosetta's rosetta package
To display the PyRosetta version number, I make the following function call:
 import rosetta
 rosetta.version()

However, many Python packages use the __version__ variable (typically a string) for this purpose e.g.
 import somepackage
 somepackage.__version__

The __version__ variable is somewhat standard so maybe we should use this instead.
python
>> import rosetta
>> rosetta.__version__
There are active Python style guidelines from Guido on how to implement __version__ for SVN builds:
http://www.python.org/dev/peps/pep-0008/#version-bookkeeping [^]
The $Revision$ string is filled in by subversion.

Moving forward with git, using either 'git-archive' packaging tool or else the 'git describe' command may be useful:
http://www.kernel.org/pub/software/scm/git/docs/git-describe.html [^]
The --dirty, --tags, and --always options of 'git describe' add useful branch information.
PyRosetta
Issue History
2012-06-29 18:39oconchusNew Issue
2012-06-29 18:41oconchusTag Attached: PyRosetta
2012-06-29 18:51oconchusAssigned To => Sergey
2012-06-29 18:51oconchusStatusnew => assigned
2012-07-06 13:50LabonteFixed in SVN Version => 49759
2012-07-06 13:50LabonteNote Added: 0000023
2012-07-06 13:50LabonteStatusassigned => resolved
2012-07-06 13:50LabonteResolutionopen => fixed
2012-08-03 14:04delucaslProjectRosetta => PyRosetta

Notes
(0000023)
Labonte   
2012-07-06 13:50   
__version__ returns a string with the version #; version() continues to return the same paragraph that includes the version number as before.