Skip to content

Commit 2506fd9

Browse files
authored
Upgrade python calls to python3 (#1372)
1 parent 20891fd commit 2506fd9

File tree

38 files changed

+70
-70
lines changed

38 files changed

+70
-70
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ directories to your PATH as needed.
5353
Note: Once python is installed you can use the following commands to install
5454
required packages:
5555

56-
* python -m ensurepip --default-pip
57-
* python -m pip install --user absl-py
56+
* python3 -m ensurepip --default-pip
57+
* python3 -m pip install --user absl-py
5858

5959
### Prerequisites for Desktop
6060
The following prerequisites are required when building the libraries for
@@ -203,7 +203,7 @@ deliverable for both iOS and tvOS targets in the same XCode project.
203203
``` bash
204204
# Install prereqs (like cocoapods)
205205
./build_scripts/tvos/install_prereqs.sh
206-
python scripts/gha/build_ios_tvos.py -s . -b ios_tvos_build
206+
python3 scripts/gha/build_ios_tvos.py -s . -b ios_tvos_build
207207
```
208208

209209

analytics/integration_test/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ apply plugin: 'com.google.gms.google-services'
8484
task copyIntegrationTestFiles(type:Exec) {
8585
// If this is running form inside the SDK directory, run the setup script.
8686
if (project.file('../../setup_integration_tests.py').exists()) {
87-
commandLine 'python', '../../setup_integration_tests.py', project.projectDir.toString()
87+
commandLine 'python3', '../../setup_integration_tests.py', project.projectDir.toString()
8888
}
8989
else {
9090
commandLine 'echo', ''

app/integration_test/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ apply plugin: 'com.google.gms.google-services'
8484
task copyIntegrationTestFiles(type:Exec) {
8585
// If this is running form inside the SDK directory, run the setup script.
8686
if (project.file('../../setup_integration_tests.py').exists()) {
87-
commandLine 'python', '../../setup_integration_tests.py', project.projectDir.toString()
87+
commandLine 'python3', '../../setup_integration_tests.py', project.projectDir.toString()
8888
}
8989
else {
9090
commandLine 'echo', ''

app_check/integration_test/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ apply plugin: 'com.google.gms.google-services'
101101
task copyIntegrationTestFiles(type:Exec) {
102102
// If this is running form inside the SDK directory, run the setup script.
103103
if (project.file('../../setup_integration_tests.py').exists()) {
104-
commandLine 'python', '../../setup_integration_tests.py', project.projectDir.toString()
104+
commandLine 'python3', '../../setup_integration_tests.py', project.projectDir.toString()
105105
}
106106
else {
107107
commandLine 'echo', ''

auth/integration_test/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ apply plugin: 'com.google.gms.google-services'
8787
task copyIntegrationTestFiles(type:Exec) {
8888
// If this is running form inside the SDK directory, run the setup script.
8989
if (project.file('../../setup_integration_tests.py').exists()) {
90-
commandLine 'python', '../../setup_integration_tests.py', project.projectDir.toString()
90+
commandLine 'python3', '../../setup_integration_tests.py', project.projectDir.toString()
9191
}
9292
else {
9393
commandLine 'echo', ''

build_scripts/android/install_prereqs.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,21 +36,21 @@ if [[ -z $(which cmake) ]]; then
3636
exit 1
3737
fi
3838

39-
if [[ -z $(which python) ]]; then
40-
echo "Error, python is not installed or is not in the PATH."
39+
if [[ -z $(which python3) ]]; then
40+
echo "Error, python3 is not installed or is not in the PATH."
4141
exit 1
4242
else
4343
updated_pip=0
44-
if ! $(echo "import absl"$'\n' | python - 2> /dev/null); then
44+
if ! $(echo "import absl"$'\n' | python3 - 2> /dev/null); then
4545
echo "Installing python packages."
4646
set -x
4747
# On Windows bash shell, sudo doesn't exist
4848
if [[ $(uname) == "Linux" ]] || [[ $(uname) == "Darwin" ]]; then
49-
sudo python -m pip install --upgrade pip
49+
sudo python3 -m pip install --upgrade pip
5050
else
51-
python -m pip install --upgrade pip
51+
python3 -m pip install --upgrade pip
5252
fi
53-
pip install absl-py
53+
pip3 install absl-py
5454
set +x
5555
fi
5656
fi

build_scripts/ios/install_prereqs.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ if [[ -z $(which cmake) ]]; then
1212
exit 1
1313
fi
1414

15-
if [[ -z $(which python) ]]; then
16-
echo "Error, python is not installed or is not in the PATH."
15+
if [[ -z $(which python3) ]]; then
16+
echo "Error, python3 is not installed or is not in the PATH."
1717
exit 1
1818
else
1919
updated_pip=0
20-
if ! $(echo "import absl"$'\n'"import google.protobuf" | python - 2> /dev/null); then
20+
if ! $(echo "import absl"$'\n'"import google.protobuf" | python3 - 2> /dev/null); then
2121
echo "Installing python packages."
2222
set -x
23-
sudo python -m pip install --upgrade pip
24-
pip install absl-py protobuf
23+
sudo python3 -m pip install --upgrade pip
24+
pip3 install absl-py protobuf
2525
set +x
2626
fi
2727
fi

build_scripts/tvos/install_prereqs.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ if [[ -z $(which cmake) ]]; then
1212
exit 1
1313
fi
1414

15-
if [[ -z $(which python) ]]; then
15+
if [[ -z $(which python3) ]]; then
1616
echo "Error, python is not installed or is not in the PATH."
1717
exit 1
1818
else
1919
updated_pip=0
20-
if ! $(echo "import absl"$'\n' | python - 2> /dev/null); then
20+
if ! $(echo "import absl"$'\n' | python3 - 2> /dev/null); then
2121
echo "Installing python packages."
2222
set -x
23-
sudo python -m pip install --upgrade pip
24-
pip install absl-py
23+
sudo python3 -m pip install --upgrade pip
24+
pip3 install absl-py
2525
set +x
2626
fi
2727
fi

database/integration_test/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ apply plugin: 'com.google.gms.google-services'
8888
task copyIntegrationTestFiles(type:Exec) {
8989
// If this is running form inside the SDK directory, run the setup script.
9090
if (project.file('../../setup_integration_tests.py').exists()) {
91-
commandLine 'python', '../../setup_integration_tests.py', project.projectDir.toString()
91+
commandLine 'python3', '../../setup_integration_tests.py', project.projectDir.toString()
9292
}
9393
else {
9494
commandLine 'echo', ''

dynamic_links/integration_test/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ apply plugin: 'com.google.gms.google-services'
8484
task copyIntegrationTestFiles(type:Exec) {
8585
// If this is running form inside the SDK directory, run the setup script.
8686
if (project.file('../../setup_integration_tests.py').exists()) {
87-
commandLine 'python', '../../setup_integration_tests.py', project.projectDir.toString()
87+
commandLine 'python3', '../../setup_integration_tests.py', project.projectDir.toString()
8888
}
8989
else {
9090
commandLine 'echo', ''

0 commit comments

Comments
 (0)