Sophie

Sophie

distrib > Fedora > 14 > i386 > by-pkgid > 42620103d8ee8a2d972d3103bad0ab73 > files > 204

waf-1.5.19-1.fc14.noarch.rpm

#! /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')