View | Details | Raw Unified | Return to bug 2863
Collapse All | Expand All

(-)a/bindings/python/wscript (-4 / +9 lines)
 Lines 273-282   int main () Link Here 
273
                                     "Missing 'pygccxml' Python module")
273
                                     "Missing 'pygccxml' Python module")
274
        return
274
        return
275
275
276
    out = subprocess.Popen([conf.env['PYTHON'][0], "-c",
276
    try:
277
                            "import pygccxml; print pygccxml.__version__"],
277
        import pygccxml as pygccxml_imported
278
                            stdout=subprocess.PIPE).communicate()[0]
278
        pygccxml_version_str = pygccxml_imported.__version__
279
    pygccxml_version_str = out.strip()
279
    except (ImportError, AttributeError):
280
        Logs.warn("pygccxml version cannot be determined")
281
        conf.report_optional_feature("castxml", "Python API Scanning Support", False,
282
                                     "pygccxml Python module version is unknown")
283
        return
284
280
    # Bug 2013:  pygccxml versions > 1.0.0 prepend a 'v' to version number
285
    # Bug 2013:  pygccxml versions > 1.0.0 prepend a 'v' to version number
281
    pygccxml_version_str = pygccxml_version_str.lstrip('v')
286
    pygccxml_version_str = pygccxml_version_str.lstrip('v')
282
    pygccxml_version = tuple([int(x) for x in pygccxml_version_str.split('.')])
287
    pygccxml_version = tuple([int(x) for x in pygccxml_version_str.split('.')])

Return to bug 2863