wscript
author Dmitriy Morozov <dmitriy@mrzv.org>
Mon, 11 Jan 2010 08:31:31 -0800
changeset 10 f702cd835ca4
parent 3 242b36ad34e8
permissions -rw-r--r--
Added LGPL sentence and header to clarify the terms, on Rosen Diankov's request

#!/usr/bin/env python

import Configure

APPNAME     = 'pyANN'
srcdir      = '.'
blddir      = 'build'

def set_options(opt):
    opt.tool_options('compiler_cxx')
    opt.tool_options('python')
    opt.tool_options('boost')

def configure(conf):
    conf.check_tool('boost')
    conf.check_tool('compiler_cxx')
    conf.check_tool('python')
    conf.check_python_version((2,6,0))
    conf.check_python_headers()

    conf.check(header_name = "ANN/ANN.h", mandatory = True)
    conf.check(lib = 'ANN', mandatory = True)

def build(bld):
    bld.new_task_gen(features       = 'cxx cshlib pyext', 
                     source         = 'ann-kd-tree.cpp pyann.cpp',
                     target         = 'pyANN',
                     cxxflags       = '-O3',
                     lib            = ['ANN', 'boost_python'],
                     install_path   = bld.env['PYTHONDIR'])