#! /usr/bin/env python # encoding: utf-8 # Gustavo Carneiro, 2007 import sys import Configure # the following two variables are used by the target "waf dist" VERSION='0.0.1' APPNAME='python_test' # these variables are mandatory ('/' are converted automatically) srcdir = '.' blddir = 'build' def set_options(opt): opt.tool_options('python') # options for disabling pyc or pyo compilation opt.tool_options('compiler_cc') def configure(conf): conf.check_tool('compiler_cc') conf.check_tool('python') conf.check_python_version((2,4,2)) conf.check_python_headers() try: conf.check_python_module('pygccxml') except Configure.ConfigurationError: print "(module pygccxml not found, but we ignore it)" def build(bld): # first compile a few pyc and pyo files obj = bld.new_task_gen( features = 'py') obj.find_sources_in_dirs('.', exts=['.py']) # then a c extension module bld.new_task_gen( features = 'cc cshlib pyext', source = 'spammodule.c', target = 'spam') # then a c program bld.new_task_gen( features = 'cc cprogram pyembed', source = 'test.c', target = 'test')