From ceedab882dac185b25e2544073de4e437906b8ac Mon Sep 17 00:00:00 2001 From: Thomas Nagy Date: Sat, 3 Dec 2016 06:44:20 +0100 Subject: [PATCH] Remove atleast-version, exact-version and max-version from conf.check_cfg --- ChangeLog | 1 + TODO | 1 + waflib/Tools/c_config.py | 29 ----------------------------- 3 files changed, 2 insertions(+), 29 deletions(-) diff --git a/ChangeLog b/ChangeLog index d16c9768..756784a4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,3 +7,4 @@ NEW IN WAF 2.0.0 * Remove Node.sig and Node.cache_sig * Remove the BuildContext.rule decorator * Remove Task.update_outputs, Task.always_run +* Remove atleast-version, exact-version and max-version from conf.check_cfg diff --git a/TODO b/TODO index 7472fff2..1d2e2101 100644 --- a/TODO +++ b/TODO @@ -5,4 +5,5 @@ Merge mem_reducer.py in the mainline Improve the sorting in TaskGen.post() Remove ut_exec, ut_cmd from waf_unit_test.py Better logging? +Utils.exc_stack diff --git a/waflib/Tools/c_config.py b/waflib/Tools/c_config.py index 329a61da..2ffc9c83 100644 --- a/waflib/Tools/c_config.py +++ b/waflib/Tools/c_config.py @@ -19,12 +19,6 @@ WAF_CONFIG_H = 'config.h' DEFKEYS = 'define_key' INCKEYS = 'include_key' -cfg_ver = { - 'atleast-version': '>=', - 'exact-version': '==', - 'max-version': '<=', -} - SNIP_FUNCTION = ''' int main(int argc, char **argv) { void (*p)(); @@ -269,19 +263,6 @@ def validate_cfg(self, kw): if not 'msg' in kw: kw['msg'] = 'Checking for %r' % (kw['package'] or kw['path']) - for x in cfg_ver: - # Gotcha: only one predicate is allowed at a time - # TODO remove in waf 2.0 - y = x.replace('-', '_') - if y in kw: - package = kw['package'] - if Logs.verbose: - Logs.warn('Passing %r to conf.check_cfg() is obsolete, pass parameters directly, eg:', y) - Logs.warn(" conf.check_cfg(package='%s', args=['--libs', '--cflags', '%s >= 1.6'])", package, package) - if not 'msg' in kw: - kw['msg'] = 'Checking for %r %s %s' % (package, cfg_ver[x], kw[y]) - break - @conf def exec_cfg(self, kw): """ @@ -333,16 +314,6 @@ def exec_cfg(self, kw): kw['okmsg'] = 'yes' return - for x in cfg_ver: - # TODO remove in waf 2.0 - y = x.replace('-', '_') - if y in kw: - self.cmd_and_log(path + ['--%s=%s' % (x, kw[y]), kw['package']], env=env) - if not 'okmsg' in kw: - kw['okmsg'] = 'yes' - define_it() - break - # single version for a module if 'modversion' in kw: version = self.cmd_and_log(path + ['--modversion', kw['modversion']], env=env).strip()