Permalink
Browse files

move to zookeeper 3.4.0

  • Loading branch information...
1 parent 1dbeb60 commit 089c83ba179af5994871b457c63ef249960c0343 Dave Dopson committed Dec 1, 2011
Showing with 13 additions and 18 deletions.
  1. +13 −18 wscript
View
31 wscript
@@ -4,29 +4,20 @@ import platform
srcdir = "."
blddir = "build"
APPNAME = "zookeeper"
-VERSION = "3.3.3-1"
@Woodya

Woodya Dec 16, 2011

Collaborator

You've changed the meaning of VERSION from version of the module, to version of zookeeper library.

it was never used, so i guess it was kind of ambiguous, i think it was just not knowing if node-waf needed that variable for some reason or what.
anyway, it should be named ZVERSION or something to indicate that it is, in fact, not the module version, but the zk lib version.

@ddopson

ddopson Dec 16, 2011

Collaborator

Ah, it was ambiguous. I thought it was the zk version.

You make a good sugestion.

+VERSION = "3.4.0"
OSTYPE = platform.system()
-includes = ['/usr/local/include/c-client-src']
-libpaths = ['/usr/local/lib']
-
def set_options(opt):
- opt.add_option('-z','--zookeeper', action='store', default='zookeeper-3.3.3', help='build zookeeper', dest='zookeeper')
+ opt.add_option('-z','--zookeeper', action='store', default='zookeeper-' + VERSION, help='build zookeeper', dest='zookeeper')
opt.tool_options("compiler_cxx")
def configure(conf):
conf.check_tool("compiler_cxx")
conf.check_tool("node_addon")
def zookeeper(ctx, z):
- global includes
- global libpaths
t = ctx.bdir + '/zk'
- includes = [t + "/include/c-client-src"]
- libpaths = [t + "/lib"]
- if z == None:
- z = 'zookeeper-3.3.3'
if z.find('/') == -1:
tgz = z + '.tar.gz'
r = ctx.exec_command("if [ ! -d '%s' -a ! -f '%s' ] ; then curl --silent --write-out '%%{http_code}' --output %s 'http://apache.mirrors.tds.net/zookeeper/%s/%s' | grep -v 404 ; fi" % (z,tgz,tgz,z,tgz))
@@ -37,19 +28,23 @@ def zookeeper(ctx, z):
ctx.exec_command("if [ ! -d '%s' ] ; then tar -xzvf %s ; fi" % (z,tgz))
# We use "--without-shared" to force building/linking only the static libzookeeper.a library, else we would have unresolved runtime dependencies
- # We also use "--disable-shared" because on a newer version of the zk source (maybe 3.3.1 vs 3.3.0???), "--without-shared" is no longer recognized. no idea why / wtf is going on here. but it works. and the other one gets silently ignored. keeping both in the code to cover all our bases
+ # We also use "--disable-shared" because on a newer version of the zk source (maybe 3.3.1 vs 3.3.0???), "--without-shared" is no longer recognized.
+ # no idea why / wtf is going on here. but it works. and the other one gets silently ignored. keeping both in the code to cover all our bases
# We use "--with-pic" to make position-independent code that can be statically linked into a shared object file (zookeeper.node)
ctx.exec_command("mkdir -p zk ; cd %s/src/c && ./configure --without-syncapi --without-shared --disable-shared --with-pic --prefix=%s && make clean install"%(z,t))
def build(bld):
- global includes
- global libpaths
+ # for quicker development, run with "--zookeeper=" to skip rebuilding the zookeeper source (99% of build time)
if Options.options.zookeeper != '':
zookeeper(bld, Options.options.zookeeper)
- else:
- # for quicker development, run with "--zookeeper=" to skip rebuilding the zookeeper source (99% of build time)
- includes = [bld.bdir + '/zk/include/c-client-src']
- libpaths = [bld.bdir + '/zk/lib']
+
+ includes = [
+ bld.bdir + '/zk/include/zookeeper', # zookeeper 3.4.x (local)
+ bld.bdir + '/zk/include/c-client-src', # zookeeper 3.3.x (local)
+ # '/usr/local/include/zookeeper', # zookeeper 3.4.x (system)
+ # '/usr/local/include/c-client-src' # zookeeper 3.3.x (system)
+ ]
+ libpaths = [bld.bdir + '/zk/lib', '/usr/local/lib']
obj = bld.new_task_gen("cxx", "shlib", "node_addon")
if OSTYPE == 'Darwin':

0 comments on commit 089c83b

Please sign in to comment.