Update PyYAML in generate_project.sh if needed (#25563)

This commit is contained in:
Lidi Zheng 2021-02-25 13:35:14 -08:00 committed by GitHub
parent 013e339761
commit 4a90992d03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -18,6 +18,12 @@ set -e
export TEST=${TEST:-false}
YAML_OK=$(python3 -c "import yaml; print(yaml.__version__.split('.') >= ['5', '4', '1'])")
if [[ ${YAML_OK} != "True" ]]; then
python3 -m pip install --upgrade --ignore-installed PyYAML==5.4.1 --user
fi
echo "Generating build_autogenerated.yaml from bazel BUILD file"
rm -f build_autogenerated.yaml
python3 tools/buildgen/extract_metadata_from_bazel_xml.py