Commit 0c1ef36b authored by Tammo Jan Dijkema's avatar Tammo Jan Dijkema

Task #11556: Incorporate review comments

parent facb43aa
......@@ -63,12 +63,16 @@ if("${Boost_FIND_COMPONENTS}" MATCHES "python")
find_package(Python)
if(PYTHON_FOUND)
if(PYTHON_VERSION_MAJOR GREATER 2)
# TODO: add support for CentOS7 here (name should be python3 there)
if(APPLE)
# On apple (homebrew), boost-python for python 3 is called boost-python3
string(REPLACE "python" "python3" Boost_FIND_COMPONENTS "${Boost_FIND_COMPONENTS}")
string(REPLACE "python" "python3"
Boost_FIND_COMPONENTS "${Boost_FIND_COMPONENTS}")
else(APPLE)
# On ubuntu, boost-python for python 3 is called e.g. boost-python-py35
string(REPLACE "python" "python-py${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}" Boost_FIND_COMPONENTS "${Boost_FIND_COMPONENTS}")
string(REPLACE "python"
"python-py${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}"
Boost_FIND_COMPONENTS "${Boost_FIND_COMPONENTS}")
endif(APPLE)
endif(PYTHON_VERSION_MAJOR GREATER 2)
else(PYTHON_FOUND)
......
......@@ -197,7 +197,7 @@
# If there is a .py file then use it.
# Force unbuffered output to give the same behavior in python3 and python2
if [ -f "$PROG.py" ]; then
COMMAND="${PYTHON_EXECUTABLE} -u $PROG.py"
COMMAND="${PYTHON_EXECUTABLE:-python} -u $PROG.py"
LOFAR_CHECKTOOL=
fi
......
......@@ -43,12 +43,7 @@ export LD_LIBRARY_PATH
PYTHONPATH="@srcdir@:@PYTHON_BUILD_DIR@:${PYTHONPATH}"; export PYTHONPATH
# Set the Python interpreter to the one found by CMake
PYTHON_EXECUTABLE="@PYTHON_EXECUTABLE@"
# Fall back to just "python"
case $PYTHON_EXECUTABLE in
("") PYTHON_EXECUTABLE="python"
esac
export PYTHON_EXECUTABLE
PYTHON_EXECUTABLE="@PYTHON_EXECUTABLE@"; export PYTHON_EXECUTABLE
# Start CMake/testscripts/runtest.sh
"@LOFAR_ROOT@/CMake/testscripts/runtest.sh" "$@"
......
......@@ -175,7 +175,7 @@
#cmakedefine HAVE_WCSLIB 1
/* Define if python3 is installed */
#cmakedefine PYTHON_VERSION_MAJOR ${PYTHON_VERSION_MAJOR}
#cmakedefine PYTHON_VERSION_MAJOR @PYTHON_VERSION_MAJOR@
/*-------------------------------------------------------------------------*\
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment