fix run-tests' PYTHONPATH
authorRobin Farine <robin.farine@terminus.org>
Sun, 27 Nov 2005 16:37:18 +0100
changeset 1558 651690fe6be3
parent 1557 f7d9823e65df
child 1560 6efad1cc07de
fix run-tests' PYTHONPATH Specify the installation directory for python modules so we can set PYTHONPATH without guessing.
tests/run-tests
--- a/tests/run-tests	Wed Nov 23 18:36:44 2005 +0100
+++ b/tests/run-tests	Sun Nov 27 16:37:18 2005 +0100
@@ -40,16 +40,11 @@
 }
 
 TESTDIR="$PWD"
-
-if [ -d /usr/lib64 ]; then
-    lib=lib64
-else
-    lib=lib
-fi
-
 INST="$HGTMP/install"
+PYTHONDIR="$INST/lib/python"
 cd ..
-if ${PYTHON-python} setup.py install --home="$INST" > tests/install.err 2>&1
+if ${PYTHON-python} setup.py install --home="$INST" \
+  --install-lib="$PYTHONDIR" > tests/install.err 2>&1
 then
     rm tests/install.err
 else
@@ -59,8 +54,7 @@
 cd "$TESTDIR"
 
 PATH="$INST/bin:$PATH"; export PATH
-PYTHONPATH="$INST/$lib/python"; export PYTHONPATH
-
+PYTHONPATH="$PYTHONDIR"; export PYTHONPATH
 
 run_one() {
     rm -f "$1.err"