2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-22 01:46:15 +01:00

Remove atleast-version, exact-version and max-version from conf.check_cfg

This commit is contained in:
Thomas Nagy 2016-12-03 06:44:20 +01:00
parent ac2ebb2ccc
commit ceedab882d
No known key found for this signature in database
GPG Key ID: 49B4C67C05277AAA
3 changed files with 2 additions and 29 deletions

View File

@ -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

1
TODO
View File

@ -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

View File

@ -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()