]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/run-standalone.sh: set PYTHONPATH for FreeBSD also 20646/head
authorKefu Chai <kchai@redhat.com>
Wed, 28 Feb 2018 14:22:03 +0000 (22:22 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 28 Feb 2018 14:30:32 +0000 (22:30 +0800)
do not set PYTHONPATH=/usr/lib/python2.7/dist-packages anymore, it will
be overridden later on anyway.

Signed-off-by: Kefu Chai <kchai@redhat.com>
qa/run-standalone.sh

index 9091308915224634f869c9f893983d384e3ed428..1dfe7dd6caf4bcdb36d42805191200f93c7c1214 100755 (executable)
@@ -17,7 +17,7 @@ function get_cmake_variable() {
     grep "$variable" CMakeCache.txt | cut -d "=" -f 2
 }
 
-function cython_module_path() {
+function get_python_path() {
     local ceph_lib=$1
     shift
     local py_ver=$(get_cmake_variable MGR_PYTHON_VERSION | cut -d '.' -f1)
@@ -28,17 +28,17 @@ function cython_module_path() {
             py_ver=3
         fi
     fi
-    echo $ceph_lib/cython_modules/lib.$py_ver
+    echo $(realpath ../src/pybind):$ceph_lib/cython_modules/lib.$py_ver
 }
 
 if [ `uname` = FreeBSD ]; then
     # otherwise module prettytable will not be found
-    export PYTHONPATH=/usr/local/lib/python2.7/site-packages
+    export PYTHONPATH=$(get_python_path):/usr/local/lib/python2.7/site-packages
     exec_mode=+111
     KERNCORE="kern.corefile"
     COREPATTERN="core.%N.%P"
 else
-    export PYTHONPATH=/usr/lib/python2.7/dist-packages
+    export PYTHONPATH=$(get_python_path)
     exec_mode=/111
     KERNCORE="kernel.core_pattern"
     COREPATTERN="core.%e.%p.%t"
@@ -123,7 +123,6 @@ do
         if ! PATH=$PATH:bin \
            CEPH_ROOT=.. \
            CEPH_LIB=lib \
-           PYTHONPATH=$(realpath ../src/pybind):$(cython_module_path lib) \
            LOCALRUN=yes \
            $cmd ; then
           echo "$f .............. FAILED"