Skip to content

Commit 01a9f2b

Browse files
committed
Fix version string for dev
1 parent ea0584f commit 01a9f2b

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

pythreejs/_version.py

+9-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,15 @@
22

33
_specifier_ = {'alpha': 'a', 'beta': 'b', 'candidate': 'rc', 'final': '', 'dev': 'dev'}
44

5-
__version__ = '%s.%s.%s%s'%(version_info[0], version_info[1], version_info[2],
6-
'' if version_info[3]=='final' else _specifier_[version_info[3]]+str(version_info[4]))
5+
postfix = ''
6+
if version_info[3] != 'final':
7+
if version_info[3] == 'dev' and len(version_info) < 4:
8+
postfix = 'dev0'
9+
else:
10+
postfix = _specifier_[version_info[3]] + str(version_info[4]))
11+
12+
__version__ = '%s.%s.%s%s' % (version_info[0], version_info[1], version_info[2], postfix)
13+
714

815
# The version of the attribute spec that this package
916
# implements. This is the value used in

0 commit comments

Comments
 (0)