[waf] configure fail in numpy version check

Issue #13 resolved
Denis Laxalde created an issue

With a non strict version of numpy (e.g. 1.8.1~rc1 as in debian/sid currently), the version check fails with a ValueError because it calls int() with the 'rc1' string.

One solution for this would be to use distutils's version comparison framework. In waftools/python_cfg.py check_numpy_version(), something like:

from distutils.version import LooseVersion
result = LooseVersion(npyver) >= LooseVersion(minver_str)

Comments (6)

  1. Mathieu Courtois

    This has already been fixed in default: see revision ad4750efba9f

    It will be "backported" in v11 soon.

    Please feel free to give your advice on the fix.

  2. Denis Laxalde reporter

    This does not fix the issue for numpy version 1.8.1~rc1 as short_version returns 1.8.1rc1.

       File "waftools/python_cfg.py", line 86, in check_numpy_version
         npyver_tuple = tuple(map(int, res.strip().split('.')))
    ValueError: invalid literal for int() with base 10: '1rc1'
    
  3. Log in to comment