sumolib.version
index
sumolib/version.py

This module contains functions to determine the current SUMO version.

 
Modules
       
importlib
subprocess

 
Functions
       
fromVersionHeader()
Returns the version as defined in "include/version.h" or as a fallback
"src/config.h.cmake". Since the latter only contains the last release info it is extended
with "-0000000000" to mark that it may not be a release and the commit hash is unknown.
gitDescribe(commit='HEAD', gitDir='sumolib/../../.git', padZero=True)
The original git describe format is "<tag>-<commit_count>-g<hash>".
This function converts it to "<tag>+<commit_count>-<hash>".
If padZero is true (the default), the commit count is padded to four digits.
If the git describe call fails or cannot find tags (because it is a shallow clone),
the result of fromVersionHeader is returned.

 
Data
        GITDIR = 'sumolib/../../.git'