[SPARK-34010][SQL][DODCS] Use python3 instead of python in SQL documentation build

### What changes were proposed in this pull request?

This PR proposes to use python3 instead of python in SQL documentation build.
After SPARK-29672, we use `sql/create-docs.sh` everywhere in Spark dev. We should fix it in `sql/create-docs.sh` too.
This blocks release because the release container does not have `python` but only `python3`.

### Why are the changes needed?

To unblock the release.

### Does this PR introduce _any_ user-facing change?

No, dev-only.

### How was this patch tested?

I manually ran the script

Closes #31041 from HyukjinKwon/SPARK-34010.

Authored-by: HyukjinKwon <gurwls223@apache.org>
Signed-off-by: HyukjinKwon <gurwls223@apache.org>
This commit is contained in:
HyukjinKwon 2021-01-05 19:48:10 +09:00
parent acf0a4fac2
commit 8d09f96495

View file

@ -27,14 +27,14 @@ set -e
FWDIR="$(cd "`dirname "${BASH_SOURCE[0]}"`"; pwd)" FWDIR="$(cd "`dirname "${BASH_SOURCE[0]}"`"; pwd)"
SPARK_HOME="$(cd "`dirname "${BASH_SOURCE[0]}"`"/..; pwd)" SPARK_HOME="$(cd "`dirname "${BASH_SOURCE[0]}"`"/..; pwd)"
if ! hash python 2>/dev/null; then if ! hash python3 2>/dev/null; then
echo "Missing python in your path, skipping SQL documentation generation." echo "Missing python3 in your path, skipping SQL documentation generation."
exit 0 exit 0
fi fi
if ! hash mkdocs 2>/dev/null; then if ! hash mkdocs 2>/dev/null; then
echo "Missing mkdocs in your path, trying to install mkdocs for SQL documentation generation." echo "Missing mkdocs in your path, trying to install mkdocs for SQL documentation generation."
pip install mkdocs pip3 install mkdocs
fi fi
pushd "$FWDIR" > /dev/null pushd "$FWDIR" > /dev/null