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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
waf_old/docs/book/examples/configuration_deco/wscript

26 lines
370 B
Python

#! /usr/bin/env python
"""
The @conf is a python decorator - decorators are used to replace functions
This particular decorator will bind the function to
the configuration context
Try:
$ waf configure
"""
top = '.'
out = 'build'
from waflib.Configure import conf
@conf
def hi(ctx):
print('→ hello, world!')
# hi = conf(hi)
def configure(ctx):
ctx.hi()