You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
427 B
Python
28 lines
427 B
Python
#! /usr/bin/env python
|
|
|
|
"""
|
|
Context commands usually derive from different classe.
|
|
The command 'foo' uses a normal context, while bar uses
|
|
a different class. Try executing
|
|
$ waf configure foo bar tak
|
|
"""
|
|
|
|
def configure(ctx):
|
|
print(type(ctx))
|
|
|
|
def foo(ctx):
|
|
print(type(ctx))
|
|
|
|
def bar(ctx):
|
|
print(type(ctx))
|
|
|
|
from waflib.Context import Context
|
|
|
|
class one(Context):
|
|
cmd = 'foo'
|
|
|
|
class two(Context):
|
|
cmd = 'tak'
|
|
fun = 'bar'
|
|
|