Skip to content
Snippets Groups Projects
Commit ada62a45 authored by Christoph Groth's avatar Christoph Groth
Browse files

update determination of short version to work with PEP 440 style

parent 6bdf8042
No related branches found
No related tags found
No related merge requests found
......@@ -52,12 +52,8 @@ copyright = u'2011-2015, C. W. Groth (CEA), M. Wimmer, A. R. Akhmerov, X. Wainta
# The full version, including alpha/beta/rc tags.
release = kwant.__version__
for i, s in enumerate(release):
if s not in '0123456790.':
break
# The short X.Y version.
version = release[:i]
version = release[:len(release) - len(release.lstrip('012345679.'))].rstrip('.')
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment