summaryrefslogtreecommitdiff
path: root/wscript
diff options
context:
space:
mode:
Diffstat (limited to 'wscript')
-rw-r--r--wscript10
1 files changed, 5 insertions, 5 deletions
diff --git a/wscript b/wscript
index aecc85a5c2..e545b42b61 100644
--- a/wscript
+++ b/wscript
@@ -147,16 +147,16 @@ else:
rev = fetch_tarball_revision ()
#
-# rev is now of the form MAJOR.MINOR-rev-commit
-# or, if right at the same rev as a release, MAJOR.MINOR
+# rev is now of the form MAJOR.MINOR[-rcX]-rev-commit
+# or, if right at the same rev as a release, MAJOR.MINOR[-rcX]
#
-parts = rev.split ('.')
+parts = rev.split ('.', 1)
MAJOR = parts[0]
-other = parts[1].split ('-')
+other = parts[1].split('-', 1)
MINOR = other[0]
if len(other) > 1:
- MICRO = other[1]
+ MICRO = other[1].rsplit('-',1)[0].replace('-','.')
else:
MICRO = '0'