mirror of
https://github.com/vale981/ray
synced 2025-03-06 02:21:39 -05:00

* Pass DPYTHON_EXECUTABLE into cmake for arrow and for ray. * Add cython to setup.py install_requires. * Revert custom code for finding python in cmake. * Correctly find arrow on CentOS. * In cmake, don't find PythonLibs, just find PYTHON_INCLUDE_DIRS. * Fix typo. * Do not use boost shared libraries when building arrow. * Add six to the setup.py install_requires because it is needed by pyarrow. * Don't link numbuf against boost_system and boost_filesystem. * Compile boost when we are on Linux. * Make numbuf find the correct boost libraries. * Only use find_package Boost on Linux, suppress output when building boost. * Changes to wheel building scripts, install cython in mac script. * Compile flatbuffers ourselves on Linux and pass it in when compiling Arrow. * Clean up build_flatbuffers.sh and build_boost.sh scripts a little. * Install cython when building linux wheel.
60 lines
1.6 KiB
Bash
Executable file
60 lines
1.6 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -x
|
|
|
|
# Cause the script to exit if a single command fails.
|
|
set -e
|
|
|
|
ROOT_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd)
|
|
|
|
if [[ -z "$1" ]]; then
|
|
PYTHON_EXECUTABLE=`which python`
|
|
else
|
|
PYTHON_EXECUTABLE=$1
|
|
fi
|
|
echo "Using Python executable $PYTHON_EXECUTABLE."
|
|
|
|
# Determine how many parallel jobs to use for make based on the number of cores
|
|
unamestr="$(uname)"
|
|
if [[ "$unamestr" == "Linux" ]]; then
|
|
PARALLEL=$(nproc)
|
|
elif [[ "$unamestr" == "Darwin" ]]; then
|
|
PARALLEL=$(sysctl -n hw.ncpu)
|
|
else
|
|
echo "Unrecognized platform."
|
|
exit 1
|
|
fi
|
|
|
|
pushd "$ROOT_DIR/src/common/thirdparty/"
|
|
bash build-redis.sh
|
|
popd
|
|
|
|
bash "$ROOT_DIR/src/thirdparty/download_thirdparty.sh"
|
|
bash "$ROOT_DIR/src/thirdparty/build_thirdparty.sh" $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
|
|
BOOST_ROOT=$TP_DIR/boost \
|
|
PKG_CONFIG_PATH=$ARROW_HOME/lib/pkgconfig \
|
|
cmake -DCMAKE_BUILD_TYPE=Debug \
|
|
-DPYTHON_EXECUTABLE:FILEPATH=$PYTHON_EXECUTABLE \
|
|
../../..
|
|
else
|
|
BOOST_ROOT=$TP_DIR/boost \
|
|
PKG_CONFIG_PATH=$ARROW_HOME/lib/pkgconfig \
|
|
cmake -DCMAKE_BUILD_TYPE=Release \
|
|
-DPYTHON_EXECUTABLE:FILEPATH=$PYTHON_EXECUTABLE \
|
|
../../..
|
|
fi
|
|
make clean
|
|
make -j${PARALLEL}
|
|
popd
|
|
|
|
# Move stuff from Arrow to Ray.
|
|
|
|
mv $ROOT_DIR/src/thirdparty/arrow/cpp/build/release/plasma_store $ROOT_DIR/python/ray/core/src/plasma/
|