~ubuntu-branches/ubuntu/raring/pymodbus/raring-proposed

« back to all changes in this revision

Viewing changes to pymodbus/version.py

  • Committer: Package Import Robot
  • Author(s): W. Martin Borgert
  • Date: 2011-10-26 07:26:28 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20111026072628-fvzyi6tnb8iipomp
Tags: 0.9.0+r175-1
* Update from trunk to get a number of upstream fixes.
* Removed examples/tools/ (not present in previous version
  anyway) from source because there are different licenses
  involved. Needs clarification.
* Dont't install unit tests.
* Debian patches not necessary anymore.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
Since we are using twisted's version class, we can also query
6
6
the svn version as well using the local .entries file.
7
7
'''
 
8
 
 
9
 
8
10
class Version(object):
9
11
 
10
12
    def __init__(self, package, major, minor, micro):
26
28
        '''
27
29
        return '%d.%d.%d' % (self.major, self.minor, self.micro)
28
30
 
29
 
 
30
31
    def __str__(self):
31
32
        ''' Returns a string representation of the object
32
33
 
34
35
        '''
35
36
        return '[%s, version %s]' % (self.package, self.short())
36
37
 
37
 
 
38
 
_version = Version('pymodbus', 0, 9, 0)
39
 
_version.__name__ = 'pymodbus' # fix epydoc error
40
 
 
41
 
#---------------------------------------------------------------------------# 
 
38
version = Version('pymodbus', 0, 9, 0)
 
39
version.__name__ = 'pymodbus'  # fix epydoc error
 
40
 
 
41
#---------------------------------------------------------------------------#
42
42
# Exported symbols
43
 
#---------------------------------------------------------------------------# 
44
 
__all__ = ["_version"]
 
43
#---------------------------------------------------------------------------#
 
44
__all__ = ["version"]