Skip to content

Commit e34a459

Browse files
author
Jonathan Tu
committed
Fixed version parsing.
1 parent bfd43bf commit e34a459

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

setup.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,13 @@
1717
exec(f.read())
1818
# Get the development status from the version string
1919
parsed_version = str(parse_version(__version__))
20-
if any(w in ['*a', '*alpha'] for w in parsed_version):
21-
devstatus = 'Development Status :: 3 - Alpha'
22-
elif any(w in ['*b', '*beta'] for w in parsed_version):
20+
# Parse the version string, looking for the "beta" suffix first, otherwise
21+
# looking for the letter "a" will find one at the end of "beta" and flag it as
22+
# an alpha version
23+
if any(suffix in parsed_version for suffix in ['b', 'beta']):
2324
devstatus = 'Development Status :: 4 - Beta'
25+
elif any(suffix in parsed_version for suffix in ['a', 'alpha']):
26+
devstatus = 'Development Status :: 3 - Alpha'
2427
else:
2528
devstatus = 'Development Status :: 5 - Production/Stable'
2629

0 commit comments

Comments
 (0)