浏览代码

ZOOKEEPER-3433: zkpython build broken after maven migration

Fixed the build and test infrastructure for zkpython.

Verified the build and tests all passing under both ubuntu and macos.

Change-Id: I3c80774a2712f280d1f14739d1eb78baa066fdc6

Author: Patrick Hunt <phunt@apache.org>

Reviewers: Norbert Kalmar <nkalmar@apache.org>

Closes #991 from phunt/zk3433
Patrick Hunt 5 年之前
父节点
当前提交
2711d69297

+ 2 - 2
zookeeper-contrib/zookeeper-contrib-zkpython/src/python/setup.py

@@ -16,10 +16,10 @@
 
 from distutils.core import setup, Extension
 
-zookeeper_basedir = "../../../"
+zookeeper_basedir = "../../"
 
 zookeepermodule = Extension("zookeeper",
-                            sources=["zookeeper-client/zookeeper-client-c/zookeeper.c"],
+                            sources=["src/c/zookeeper.c"],
                             include_dirs=[zookeeper_basedir + "/zookeeper-client/zookeeper-client-c/include",
                                           zookeeper_basedir + "/build/c",
                                           zookeeper_basedir + "/zookeeper-client/zookeeper-client-c/generated"],

+ 2 - 2
zookeeper-contrib/zookeeper-contrib-zkpython/src/test/run_tests.sh

@@ -30,9 +30,9 @@ else
 fi
 
 # Find the build directory containing zookeeper.so
-SO_PATH=`find ../../../build/ -name "zookeeper.so" | head -1`
+SO_PATH=`find ../../build/ -name "zookeeper.so" | head -1`
 PYTHONPATH=`dirname $SO_PATH`
-LIB_PATH=../../c/.libs/:../../../build/test/test-cppunit/.libs
+LIB_PATH=../../build/c/.libs/:../../build/test/test-cppunit/.libs
 for test in `ls $1/*_test.py`; 
 do
     echo "Running $test"

+ 1 - 1
zookeeper-contrib/zookeeper-contrib-zkpython/src/test/zkServer.sh

@@ -34,7 +34,7 @@ fi
 
 if [ "x${base_dir}" == "x" ]	
 then
-zk_base="../../../"
+zk_base="../../"
 else
 zk_base="${base_dir}"
 fi