#! /usr/bin/env python # encoding: utf-8 # Gustavo Carneiro, 2007 import sys import Configure VERSION='0.0.1' APPNAME='python_test' top = '.' out = '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( features = 'py') obj.find_sources_in_dirs('.', exts=['.py']) # then a c extension module bld( features = 'cc cshlib pyext', source = 'spammodule.c', target = 'spam') # then a c program bld( features = 'cc cprogram pyembed', source = 'test.c', target = 'test')