mirror of
https://github.com/vale981/ray
synced 2025-03-06 02:21:39 -05:00
Add correct Python executable to Path when building arrow. (#820)
* Tell cmake which python to use when building arrow. * Pass different path into cmake when building arrow so that cmake finds the right python. * Add correct python executable to PATH when running cmake for ray.
This commit is contained in:
parent
0225581078
commit
3071ba0070
2 changed files with 21 additions and 4 deletions
18
build.sh
18
build.sh
|
@ -32,17 +32,27 @@ popd
|
|||
bash "$ROOT_DIR/src/thirdparty/download_thirdparty.sh"
|
||||
bash "$ROOT_DIR/src/thirdparty/build_thirdparty.sh" $PYTHON_EXECUTABLE
|
||||
|
||||
# Get the directory of the Python executable.
|
||||
PYTHON_EXECUTABLE_DIR=$(dirname $PYTHON_EXECUTABLE)
|
||||
|
||||
# Now build everything.
|
||||
pushd "$ROOT_DIR/python/ray/core"
|
||||
# We use these variables to set PKG_CONFIG_PATH, which is important so that
|
||||
# in cmake, pkg-config can find plasma.
|
||||
TP_DIR=$ROOT_DIR/src/thirdparty
|
||||
ARROW_HOME=$TP_DIR/arrow/cpp/build/cpp-install
|
||||
if [ "$VALGRIND" = "1" ]
|
||||
then
|
||||
PKG_CONFIG_PATH=$ARROW_HOME/lib/pkgconfig cmake -DCMAKE_BUILD_TYPE=Debug ../../..
|
||||
if [[ "$VALGRIND" = "1" ]]; then
|
||||
# Pass a slightly different path into this command so that cmake finds the
|
||||
# right Python interpreter and libraries.
|
||||
PATH=$PYTHON_EXECUTABLE_DIR:$PATH \
|
||||
PKG_CONFIG_PATH=$ARROW_HOME/lib/pkgconfig \
|
||||
cmake -DCMAKE_BUILD_TYPE=Debug ../../..
|
||||
else
|
||||
PKG_CONFIG_PATH=$ARROW_HOME/lib/pkgconfig cmake -DCMAKE_BUILD_TYPE=Release ../../..
|
||||
# Pass a slightly different path into this command so that cmake finds the
|
||||
# right Python interpreter and libraries.
|
||||
PATH=$PYTHON_EXECUTABLE_DIR:$PATH \
|
||||
PKG_CONFIG_PATH=$ARROW_HOME/lib/pkgconfig \
|
||||
cmake -DCMAKE_BUILD_TYPE=Release ../../..
|
||||
fi
|
||||
make clean
|
||||
make -j${PARALLEL}
|
||||
|
|
7
src/thirdparty/build_thirdparty.sh
vendored
7
src/thirdparty/build_thirdparty.sh
vendored
|
@ -31,6 +31,13 @@ cd $TP_DIR/arrow/cpp
|
|||
mkdir -p $TP_DIR/arrow/cpp/build
|
||||
cd $TP_DIR/arrow/cpp/build
|
||||
export ARROW_HOME=$TP_DIR/arrow/cpp/build/cpp-install
|
||||
|
||||
# Get the directory of the Python executable.
|
||||
PYTHON_EXECUTABLE_DIR=$(dirname $PYTHON_EXECUTABLE)
|
||||
|
||||
# Pass a slightly different path into this command so that cmake finds the right
|
||||
# Python interpreter and libraries.
|
||||
PATH=$PYTHON_EXECUTABLE_DIR:$PATH \
|
||||
cmake -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_C_FLAGS="-g -O3" \
|
||||
-DCMAKE_CXX_FLAGS="-g -O3" \
|
||||
|
|
Loading…
Add table
Reference in a new issue