Skip to content

Commit

Permalink
pymodbus-dev#162 preparing for 1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dhoomakethu committed May 12, 2017
1 parent 704b6f7 commit 90d24a5
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 21 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ build/
dist/
pymodbus.egg-info/
.coverage
.vscode
.idea
.noseids
10 changes: 6 additions & 4 deletions pymodbus/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,26 @@

class Version(object):

def __init__(self, package, major, minor, micro):
def __init__(self, package, major, minor, micro, pre):
'''
:param package: Name of the package that this is a version of.
:param major: The major version number.
:param minor: The minor version number.
:param micro: The micro version number.
:param pre: The pre release tag
'''
self.package = package
self.major = major
self.minor = minor
self.micro = micro
self.pre = pre

def short(self):
''' Return a string in canonical short version format
<major>.<minor>.<micro>
<major>.<minor>.<micro>.<pre>
'''
return '%d.%d.%d' % (self.major, self.minor, self.micro)
return '%d.%d.%d.%s' % (self.major, self.minor, self.micro, self.pre)

def __str__(self):
''' Returns a string representation of the object
Expand All @@ -35,7 +37,7 @@ def __str__(self):
'''
return '[%s, version %s]' % (self.package, self.short())

version = Version('pymodbus', 1, 3, 0)
version = Version('pymodbus', 1, 3, 0, "rc1")
version.__name__ = 'pymodbus' # fix epydoc error

#---------------------------------------------------------------------------#
Expand Down
26 changes: 13 additions & 13 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
# -------------------------------------------------------------------
# if want to use the pymodbus serial stack, uncomment these
# -------------------------------------------------------------------
#pyserial==2.6
#pyserial==3.3
# -------------------------------------------------------------------
# if you want to run the tests and code coverage, uncomment these
# -------------------------------------------------------------------
#coverage==3.5.3
#mock==1.0b1
#nose==1.2.1
#pep8==1.3.3
#coverage==4.4
#mock==2.0.0
#nose==1.3.7
#pep8==1.7.0
# -------------------------------------------------------------------
# if you want to use the asynchronous version, uncomment these
# -------------------------------------------------------------------
#Twisted==12.2.0
#zope.interface==4.0.1
#pyasn1==0.1.4
#pycrypto==2.6
#Twisted==17.1.0
#zope.interface==4.4.0
#pyasn1==0.2.3
#pycrypto==2.6.1
#wsgiref==0.1.2
# -------------------------------------------------------------------
# if you want to build the documentation, uncomment these
# -------------------------------------------------------------------
#Jinja2==2.6
#Pygments==1.5
#Sphinx==1.1.3
#docutils==0.9.1
#Jinja2==2.9.6
#Pygments==2.2.0
#Sphinx==1.5.5
#docutils==0.13.1
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@
author = __author__,
author_email = '[email protected]',
maintainer = __author__,
maintainer_email = 'bashwork@gmail.com',
url='http://code.google.com/p/pymodbus/',
maintainer_email = 'otlasanju@gmail.com',
url='https://github.com/riptideio/pymodbus/',
license = 'BSD',
packages = find_packages(exclude=['examples', 'test']),
exclude_package_data = {'' : ['examples', 'test', 'tools', 'doc']},
Expand Down
4 changes: 2 additions & 2 deletions test/test_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ def tearDown(self):
pass

def testVersionClass(self):
version = Version('test', 1,2,3)
version = Version('test', 1,2,3, "sometag")
self.assertEqual(version.short(), '1.2.3')
self.assertEqual(str(version), '[test, version 1.2.3]')
self.assertEqual(str(version), '[test, version 1.2.3.sometag]')

#---------------------------------------------------------------------------#
# Main
Expand Down

0 comments on commit 90d24a5

Please sign in to comment.