Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
40 lines (32 sloc) 1.18 KB
import Options
from os import unlink, symlink, popen
from os.path import exists, abspath
from shutil import copy
srcdir = '.'
blddir = 'build'
VERSION = '0.0.1'
def set_options(opt):
def configure(conf):
conf.env.append_value("LIBPATH_BSON", abspath("./mongo-c-driver/"))
conf.env.append_value("LIB_BSON", "bson")
conf.env.append_value("CPPPATH_BSON", abspath("./mongo-c-driver/src"))
conf.env.append_value("LIBPATH_MONGO", abspath("./mongo-c-driver/"))
conf.env.append_value("LIB_MONGO", "mongoc")
conf.env.append_value("CPPPATH_MONGO", abspath("./mongo-c-driver/src"))
def build(bld):
mongo = bld.new_task_gen('cxx', 'shlib', 'node_addon')
mongo.cxxflags = "-g" = 'mongo'
mongo.source = "src/ src/"
mongo.uselib = "MONGO BSON"
def shutdown():
# HACK to get binding.node out of build directory.
# better way to do this?
if Options.commands['clean']:
if exists('mongo.node'): unlink('mongo.node')
if exists('build/default/mongo.node') and not exists('mongo.node'):
copy('build/default/mongo.node', 'lib/mongo.node')
Something went wrong with that request. Please try again.