author | Dmitriy Morozov <dmitriy@mrzv.org> |
Thu, 18 Jun 2009 13:03:18 -0700 (2009-06-18) | |
changeset 4 | d88e548a9aeb |
parent 3 | 242b36ad34e8 |
permissions | -rw-r--r-- |
3
242b36ad34e8
Added wscript for building and installing with waf
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff
changeset
|
1 |
#!/usr/bin/env python |
242b36ad34e8
Added wscript for building and installing with waf
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff
changeset
|
2 |
|
242b36ad34e8
Added wscript for building and installing with waf
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff
changeset
|
3 |
import Configure |
242b36ad34e8
Added wscript for building and installing with waf
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff
changeset
|
4 |
|
242b36ad34e8
Added wscript for building and installing with waf
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff
changeset
|
5 |
APPNAME = 'pyANN' |
242b36ad34e8
Added wscript for building and installing with waf
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff
changeset
|
6 |
srcdir = '.' |
242b36ad34e8
Added wscript for building and installing with waf
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff
changeset
|
7 |
blddir = 'build' |
242b36ad34e8
Added wscript for building and installing with waf
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff
changeset
|
8 |
|
242b36ad34e8
Added wscript for building and installing with waf
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff
changeset
|
9 |
def set_options(opt): |
242b36ad34e8
Added wscript for building and installing with waf
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff
changeset
|
10 |
opt.tool_options('compiler_cxx') |
242b36ad34e8
Added wscript for building and installing with waf
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff
changeset
|
11 |
opt.tool_options('python') |
242b36ad34e8
Added wscript for building and installing with waf
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff
changeset
|
12 |
opt.tool_options('boost') |
242b36ad34e8
Added wscript for building and installing with waf
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff
changeset
|
13 |
|
242b36ad34e8
Added wscript for building and installing with waf
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff
changeset
|
14 |
def configure(conf): |
242b36ad34e8
Added wscript for building and installing with waf
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff
changeset
|
15 |
conf.check_tool('boost') |
242b36ad34e8
Added wscript for building and installing with waf
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff
changeset
|
16 |
conf.check_tool('compiler_cxx') |
242b36ad34e8
Added wscript for building and installing with waf
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff
changeset
|
17 |
conf.check_tool('python') |
242b36ad34e8
Added wscript for building and installing with waf
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff
changeset
|
18 |
conf.check_python_version((2,6,0)) |
242b36ad34e8
Added wscript for building and installing with waf
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff
changeset
|
19 |
conf.check_python_headers() |
242b36ad34e8
Added wscript for building and installing with waf
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff
changeset
|
20 |
|
242b36ad34e8
Added wscript for building and installing with waf
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff
changeset
|
21 |
conf.check(header_name = "ANN/ANN.h", mandatory = True) |
242b36ad34e8
Added wscript for building and installing with waf
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff
changeset
|
22 |
conf.check(lib = 'ANN', mandatory = True) |
242b36ad34e8
Added wscript for building and installing with waf
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff
changeset
|
23 |
|
242b36ad34e8
Added wscript for building and installing with waf
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff
changeset
|
24 |
def build(bld): |
242b36ad34e8
Added wscript for building and installing with waf
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff
changeset
|
25 |
bld.new_task_gen(features = 'cxx cshlib pyext', |
242b36ad34e8
Added wscript for building and installing with waf
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff
changeset
|
26 |
source = 'ann-kd-tree.cpp pyann.cpp', |
242b36ad34e8
Added wscript for building and installing with waf
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff
changeset
|
27 |
target = 'pyANN', |
242b36ad34e8
Added wscript for building and installing with waf
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff
changeset
|
28 |
cxxflags = '-O3', |
242b36ad34e8
Added wscript for building and installing with waf
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff
changeset
|
29 |
lib = ['ANN', 'boost_python'], |
242b36ad34e8
Added wscript for building and installing with waf
Dmitriy Morozov <dmitriy@mrzv.org>
parents:
diff
changeset
|
30 |
install_path = bld.env['PYTHONDIR']) |