Remove the BuildContext.rule decorator

This commit is contained in:
Thomas Nagy 2016-12-01 22:57:15 +01:00
parent a5d2c5fe24
commit fb01bf72ab
No known key found for this signature in database
GPG Key ID: 49B4C67C05277AAA
2 changed files with 2 additions and 24 deletions

View File

@ -4,3 +4,5 @@ NEW IN WAF 2.0.0
* Removed ut_fun from waf_unit_test.py
* Force files into the build directory by default
* Remove Node.sig and Node.cache_sig
* Remove the BuildContext.rule decorator

View File

@ -175,30 +175,6 @@ class BuildContext(Context.Context):
self.add_to_group(ret, group=kw.get('group'))
return ret
def rule(self, *k, **kw):
"""
Wrapper for creating a task generator using the decorator notation. The following code::
@bld.rule(target="foo")
def _(tsk):
print("bar")
is equivalent to::
def bar(tsk):
print("bar")
bld(
target = "foo",
rule = bar,
)
"""
def f(rule):
ret = self(*k, **kw)
ret.rule = rule
return ret
return f
def __copy__(self):
"""
Build contexts cannot be copied