Fix installing pickle5-backport for Python 3.8.2 (#8453)

This commit is contained in:
Hao Chen 2020-05-19 08:03:13 +08:00 committed by GitHub
parent 5b330de182
commit 6c5ea32857
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -135,7 +135,8 @@ if [ "$RAY_BUILD_PYTHON" == "YES" ]; then
pickle5_available=0
pickle5_path="$ROOT_DIR/python/ray/pickle5_files"
# Check if the current Python alrady has pickle5 (either comes with newer Python versions, or has been installed by us before).
if PYTHONPATH="$pickle5_path:$PYTHONPATH" "$PYTHON_EXECUTABLE" -s -c "import pickle5" 2>/dev/null; then
check_pickle5_command="import sys\nif sys.version_info < (3, 8, 2): import pickle5;"
if PYTHONPATH="$pickle5_path:$PYTHONPATH" "$PYTHON_EXECUTABLE" -s -c "exec(\"$check_pickle5_command\")" 2>/dev/null; then
pickle5_available=1
fi
if [ 1 -ne "${pickle5_available}" ]; then