wtools  3.2.0-pre1
ESO waf tools
Examples

Basic project

Consider this project layout with a single module fooBar within the package baz.

    .                       
    |-- baz                 # package baz
    |   |-- fooBar          # module fooBar
    |   |   |-- src         # source directory for fooBar
    |   |   `-- wscript     # module wscript
    |   `-- wscript         # package wscript
    |-- wtools              # wtools waf-extensions
    `-- wscript             # top level wscript (Project)

In this example wscript we declare a package by giving it a name, version and where to recurse into. The recurse pattern supports basic globbing, c.f. recurse.

# ./wscript
from wtools import project
def configure(cnf):
# External dependencies are configured here
pass
project.declare_project(name='example',
version='1.0-dev',
requires='cxx', # required features the project needs
recurse='foo')

The baz package wscript is even simpler:

# ./baz/wscript
from wtools import package
package.declare_package(recurse='*')

In simple use cases the fooBar-module wscript simply contains information of which type of module it is. In this example it is a C/C++ program.

# ./baz/fooBar/wscript
from wtools import module
module.declare_cprogram()