Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qa/run-standalone.sh: set PYTHONPATH for FreeBSD also #20646

Merged
merged 1 commit into from Feb 28, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 4 additions & 5 deletions qa/run-standalone.sh
Expand Up @@ -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)
Expand All @@ -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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wjwithagen FWIW, i am not trying to address the py3 support on FreeBSD, so i am leaving "python2.7" as it is.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tchaikov
Oke, that is fine. This could be some trouble in the (near) future when everything starts to do python3 as preferred. Fortunately this is only executed during manual runs and as such, mostly by devs. And we will fix it there if needed. Finding Prettytable during TOX was already separately fixed in a config.
Will need a working FreeBSD-jenkins before I can test this.

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"
Expand Down Expand Up @@ -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"
Expand Down