3

In addition to check for presence of a particular python module during ./waf configure, I need to also check for it to be of minimum version number.

This is what I'm already doing in my wscript:

def configure(cfg):
    cfg.load('python')
    cfg.check_python_module('some_module')

How can I achieve this?

zaadeh
  • 1,711
  • 2
  • 23
  • 37

1 Answers1

2

Have a look at this https://waf.io/apidocs/tools/python.html#waflib.Tools.python.check_python_module

def options(opt):
    opt.load('python')

def configure(conf):
    conf.load('python')
    conf.check_python_module(
        're',
        condition="ver > num(2, 0, 4) and ver <= num(3, 0, 0)")
neuro
  • 14,948
  • 3
  • 36
  • 59
user69453
  • 1,279
  • 1
  • 17
  • 43