Switch .py shebang to python3 (#28963)

* switch shebang to python3

* prepare_build_macos: install latest available patch for each python
pull/28125/head
Jan Tattermusch 3 years ago committed by GitHub
parent 267d0b550f
commit a3be072605
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      tools/distrib/c-ish/check_documentation.py
  2. 46
      tools/internal_ci/helper_scripts/prepare_build_macos_rc
  3. 2
      tools/run_tests/artifacts/artifact_targets.py
  4. 2
      tools/run_tests/artifacts/distribtest_targets.py
  5. 2
      tools/run_tests/artifacts/package_targets.py
  6. 2
      tools/run_tests/performance/bq_upload_result.py
  7. 2
      tools/run_tests/performance/patch_scenario_results_schema.py
  8. 2
      tools/run_tests/python_utils/antagonist.py
  9. 2
      tools/run_tests/python_utils/upload_rbe_results.py
  10. 2
      tools/run_tests/python_utils/upload_test_results.py
  11. 2
      tools/run_tests/run_grpclb_interop_tests.py
  12. 2
      tools/run_tests/run_performance_tests.py
  13. 2
      tools/run_tests/run_tests_matrix.py
  14. 2
      tools/run_tests/task_runner.py

@ -1,4 +1,4 @@
#!/usr/bin/env python2.7
#!/usr/bin/env python3
# Copyright 2015 gRPC authors.
#

@ -123,36 +123,40 @@ then
time pip install --user -r $DIR/requirements.macos.txt
time pip install --user --upgrade virtualenv Mako tox setuptools==44.1.1 twisted
# Install Python 3.7 if it doesn't exist
if [ ! -f "/usr/local/bin/python3.7" ]; then
time curl -O https://www.python.org/ftp/python/3.7.0/python-3.7.0-macosx10.9.pkg
echo "ee4ad46ab8cd226ffc8df56d48acfdf7daa2714a9c51e6dc6262fc0b25519578 python-3.7.0-macosx10.9.pkg" > /tmp/python_installer_checksum.sha256
shasum -c /tmp/python_installer_checksum.sha256
time sudo installer -pkg ./python-3.7.0-macosx10.9.pkg -target /
fi
# Install Python 3.8 if it doesn't exist
if [ ! -f "/usr/local/bin/python3.8" ]; then
time curl -O https://www.python.org/ftp/python/3.8.0/python-3.8.0-macosx10.9.pkg
echo "30961fe060da9dc5afdc4e789a57fe9bcc0d20244474e9f095d7bfc89d2e1869 python-3.8.0-macosx10.9.pkg" > /tmp/python_installer_checksum.sha256
shasum -c /tmp/python_installer_checksum.sha256
time sudo installer -pkg ./python-3.8.0-macosx10.9.pkg -target /
fi
# Force reinstall of python3.7 to upgrade its patch version.
# Kokoro mac workers come with python 3.7.3 and that version
# suffers from https://bugs.python.org/issue22490.
# See https://github.com/grpc/grpc/pull/28963.
time curl -O https://www.python.org/ftp/python/3.7.9/python-3.7.9-macosx10.9.pkg
echo "bf54a14eef23467991e8c7a88c7307762e484c024a94ec1ee292ac1db3d41fc9 python-3.7.9-macosx10.9.pkg" > /tmp/python_installer_checksum.sha256
shasum -c /tmp/python_installer_checksum.sha256
time sudo installer -pkg ./python-3.7.9-macosx10.9.pkg -target /
python3.7 --version
# Force reinstall of python3.8 to upgrade its patch version.
# Kokoro mac workers come with python 3.8.2 and that version
# suffers from https://bugs.python.org/issue22490.
# See https://github.com/grpc/grpc/pull/28963.
time curl -O https://www.python.org/ftp/python/3.8.10/python-3.8.10-macosx10.9.pkg
echo "4c65bc7534d5f07edacbe0fbd609b5734dbf3ac02f5444f9bd97963d589d8afd python-3.8.10-macosx10.9.pkg" > /tmp/python_installer_checksum.sha256
shasum -c /tmp/python_installer_checksum.sha256
time sudo installer -pkg ./python-3.8.10-macosx10.9.pkg -target /
python3.8 --version
# Install Python 3.9 if it doesn't exist
if [ ! -f "/usr/local/bin/python3.9" ]; then
time curl -O https://www.python.org/ftp/python/3.9.0/python-3.9.0-macosx10.9.pkg
echo "dadee1d10c1a8ed58bb64ec7409a48c9fe38599791eaaea29303ee59fb95dfeb python-3.9.0-macosx10.9.pkg" > /tmp/python_installer_checksum.sha256
time curl -O https://www.python.org/ftp/python/3.9.10/python-3.9.10-macosx10.9.pkg
echo "732bc5c95ae127dfb6fb1bcf683509ad20c558152b63b8d5f651246f6bdfc8da python-3.9.10-macosx10.9.pkg" > /tmp/python_installer_checksum.sha256
shasum -c /tmp/python_installer_checksum.sha256
time sudo installer -pkg ./python-3.9.0-macosx10.9.pkg -target /
time sudo installer -pkg ./python-3.9.10-macosx10.9.pkg -target /
fi
# Install Python 3.10 if it doesn't exist
if [ ! -f "/usr/local/bin/python3.10" ]; then
time curl -O https://www.python.org/ftp/python/3.10.0/python-3.10.0rc1-macos11.pkg
echo "5933d3d72438b03742d2bb3c8d6cb0e5db165d7110bbc95dac8016f5e31fae7b python-3.10.0rc1-macos11.pkg" > /tmp/python_installer_checksum.sha256
time curl -O https://www.python.org/ftp/python/3.10.2/python-3.10.2-macos11.pkg
echo "22dd9a45718a99d77398312da6ac720c4968bae7a854da4da3a3986f6d3478f8 python-3.10.2-macos11.pkg" > /tmp/python_installer_checksum.sha256
shasum -c /tmp/python_installer_checksum.sha256
time sudo installer -pkg ./python-3.10.0rc1-macos11.pkg -target /
time sudo installer -pkg ./python-3.10.2-macos11.pkg -target /
fi
fi

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# Copyright 2016 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# Copyright 2016 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# Copyright 2016 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# Copyright 2016 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# Copyright 2016 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# Copyright 2015 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# Copyright 2017 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# Copyright 2017 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# Copyright 2015 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# Copyright 2016 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# Copyright 2015 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# Copyright 2016 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");

Loading…
Cancel
Save