confmap_example.txt 513 B

12345678910111213141516171819202122
  1. The configuration methods `@conf` are bound to the configuration context, and to the build context::
  2. @waflib.Configure.conf
  3. def find_program(ctx):
  4. pass
  5. def configure(conf):
  6. conf.find_program(...)
  7. The object `conf.env` is usually modified during the execution. If several methods have to be called, then
  8. a transaction should be used, for example::
  9. def configure(conf):
  10. conf.env.stash()
  11. try:
  12. conf.find_program('strip')
  13. conf.env.append_value('CFLAGS', '-O3')
  14. finally:
  15. conf.env.revert()