Permalink
Browse files

Add support for Python 3.x

  • Loading branch information...
1 parent 1e08e7b commit 61cfbac9d90789425611401b49e505ed000a26eb @kxepal kxepal committed Feb 8, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 semver.py
View
@@ -8,6 +8,9 @@
'(\-(?P<prerelease>[0-9A-Za-z]+(\.[0-9A-Za-z]+)*))?'
'(\+(?P<build>[0-9A-Za-z]+(\.[0-9A-Za-z]+)*))?$')
+if 'cmp' not in __builtins__:
+ cmp = lambda a,b: (a > b) - (a < b)
+
def parse(version):
"""
Parse version to major, minor, patch, pre-release, build parts.

0 comments on commit 61cfbac

Please sign in to comment.