Author: phunt
Date: Thu Oct  1 21:37:36 2009
New Revision: 820808

URL: http://svn.apache.org/viewvc?rev=820808&view=rev
Log:
ZOOKEEPER-420. build/test should not require install in zkpython

Modified:
    hadoop/zookeeper/trunk/CHANGES.txt
    hadoop/zookeeper/trunk/src/contrib/zkpython/README
    hadoop/zookeeper/trunk/src/contrib/zkpython/build.xml
    hadoop/zookeeper/trunk/src/contrib/zkpython/src/python/setup.py
    hadoop/zookeeper/trunk/src/contrib/zkpython/src/test/run_tests.sh

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=820808&r1=820807&r2=820808&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Thu Oct  1 21:37:36 2009
@@ -57,13 +57,13 @@
 
   ZOOKEEPER-501. CnxManagerTest failed on hudson. (flavio via mahadev)
   
-  ZOOKEEPER-499. electionAlg should default to FLE (3) - regression (phunt via
-  mahadev) 
+  ZOOKEEPER-499. electionAlg should default to FLE (3) - regression
+  (phunt via mahadev) 
 
   ZOOKEEPER-477. zkCleanup.sh is flaky (fernando via mahadev)
 
-  ZOOKEEPER-498. Unending Leader Elections : WAN configuration (flavio via
-  mahadev)
+  ZOOKEEPER-498. Unending Leader Elections : WAN configuration
+  (flavio via mahadev)
 
   ZOOKEEPER-508. proposals and commits for DIFF and Truncate messages from the
   leader to the followers is buggy. (mahadev and ben via mahadev)
@@ -76,6 +76,9 @@
   ZOOKEEPER-535. ivy task does not enjoy being defined twice 
   (build error) (phunt via mahadev)
 
+  ZOOKEEPER-420. build/test should not require install in zkpython
+  (henry robinson via phunt)
+
 IMPROVEMENTS:
   ZOOKEEPER-473. cleanup junit tests to eliminate false positives due to
   "socket reuse" and failure to close client (phunt via mahadev)

Modified: hadoop/zookeeper/trunk/src/contrib/zkpython/README
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/contrib/zkpython/README?rev=820808&r1=820807&r2=820808&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/src/contrib/zkpython/README (original)
+++ hadoop/zookeeper/trunk/src/contrib/zkpython/README Thu Oct  1 21:37:36 2009
@@ -22,6 +22,12 @@
 
 To test, run ant test from the same directory. 
 
+You can compile the module without installing by running
+
+ant compile
+
+In order to use the module, zookeeper.so must be in your PYTHONPATH or in one 
of the directories referenced by sys.path. Running ant install should make sure 
that this is the case, but if you only run ant compile you probably need to add 
build/contrib/zkpython/* to PYTHONPATH to find the module. The C client 
libraries must be in a system library path, or LD_LIBRARY_PATH or 
DYLD_LIBRARY_PATH (Mac OS) for the module to work correctly, otherwise you will 
see a library not found error when trying to import the module. 
+
 NAMING CONVENTIONS:
 --------------------
 

Modified: hadoop/zookeeper/trunk/src/contrib/zkpython/build.xml
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/contrib/zkpython/build.xml?rev=820808&r1=820807&r2=820808&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/src/contrib/zkpython/build.xml (original)
+++ hadoop/zookeeper/trunk/src/contrib/zkpython/build.xml Thu Oct  1 21:37:36 
2009
@@ -27,7 +27,7 @@
   <property name="test.timeout" value="900000" />
 
   <target name="test"
-          depends="test-init,test-category,test-start,python-test,test-stop" />
+          
depends="compile,test-init,test-category,test-start,python-test,test-stop" />
        
     <target name="test-init" depends="checkMainCompiled">
         <delete dir="${test.log.dir}" />

Modified: hadoop/zookeeper/trunk/src/contrib/zkpython/src/python/setup.py
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/contrib/zkpython/src/python/setup.py?rev=820808&r1=820807&r2=820808&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/src/contrib/zkpython/src/python/setup.py (original)
+++ hadoop/zookeeper/trunk/src/contrib/zkpython/src/python/setup.py Thu Oct  1 
21:37:36 2009
@@ -23,7 +23,10 @@
                             include_dirs=[zookeeper_basedir + "/src/c/include",
                                           zookeeper_basedir + 
"/src/c/generated"],
                             libraries=["zookeeper_mt"],
-                            library_dirs=["/usr/local/lib"])
+                            library_dirs=[zookeeper_basedir + "/src/c/.libs/",
+                                          zookeeper_basedir + 
"/build/test/test-cppunit/.libs",
+                                          "/usr/local/lib"
+                                          ])
 
 setup( name="ZooKeeper",
        version = "0.4",

Modified: hadoop/zookeeper/trunk/src/contrib/zkpython/src/test/run_tests.sh
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/contrib/zkpython/src/test/run_tests.sh?rev=820808&r1=820807&r2=820808&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/src/contrib/zkpython/src/test/run_tests.sh (original)
+++ hadoop/zookeeper/trunk/src/contrib/zkpython/src/test/run_tests.sh Thu Oct  
1 21:37:36 2009
@@ -15,8 +15,13 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+
+# Find the build directory containing zookeeper.so
+SO_PATH=`find ../../../build/ -name "zookeeper.so" | head -1`
+PYTHONPATH=`dirname $SO_PATH`
+LIB_PATH=../../c/.libs/:../../../build/test/test-cppunit/.libs
 for test in `ls $1/*_test.py`; 
 do
     echo "Running $test"
-    python $test
-done
\ No newline at end of file
+    LD_LIBRARY_PATH=$LIB_PATH:$LD_LIBRARY_PATH 
DYLD_LIBRARY_PATH=$LIB_PATH:$DYLD_LIBRARY_PATH PYTHONPATH=$PYTHONPATH python 
$test
+done


Reply via email to