Bug 2013: pygccxml versions > 1.0.0 prepend a 'v' to version number

This commit is contained in:
Ben Newton
2014-11-26 14:59:32 -08:00
parent f140db6a63
commit 3395e180e1

View File

@@ -255,6 +255,8 @@ int main ()
"import pygccxml; print pygccxml.__version__"], "import pygccxml; print pygccxml.__version__"],
stdout=subprocess.PIPE).communicate()[0] stdout=subprocess.PIPE).communicate()[0]
pygccxml_version_str = out.strip() pygccxml_version_str = out.strip()
# Bug 2013: pygccxml versions > 1.0.0 prepend a 'v' to version number
pygccxml_version_str = pygccxml_version_str.lstrip('v')
pygccxml_version = tuple([int(x) for x in pygccxml_version_str.split('.')]) pygccxml_version = tuple([int(x) for x in pygccxml_version_str.split('.')])
conf.msg('Checking for pygccxml version', pygccxml_version_str) conf.msg('Checking for pygccxml version', pygccxml_version_str)
if not (pygccxml_version >= REQUIRED_PYGCCXML_VERSION): if not (pygccxml_version >= REQUIRED_PYGCCXML_VERSION):