Changes to build to fix creation of wheels. (#840)

* 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.
This commit is contained in:
Robert Nishihara
2017-08-21 17:49:35 -07:00
committed by Philipp Moritz
parent af71f9616e
commit be4beb19c1
11 changed files with 117 additions and 60 deletions
+7 -8
View File
@@ -44,21 +44,20 @@ for ((i=0; i<${#PY_VERSIONS[@]}; ++i)); do
curl $MACPYTHON_URL/$PY_VERSION/$PY_INST > $INST_PATH
sudo installer -pkg $INST_PATH -target /
# Create a link from "python" to the actual Python executable so that the
# Python on the path that Ray finds is the correct version.
if [ ! -e $MACPYTHON_PY_PREFIX/$PY_MM/bin/python ]; then
ln -s $MACPYTHON_PY_PREFIX/$PY_MM/bin/python$PY_MM $MACPYTHON_PY_PREFIX/$PY_MM/bin/python
fi
PYTHON_EXE=$MACPYTHON_PY_PREFIX/$PY_MM/bin/python
PYTHON_EXE=$MACPYTHON_PY_PREFIX/$PY_MM/bin/python$PY_MM
PIP_CMD="$(dirname $PYTHON_EXE)/pip$PY_MM"
pushd python
# Install setuptools_scm because otherwise when building the wheel for
# Python 3.6, we see an error.
$PIP_CMD install setuptools_scm
# Fix the numpy version because this will be the oldest numpy version we can
# support.
$PIP_CMD install numpy==1.10.4
$PIP_CMD install numpy==1.10.4 cython
# Install wheel to avoid the error "invalid command 'bdist_wheel'".
$PIP_CMD install wheel
# Add the correct Python to the path and build the wheel.
# Add the correct Python to the path and build the wheel. This is only
# needed so that the installation finds the cython executable.
PATH=$MACPYTHON_PY_PREFIX/$PY_MM/bin:$PATH $PYTHON_EXE setup.py bdist_wheel
mv dist/*.whl ../.whl/
popd