Make google_api_keys.py python3-compatible
Bug: 1112471 Change-Id: I4696a384793ec83b0a3d43f4a03694a32658ec48 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2854275 Auto-Submit: Andrew Grieve <agrieve@chromium.org> Commit-Queue: David Roger <droger@chromium.org> Reviewed-by: David Roger <droger@chromium.org> Cr-Commit-Position: refs/heads/master@{#876596}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
580deba2e5
commit
0945791b6b
@ -1304,6 +1304,7 @@ _GENERIC_PYDEPS_FILES = [
|
||||
'build/android/gyp/java_cpp_enum.pydeps',
|
||||
'build/android/gyp/java_cpp_features.pydeps',
|
||||
'build/android/gyp/java_cpp_strings.pydeps',
|
||||
'build/android/gyp/java_google_api_keys.pydeps',
|
||||
'build/android/gyp/jetify_jar.pydeps',
|
||||
'build/android/gyp/jinja_template.pydeps',
|
||||
'build/android/gyp/lint.pydeps',
|
||||
|
@ -48,7 +48,7 @@ ${CONSTANT_ENTRIES}
|
||||
constant_template = string.Template(
|
||||
' public static final String ${NAME} = "${VALUE}";')
|
||||
constant_entries_list = []
|
||||
for constant_name, constant_value in constant_definitions.iteritems():
|
||||
for constant_name, constant_value in constant_definitions.items():
|
||||
values = {
|
||||
'NAME': constant_name,
|
||||
'VALUE': constant_value,
|
||||
|
7
build/android/gyp/java_google_api_keys.pydeps
Normal file
7
build/android/gyp/java_google_api_keys.pydeps
Normal file
@ -0,0 +1,7 @@
|
||||
# Generated by running:
|
||||
# build/print_python_deps.py --root build/android/gyp --output build/android/gyp/java_google_api_keys.pydeps build/android/gyp/java_google_api_keys.py
|
||||
../../../google_apis/google_api_keys.py
|
||||
../../gn_helpers.py
|
||||
java_google_api_keys.py
|
||||
util/__init__.py
|
||||
util/build_utils.py
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
# Copyright 2015 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
@ -747,14 +747,12 @@ group("jni_headers") {
|
||||
]
|
||||
}
|
||||
|
||||
# TODO(crbug.com/1112471): Get this to run cleanly under Python 3.
|
||||
python2_action("chrome_android_java_google_api_keys_srcjar") {
|
||||
action_with_pydeps("chrome_android_java_google_api_keys_srcjar") {
|
||||
script = "//build/android/gyp/java_google_api_keys.py"
|
||||
_output_path = "$target_gen_dir/$target_name.srcjar"
|
||||
outputs = [ _output_path ]
|
||||
outputs = [ "$target_gen_dir/$target_name.srcjar" ]
|
||||
args = [
|
||||
"--srcjar",
|
||||
rebase_path(_output_path, root_build_dir),
|
||||
rebase_path(outputs[0], root_build_dir),
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -10,6 +10,8 @@ in google_api_keys.h, since it does not have access to gyp variables
|
||||
or preprocessor defines.
|
||||
"""
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
@ -86,15 +88,15 @@ def GetClientSecret(client_name):
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
print 'GOOGLE_API_KEY=%s' % GetAPIKey()
|
||||
print 'GOOGLE_CLIENT_ID_MAIN=%s' % GetClientID('MAIN')
|
||||
print 'GOOGLE_CLIENT_SECRET_MAIN=%s' % GetClientSecret('MAIN')
|
||||
print 'GOOGLE_CLIENT_ID_CLOUD_PRINT=%s' % GetClientID('CLOUD_PRINT')
|
||||
print 'GOOGLE_CLIENT_SECRET_CLOUD_PRINT=%s' % GetClientSecret('CLOUD_PRINT')
|
||||
print 'GOOGLE_CLIENT_ID_REMOTING=%s' % GetClientID('REMOTING')
|
||||
print 'GOOGLE_CLIENT_SECRET_REMOTING=%s' % GetClientSecret('REMOTING')
|
||||
print 'GOOGLE_CLIENT_ID_REMOTING_HOST=%s' % GetClientID('REMOTING_HOST')
|
||||
print 'GOOGLE_CLIENT_SECRET_REMOTING_HOST=%s' % GetClientSecret(
|
||||
'REMOTING_HOST')
|
||||
print 'GOOGLE_CLIENT_ID_REMOTING_IDENTITY_API=%s' %GetClientID(
|
||||
'REMOTING_IDENTITY_API')
|
||||
print('GOOGLE_API_KEY=%s' % GetAPIKey())
|
||||
print('GOOGLE_CLIENT_ID_MAIN=%s' % GetClientID('MAIN'))
|
||||
print('GOOGLE_CLIENT_SECRET_MAIN=%s' % GetClientSecret('MAIN'))
|
||||
print('GOOGLE_CLIENT_ID_CLOUD_PRINT=%s' % GetClientID('CLOUD_PRINT'))
|
||||
print('GOOGLE_CLIENT_SECRET_CLOUD_PRINT=%s' % GetClientSecret('CLOUD_PRINT'))
|
||||
print('GOOGLE_CLIENT_ID_REMOTING=%s' % GetClientID('REMOTING'))
|
||||
print('GOOGLE_CLIENT_SECRET_REMOTING=%s' % GetClientSecret('REMOTING'))
|
||||
print('GOOGLE_CLIENT_ID_REMOTING_HOST=%s' % GetClientID('REMOTING_HOST'))
|
||||
print('GOOGLE_CLIENT_SECRET_REMOTING_HOST=%s' % GetClientSecret(
|
||||
'REMOTING_HOST'))
|
||||
print('GOOGLE_CLIENT_ID_REMOTING_IDENTITY_API=%s' %GetClientID(
|
||||
'REMOTING_IDENTITY_API'))
|
||||
|
Reference in New Issue
Block a user