From aaffaee38b7e015b7551f27aab03eb26373c7775 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 28 Feb 2018 22:22:03 +0800 Subject: [PATCH] qa/run-standalone.sh: set PYTHONPATH for FreeBSD also do not set PYTHONPATH=/usr/lib/python2.7/dist-packages anymore, it will be overridden later on anyway. Signed-off-by: Kefu Chai --- qa/run-standalone.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/qa/run-standalone.sh b/qa/run-standalone.sh index 90913089152..1dfe7dd6caf 100755 --- a/qa/run-standalone.sh +++ b/qa/run-standalone.sh @@ -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" -- 2.47.3