Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 33 lines (26 sloc) 0.99 kb
0f0f59c @brianc initial experiment with libpq bindings
authored
1 import Options, Utils
2 from os import unlink, symlink, popen
b76ced7 begin type coercion for libpq
bmc authored
3 from os.path import exists
0f0f59c @brianc initial experiment with libpq bindings
authored
4
5 srcdir = '.'
6 blddir = 'build'
7 VERSION = '0.0.1'
8
9 def set_options(opt):
10 opt.tool_options('compiler_cxx')
11
12 def configure(conf):
13 conf.check_tool('compiler_cxx')
14 conf.check_tool('node_addon')
15
16 pg_config = conf.find_program('pg_config', var='PG_CONFIG', mandatory=True)
17 pg_libdir = popen("%s --libdir" % pg_config).readline().strip()
18 conf.env.append_value("LIBPATH_PG", pg_libdir)
19 conf.env.append_value("LIB_PG", "pq")
20 pg_includedir = popen("%s --includedir" % pg_config).readline().strip()
21 conf.env.append_value("CPPPATH_PG", pg_includedir)
22
23 def build(bld):
24 obj = bld.new_task_gen('cxx', 'shlib', 'node_addon')
25 obj.cxxflags = ["-g", "-D_LARGEFILE_SOURCE", "-Wall"]
26 obj.target = 'binding'
27 obj.source = "./src/binding.cc"
28 obj.uselib = "PG"
29
30 def test(test):
c321151 @brianc cleaned up file structure & improved evented query api compat
authored
31 Utils.exec_command("node test/native/connection-tests.js")
32 Utils.exec_command("node test/native/evented-api-tests.js")
Something went wrong with that request. Please try again.