Skip to content

Commit baf7e8b

Browse files
tomballcopybara-github
authored andcommitted
Issue google#1851: updated build scripts to Python 3, required as of MacOS 12.3.
PiperOrigin-RevId: 436530326
1 parent cebd806 commit baf7e8b

7 files changed

+19
-19
lines changed

scripts/gen_java_source_jar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/python3
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

scripts/gen_module_info.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/python3
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

scripts/gen_proto_library_include.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/python3
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -22,11 +22,11 @@
2222
"""
2323

2424

25-
import parse_proto
26-
2725
import re
2826
import sys
2927

28+
import parse_proto
29+
3030

3131
def GetPackage(data):
3232
package = data.package
@@ -69,20 +69,20 @@ def main():
6969
for filename in sys.argv[1:]:
7070
GetGeneratedFilesForProto(filename, java_files, objc_files, header_files)
7171

72-
print 'GENERATED_JAVA = \\'
72+
print('GENERATED_JAVA = \\')
7373
for f in java_files:
74-
print ' ' + f + ' \\'
75-
print ''
74+
print(' ' + f + ' \\')
75+
print('')
7676

77-
print 'GENERATED_SOURCES = \\'
77+
print('GENERATED_SOURCES = \\')
7878
for f in objc_files:
79-
print ' ' + f + ' \\'
80-
print ''
79+
print(' ' + f + ' \\')
80+
print('')
8181

82-
print 'GENERATED_HEADERS = \\'
82+
print('GENERATED_HEADERS = \\')
8383
for f in header_files:
84-
print ' ' + f + ' \\'
85-
print ''
84+
print(' ' + f + ' \\')
85+
print('')
8686

8787
if __name__ == '__main__':
8888
sys.exit(main())

scripts/gen_resource_source.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/python3
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -119,7 +119,7 @@ def ProcessResourceFile(resource_path, output_file):
119119
checksums = subprocess.check_output(["openssl", "sha256"] +
120120
args.files).splitlines()
121121
for checksum in checksums:
122-
parts = checksum.split("=")
122+
parts = checksum.split(b'=')
123123
out.write("// {}\n".format(parts[0]))
124124
out.write("// {}\n".format(parts[1]))
125125
out.close()

scripts/parse_proto.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/python3
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

scripts/replace_metadata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/python3
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

scripts/testng2junit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/python3
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)