Add __commit__ field to ray package in wheels (#7305)

This commit is contained in:
Edward Oakes
2020-02-26 17:54:22 -08:00
committed by GitHub
parent 2ad9bc5684
commit ee0f71e398
5 changed files with 23 additions and 2 deletions
+7
View File
@@ -79,6 +79,13 @@ for ((i=0; i<${#PY_VERSIONS[@]}; ++i)); do
$PIP_CMD install -q numpy==$NUMPY_VERSION cython==0.29.0
# Install wheel to avoid the error "invalid command 'bdist_wheel'".
$PIP_CMD install -q wheel
# Set the commit SHA in __init__.py.
if [ -n "$TRAVIS_COMMIT" ]; then
sed -i.bak "s/{{RAY_COMMIT_SHA}}/$TRAVIS_COMMIT/g" ray/__init__.py && rm ray/__init__.py.bak
else
echo "TRAVIS_COMMIT variable not set - required to populated ray.__commit__."
exit 1
fi
# 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