diff --git a/setup.py b/setup.py
index 7ab1f2c62de98ad2a62572bffe96ac73913ebf88..d8e82e15ef75df56ee1121345e9fe7b7dc35e859 100755
--- a/setup.py
+++ b/setup.py
@@ -50,7 +50,10 @@ MINOR = 2
 MICRO = 4
 PRE = "rc0"
 ISRELEASED = True
-VERSION = "{}.{}.{}{}".format(MAJOR, MINOR, MICRO, PRE)
+if PRE:
+    VERSION = "{}.{}.{}-{}".format(MAJOR, MINOR, MICRO, PRE)
+else:
+    VERSION = "{}.{}.{}".format(MAJOR, MINOR, MICRO)
 
 
 # Return the git revision as a string