Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
38 lines (28 sloc) 1.02 KB
import os
srcdir = os.path.abspath('.')
blddir = 'build'
target = 'ceoip'
VERSION = '0.0.1'
def set_options(opt):
def configure(conf):
conf.check_cxx(lib='GeoIP', mandatory=True, uselib_store='GeoIP',
libpath=['/lib', '/usr/lib', '/usr/local/lib', '/opt/local/lib'])
def build(context, target=target):
obj = context.new_task_gen('cxx', 'shlib', 'node_addon')
obj.uselib = 'GeoIP'
obj.source = 'src/' = target
obj.cxxflags = ['-I/opt/local/include']
def move_addon(context, target=target):
"""Move the compiled addon to the local lib directory. Previously compiled
versions of the addon are overwritten.
filename = '%s.node' % target
from_path = os.path.join(srcdir, blddir, 'default', filename)
to_path = os.path.join(srcdir, 'lib', filename)
if os.path.exists(from_path):
os.rename(from_path, to_path)
Jump to Line
Something went wrong with that request. Please try again.