Permalink
Browse files

changed version building to match what Pinax uses producing 0.2a1.dev3

  • Loading branch information...
1 parent 2be9a5a commit 8aaa36eaa822d70005349f6cecc0e9c2939a5ec1 @brosner brosner committed Sep 10, 2010
Showing with 14 additions and 9 deletions.
  1. +14 −9 notification/__init__.py
@@ -1,11 +1,16 @@
-VERSION = (0, 2, 0, "dev", 2)
+VERSION = (0, 2, 0, "a", 1) # following PEP 386
+DEV_N = 3
+
def get_version():
- if VERSION[3] == "final":
- return "%s.%s.%s" % (VERSION[0], VERSION[1], VERSION[2])
- elif VERSION[3] == "dev":
- return "%s.%s.%s.%s%s" % (VERSION[0], VERSION[1], VERSION[2], VERSION[3], VERSION[4])
- else:
- return "%s.%s.%s%s" % (VERSION[0], VERSION[1], VERSION[2], VERSION[3])
-
-__version__ = get_version()
+ version = "%s.%s" % (VERSION[0], VERSION[1])
+ if VERSION[2]:
+ version = "%s.%s" % (version, VERSION[2])
+ if VERSION[3] != "f":
+ version = "%s%s%s" % (version, VERSION[3], VERSION[4])
+ if DEV_N:
+ version = "%s.dev%s" % (version, DEV_N)
+ return version
+
+
+__version__ = get_version()

0 comments on commit 8aaa36e

Please sign in to comment.