Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Side by Side Diff: remoting/webapp/build-webapp.py

Issue 684633002: [Chromoting] Cleanup Python code formatting in build-webapp.py. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Creates a directory with with the unpacked contents of the remoting webapp. 6 """Creates a directory with with the unpacked contents of the remoting webapp.
7 7
8 The directory will contain a copy-of or a link-to to all remoting webapp 8 The directory will contain a copy-of or a link-to to all remoting webapp
9 resources. This includes HTML/JS and any plugin binaries. The script also 9 resources. This includes HTML/JS and any plugin binaries. The script also
10 massages resulting files appropriately with host plugin data. Finally, 10 massages resulting files appropriately with host plugin data. Finally,
(...skipping 14 matching lines...) Expand all
25 import zipfile 25 import zipfile
26 26
27 # Update the module path, assuming that this script is in src/remoting/webapp, 27 # Update the module path, assuming that this script is in src/remoting/webapp,
28 # and that the google_api_keys module is in src/google_apis. Note that 28 # and that the google_api_keys module is in src/google_apis. Note that
29 # sys.path[0] refers to the directory containing this script. 29 # sys.path[0] refers to the directory containing this script.
30 if __name__ == '__main__': 30 if __name__ == '__main__':
31 sys.path.append( 31 sys.path.append(
32 os.path.abspath(os.path.join(sys.path[0], '../../google_apis'))) 32 os.path.abspath(os.path.join(sys.path[0], '../../google_apis')))
33 import google_api_keys 33 import google_api_keys
34 34
35
35 def findAndReplace(filepath, findString, replaceString): 36 def findAndReplace(filepath, findString, replaceString):
36 """Does a search and replace on the contents of a file.""" 37 """Does a search and replace on the contents of a file."""
37 oldFilename = os.path.basename(filepath) + '.old' 38 oldFilename = os.path.basename(filepath) + '.old'
38 oldFilepath = os.path.join(os.path.dirname(filepath), oldFilename) 39 oldFilepath = os.path.join(os.path.dirname(filepath), oldFilename)
39 os.rename(filepath, oldFilepath) 40 os.rename(filepath, oldFilepath)
40 with open(oldFilepath) as input: 41 with open(oldFilepath) as input:
41 with open(filepath, 'w') as output: 42 with open(filepath, 'w') as output:
42 for s in input: 43 for s in input:
43 output.write(s.replace(findString, replaceString)) 44 output.write(s.replace(findString, replaceString))
44 os.remove(oldFilepath) 45 os.remove(oldFilepath)
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 # Ensure a fresh directory. 107 # Ensure a fresh directory.
107 try: 108 try:
108 shutil.rmtree(destination) 109 shutil.rmtree(destination)
109 except OSError: 110 except OSError:
110 if os.path.exists(destination): 111 if os.path.exists(destination):
111 raise 112 raise
112 else: 113 else:
113 pass 114 pass
114 os.mkdir(destination, 0775) 115 os.mkdir(destination, 0775)
115 116
116 if buildtype != "Official" and buildtype != "Release" and buildtype != "Dev": 117 if buildtype != 'Official' and buildtype != 'Release' and buildtype != 'Dev':
117 raise Exception("Unknown buildtype: " + buildtype); 118 raise Exception('Unknown buildtype: ' + buildtype)
118 119
119 # Use symlinks on linux and mac for faster compile/edit cycle. 120 # Use symlinks on linux and mac for faster compile/edit cycle.
120 # 121 #
121 # On Windows Vista platform.system() can return 'Microsoft' with some 122 # On Windows Vista platform.system() can return 'Microsoft' with some
122 # versions of Python, see http://bugs.python.org/issue1082 123 # versions of Python, see http://bugs.python.org/issue1082
123 # should_symlink = platform.system() not in ['Windows', 'Microsoft'] 124 # should_symlink = platform.system() not in ['Windows', 'Microsoft']
124 # 125 #
125 # TODO(ajwong): Pending decision on http://crbug.com/27185 we may not be 126 # TODO(ajwong): Pending decision on http://crbug.com/27185 we may not be
126 # able to load symlinked resources. 127 # able to load symlinked resources.
127 should_symlink = False 128 should_symlink = False
128 129
129 # Copy all the files. 130 # Copy all the files.
130 for current_file in files: 131 for current_file in files:
131 destination_file = os.path.join(destination, os.path.basename(current_file)) 132 destination_file = os.path.join(destination, os.path.basename(current_file))
132 destination_dir = os.path.dirname(destination_file) 133 destination_dir = os.path.dirname(destination_file)
133 if not os.path.exists(destination_dir): 134 if not os.path.exists(destination_dir):
134 os.makedirs(destination_dir, 0775) 135 os.makedirs(destination_dir, 0775)
135 136
136 if should_symlink: 137 if should_symlink:
137 # TODO(ajwong): Detect if we're vista or higher. Then use win32file 138 # TODO(ajwong): Detect if we're vista or higher. Then use win32file
138 # to create a symlink in that case. 139 # to create a symlink in that case.
139 targetname = os.path.relpath(os.path.realpath(current_file), 140 targetname = os.path.relpath(os.path.realpath(current_file),
140 os.path.realpath(destination_file)) 141 os.path.realpath(destination_file))
141 os.symlink(targetname, destination_file) 142 os.symlink(targetname, destination_file)
142 else: 143 else:
143 shutil.copy2(current_file, destination_file) 144 shutil.copy2(current_file, destination_file)
144 145
145 # Copy all the locales, preserving directory structure 146 # Copy all the locales, preserving directory structure
146 destination_locales = os.path.join(destination, "_locales") 147 destination_locales = os.path.join(destination, '_locales')
147 os.mkdir(destination_locales , 0775) 148 os.mkdir(destination_locales, 0775)
148 remoting_locales = os.path.join(destination, "remoting_locales") 149 remoting_locales = os.path.join(destination, 'remoting_locales')
149 os.mkdir(remoting_locales , 0775) 150 os.mkdir(remoting_locales, 0775)
150 for current_locale in locales: 151 for current_locale in locales:
151 extension = os.path.splitext(current_locale)[1] 152 extension = os.path.splitext(current_locale)[1]
152 if extension == '.json': 153 if extension == '.json':
153 locale_id = os.path.split(os.path.split(current_locale)[0])[1] 154 locale_id = os.path.split(os.path.split(current_locale)[0])[1]
154 destination_dir = os.path.join(destination_locales, locale_id) 155 destination_dir = os.path.join(destination_locales, locale_id)
155 destination_file = os.path.join(destination_dir, 156 destination_file = os.path.join(destination_dir,
156 os.path.split(current_locale)[1]) 157 os.path.split(current_locale)[1])
157 os.mkdir(destination_dir, 0775) 158 os.mkdir(destination_dir, 0775)
158 shutil.copy2(current_locale, destination_file) 159 shutil.copy2(current_locale, destination_file)
159 elif extension == '.pak': 160 elif extension == '.pak':
160 destination_file = os.path.join(remoting_locales, 161 destination_file = os.path.join(remoting_locales,
161 os.path.split(current_locale)[1]) 162 os.path.split(current_locale)[1])
162 shutil.copy2(current_locale, destination_file) 163 shutil.copy2(current_locale, destination_file)
163 else: 164 else:
164 raise Exception("Unknown extension: " + current_locale); 165 raise Exception('Unknown extension: ' + current_locale)
165 166
166 # Set client plugin type. 167 # Set client plugin type.
167 # TODO(wez): Use 'native' in app_remoting until b/17441659 is resolved. 168 # TODO(wez): Use 'native' in app_remoting until b/17441659 is resolved.
168 client_plugin = 'pnacl' if webapp_type == 'v2_pnacl' else 'native' 169 client_plugin = 'pnacl' if webapp_type == 'v2_pnacl' else 'native'
169 findAndReplace(os.path.join(destination, 'plugin_settings.js'), 170 findAndReplace(os.path.join(destination, 'plugin_settings.js'),
170 "'CLIENT_PLUGIN_TYPE'", "'" + client_plugin + "'") 171 "'CLIENT_PLUGIN_TYPE'", "'" + client_plugin + "'")
171 172
172 # Allow host names for google services/apis to be overriden via env vars. 173 # Allow host names for google services/apis to be overriden via env vars.
173 oauth2AccountsHost = os.environ.get( 174 oauth2AccountsHost = os.environ.get(
174 'OAUTH2_ACCOUNTS_HOST', 'https://accounts.google.com') 175 'OAUTH2_ACCOUNTS_HOST', 'https://accounts.google.com')
175 oauth2ApiHost = os.environ.get( 176 oauth2ApiHost = os.environ.get(
176 'OAUTH2_API_HOST', 'https://www.googleapis.com') 177 'OAUTH2_API_HOST', 'https://www.googleapis.com')
177 directoryApiHost = os.environ.get( 178 directoryApiHost = os.environ.get(
178 'DIRECTORY_API_HOST', 'https://www.googleapis.com') 179 'DIRECTORY_API_HOST', 'https://www.googleapis.com')
179 180
180 if webapp_type == 'app_remoting': 181 if webapp_type == 'app_remoting':
181 appRemotingApiHost = os.environ.get( 182 appRemotingApiHost = os.environ.get(
182 'APP_REMOTING_API_HOST', None) 183 'APP_REMOTING_API_HOST', None)
183 appRemotingApplicationId = os.environ.get( 184 appRemotingApplicationId = os.environ.get(
184 'APP_REMOTING_APPLICATION_ID', None) 185 'APP_REMOTING_APPLICATION_ID', None)
185 186
186 # Release/Official builds are special because they are what we will upload 187 # Release/Official builds are special because they are what we will upload
187 # to the web store. The checks below will validate that prod builds are 188 # to the web store. The checks below will validate that prod builds are
188 # being generated correctly (no overrides) and with the correct buildtype. 189 # being generated correctly (no overrides) and with the correct buildtype.
189 # They also verify that folks are not accidentally building dev/test/staging 190 # They also verify that folks are not accidentally building dev/test/staging
190 # apps for release (no impersonation) instead of dev. 191 # apps for release (no impersonation) instead of dev.
191 if service_environment == "prod" and buildtype == "Dev": 192 if service_environment == 'prod' and buildtype == 'Dev':
192 raise Exception("Prod environment cannot be built for 'dev' builds"); 193 raise Exception("Prod environment cannot be built for 'dev' builds")
193 194
194 if buildtype != "Dev": 195 if buildtype != 'Dev':
195 if service_environment != "prod": 196 if service_environment != 'prod':
196 raise Exception("Invalid service_environment targeted for " 197 raise Exception('Invalid service_environment targeted for '
197 + buildtype + ": " + service_environment); 198 + buildtype + ': ' + service_environment)
198 if "out/Release" not in destination: 199 if 'out/Release' not in destination:
199 raise Exception("Prod builds must be placed in the out/Release folder"); 200 raise Exception('Prod builds must be placed in the out/Release folder')
200 if app_id != None: 201 if app_id != None:
201 raise Exception("Cannot pass in an app_id for " 202 raise Exception('Cannot pass in an app_id for '
202 + buildtype + " builds: " + service_environment); 203 + buildtype + ' builds: ' + service_environment)
203 if appRemotingApiHost != None: 204 if appRemotingApiHost != None:
204 raise Exception("Cannot set APP_REMOTING_API_HOST env var for " 205 raise Exception('Cannot set APP_REMOTING_API_HOST env var for '
205 + buildtype + " builds"); 206 + buildtype + ' builds')
206 if appRemotingApplicationId != None: 207 if appRemotingApplicationId != None:
207 raise Exception("Cannot set APP_REMOTING_APPLICATION_ID env var for " 208 raise Exception('Cannot set APP_REMOTING_APPLICATION_ID env var for '
208 + buildtype + " builds"); 209 + buildtype + ' builds')
209 210
210 # If an Application ID was set (either from service_environment variable or 211 # If an Application ID was set (either from service_environment variable or
211 # from a command line argument), hardcode it, otherwise get it at runtime. 212 # from a command line argument), hardcode it, otherwise get it at runtime.
212 effectiveAppId = appRemotingApplicationId or app_id 213 effectiveAppId = appRemotingApplicationId or app_id
213 if effectiveAppId: 214 if effectiveAppId:
214 appRemotingApplicationId = "'" + effectiveAppId + "'" 215 appRemotingApplicationId = "'" + effectiveAppId + "'"
215 else: 216 else:
216 appRemotingApplicationId = "chrome.i18n.getMessage('@@extension_id')" 217 appRemotingApplicationId = "chrome.i18n.getMessage('@@extension_id')"
217 findAndReplace(os.path.join(destination, 'plugin_settings.js'), 218 findAndReplace(os.path.join(destination, 'plugin_settings.js'),
218 "'APP_REMOTING_APPLICATION_ID'", appRemotingApplicationId) 219 "'APP_REMOTING_APPLICATION_ID'", appRemotingApplicationId)
219 220
220 oauth2BaseUrl = oauth2AccountsHost + '/o/oauth2' 221 oauth2BaseUrl = oauth2AccountsHost + '/o/oauth2'
221 oauth2ApiBaseUrl = oauth2ApiHost + '/oauth2' 222 oauth2ApiBaseUrl = oauth2ApiHost + '/oauth2'
222 directoryApiBaseUrl = directoryApiHost + '/chromoting/v1' 223 directoryApiBaseUrl = directoryApiHost + '/chromoting/v1'
223 224
224 if webapp_type == 'app_remoting': 225 if webapp_type == 'app_remoting':
225 # Set the apiary endpoint and then set the endpoint version 226 # Set the apiary endpoint and then set the endpoint version
226 if not appRemotingApiHost: 227 if not appRemotingApiHost:
227 if service_environment == "prod": 228 if service_environment == 'prod':
228 appRemotingApiHost = 'https://www.googleapis.com' 229 appRemotingApiHost = 'https://www.googleapis.com'
229 else: 230 else:
230 appRemotingApiHost = 'https://www-googleapis-test.sandbox.google.com' 231 appRemotingApiHost = 'https://www-googleapis-test.sandbox.google.com'
231 232
232 if service_environment == "dev": 233 if service_environment == 'dev':
233 appRemotingServicePath = '/appremoting/v1beta1_dev' 234 appRemotingServicePath = '/appremoting/v1beta1_dev'
234 elif service_environment == "test": 235 elif service_environment == 'test':
235 appRemotingServicePath = '/appremoting/v1beta1' 236 appRemotingServicePath = '/appremoting/v1beta1'
236 elif service_environment == "staging": 237 elif service_environment == 'staging':
237 appRemotingServicePath = '/appremoting/v1beta1_staging' 238 appRemotingServicePath = '/appremoting/v1beta1_staging'
238 elif service_environment == "prod": 239 elif service_environment == 'prod':
239 appRemotingServicePath = '/appremoting/v1beta1' 240 appRemotingServicePath = '/appremoting/v1beta1'
240 else: 241 else:
241 raise Exception("Unknown service environment: " + service_environment); 242 raise Exception('Unknown service environment: ' + service_environment)
242 appRemotingApiBaseUrl = appRemotingApiHost + appRemotingServicePath 243 appRemotingApiBaseUrl = appRemotingApiHost + appRemotingServicePath
243 else: 244 else:
244 appRemotingApiBaseUrl = '' 245 appRemotingApiBaseUrl = ''
245 246
246 replaceString(destination, 'OAUTH2_BASE_URL', oauth2BaseUrl) 247 replaceString(destination, 'OAUTH2_BASE_URL', oauth2BaseUrl)
247 replaceString(destination, 'OAUTH2_API_BASE_URL', oauth2ApiBaseUrl) 248 replaceString(destination, 'OAUTH2_API_BASE_URL', oauth2ApiBaseUrl)
248 replaceString(destination, 'DIRECTORY_API_BASE_URL', directoryApiBaseUrl) 249 replaceString(destination, 'DIRECTORY_API_BASE_URL', directoryApiBaseUrl)
249 if webapp_type == 'app_remoting': 250 if webapp_type == 'app_remoting':
250 replaceString(destination, 'APP_REMOTING_API_BASE_URL', 251 replaceString(destination, 'APP_REMOTING_API_BASE_URL',
251 appRemotingApiBaseUrl) 252 appRemotingApiBaseUrl)
(...skipping 25 matching lines...) Expand all
277 oauth2RedirectPath = '/talkgadget/oauth/chrome-remote-desktop' 278 oauth2RedirectPath = '/talkgadget/oauth/chrome-remote-desktop'
278 oauth2RedirectBaseUrlJs = oauth2RedirectHostJs + oauth2RedirectPath 279 oauth2RedirectBaseUrlJs = oauth2RedirectHostJs + oauth2RedirectPath
279 oauth2RedirectBaseUrlJson = oauth2RedirectHostJson + oauth2RedirectPath 280 oauth2RedirectBaseUrlJson = oauth2RedirectHostJson + oauth2RedirectPath
280 if buildtype != 'Dev': 281 if buildtype != 'Dev':
281 oauth2RedirectUrlJs = ("'" + oauth2RedirectBaseUrlJs + 282 oauth2RedirectUrlJs = ("'" + oauth2RedirectBaseUrlJs +
282 "/rel/' + chrome.i18n.getMessage('@@extension_id')") 283 "/rel/' + chrome.i18n.getMessage('@@extension_id')")
283 oauth2RedirectUrlJson = oauth2RedirectBaseUrlJson + '/rel/*' 284 oauth2RedirectUrlJson = oauth2RedirectBaseUrlJson + '/rel/*'
284 else: 285 else:
285 oauth2RedirectUrlJs = "'" + oauth2RedirectBaseUrlJs + "/dev'" 286 oauth2RedirectUrlJs = "'" + oauth2RedirectBaseUrlJs + "/dev'"
286 oauth2RedirectUrlJson = oauth2RedirectBaseUrlJson + '/dev*' 287 oauth2RedirectUrlJson = oauth2RedirectBaseUrlJson + '/dev*'
287 thirdPartyAuthUrlJs = oauth2RedirectBaseUrlJs + "/thirdpartyauth" 288 thirdPartyAuthUrlJs = oauth2RedirectBaseUrlJs + '/thirdpartyauth'
288 thirdPartyAuthUrlJson = oauth2RedirectBaseUrlJson + '/thirdpartyauth*' 289 thirdPartyAuthUrlJson = oauth2RedirectBaseUrlJson + '/thirdpartyauth*'
289 replaceString(destination, "TALK_GADGET_URL", talkGadgetBaseUrl) 290 replaceString(destination, 'TALK_GADGET_URL', talkGadgetBaseUrl)
290 findAndReplace(os.path.join(destination, 'plugin_settings.js'), 291 findAndReplace(os.path.join(destination, 'plugin_settings.js'),
291 "'OAUTH2_REDIRECT_URL'", oauth2RedirectUrlJs) 292 "'OAUTH2_REDIRECT_URL'", oauth2RedirectUrlJs)
292 293
293 # Configure xmpp server and directory bot settings in the plugin. 294 # Configure xmpp server and directory bot settings in the plugin.
294 xmppServerAddress = os.environ.get( 295 xmppServerAddress = os.environ.get(
295 'XMPP_SERVER_ADDRESS', 'talk.google.com:5222') 296 'XMPP_SERVER_ADDRESS', 'talk.google.com:5222')
296 xmppServerUseTls = os.environ.get('XMPP_SERVER_USE_TLS', 'true') 297 xmppServerUseTls = os.environ.get('XMPP_SERVER_USE_TLS', 'true')
297 directoryBotJid = os.environ.get( 298 directoryBotJid = os.environ.get(
298 'DIRECTORY_BOT_JID', 'remoting@bot.talk.google.com') 299 'DIRECTORY_BOT_JID', 'remoting@bot.talk.google.com')
299 300
300 findAndReplace(os.path.join(destination, 'plugin_settings.js'), 301 findAndReplace(os.path.join(destination, 'plugin_settings.js'),
301 "Boolean('XMPP_SERVER_USE_TLS')", xmppServerUseTls) 302 "Boolean('XMPP_SERVER_USE_TLS')", xmppServerUseTls)
302 replaceString(destination, "XMPP_SERVER_ADDRESS", xmppServerAddress) 303 replaceString(destination, 'XMPP_SERVER_ADDRESS', xmppServerAddress)
303 replaceString(destination, "DIRECTORY_BOT_JID", directoryBotJid) 304 replaceString(destination, 'DIRECTORY_BOT_JID', directoryBotJid)
304 replaceString(destination, "THIRD_PARTY_AUTH_REDIRECT_URL", 305 replaceString(destination, 'THIRD_PARTY_AUTH_REDIRECT_URL',
305 thirdPartyAuthUrlJs) 306 thirdPartyAuthUrlJs)
306 307
307 # Set the correct API keys. 308 # Set the correct API keys.
308 # For overriding the client ID/secret via env vars, see google_api_keys.py. 309 # For overriding the client ID/secret via env vars, see google_api_keys.py.
309 apiClientId = google_api_keys.GetClientID('REMOTING') 310 apiClientId = google_api_keys.GetClientID('REMOTING')
310 apiClientSecret = google_api_keys.GetClientSecret('REMOTING') 311 apiClientSecret = google_api_keys.GetClientSecret('REMOTING')
311 apiClientIdV2 = google_api_keys.GetClientID('REMOTING_IDENTITY_API') 312 apiClientIdV2 = google_api_keys.GetClientID('REMOTING_IDENTITY_API')
312 313
313 replaceString(destination, "API_CLIENT_ID", apiClientId) 314 replaceString(destination, 'API_CLIENT_ID', apiClientId)
314 replaceString(destination, "API_CLIENT_SECRET", apiClientSecret) 315 replaceString(destination, 'API_CLIENT_SECRET', apiClientSecret)
315 316
316 # Use a consistent extension id for dev builds. 317 # Use a consistent extension id for dev builds.
317 if buildtype == 'Dev': 318 if buildtype == 'Dev':
318 manifestKey = '"key": "remotingdevbuild",' 319 manifestKey = '"key": "remotingdevbuild",'
319 else: 320 else:
320 manifestKey = '' 321 manifestKey = ''
321 322
322 # Generate manifest. 323 # Generate manifest.
323 if manifest_template: 324 if manifest_template:
324 context = { 325 context = {
325 'webapp_type': webapp_type, 326 'webapp_type': webapp_type,
326 'FULL_APP_VERSION': version, 327 'FULL_APP_VERSION': version,
327 'MANIFEST_KEY_FOR_UNOFFICIAL_BUILD': manifestKey, 328 'MANIFEST_KEY_FOR_UNOFFICIAL_BUILD': manifestKey,
328 'OAUTH2_REDIRECT_URL': oauth2RedirectUrlJson, 329 'OAUTH2_REDIRECT_URL': oauth2RedirectUrlJson,
329 'TALK_GADGET_HOST': talkGadgetHostJson, 330 'TALK_GADGET_HOST': talkGadgetHostJson,
330 'THIRD_PARTY_AUTH_REDIRECT_URL': thirdPartyAuthUrlJson, 331 'THIRD_PARTY_AUTH_REDIRECT_URL': thirdPartyAuthUrlJson,
331 'REMOTING_IDENTITY_API_CLIENT_ID': apiClientIdV2, 332 'REMOTING_IDENTITY_API_CLIENT_ID': apiClientIdV2,
332 'OAUTH2_BASE_URL': oauth2BaseUrl, 333 'OAUTH2_BASE_URL': oauth2BaseUrl,
333 'OAUTH2_API_BASE_URL': oauth2ApiBaseUrl, 334 'OAUTH2_API_BASE_URL': oauth2ApiBaseUrl,
334 'DIRECTORY_API_BASE_URL': directoryApiBaseUrl, 335 'DIRECTORY_API_BASE_URL': directoryApiBaseUrl,
335 'APP_REMOTING_API_BASE_URL': appRemotingApiBaseUrl, 336 'APP_REMOTING_API_BASE_URL': appRemotingApiBaseUrl,
336 'OAUTH2_ACCOUNTS_HOST': oauth2AccountsHost, 337 'OAUTH2_ACCOUNTS_HOST': oauth2AccountsHost,
337 'GOOGLE_API_HOSTS': googleApiHosts, 338 'GOOGLE_API_HOSTS': googleApiHosts,
338 'APP_NAME': app_name, 339 'APP_NAME': app_name,
339 'APP_DESCRIPTION': app_description, 340 'APP_DESCRIPTION': app_description,
340 } 341 }
341 processJinjaTemplate(manifest_template, 342 processJinjaTemplate(manifest_template,
342 jinja_paths, 343 jinja_paths,
343 os.path.join(destination, 'manifest.json'), 344 os.path.join(destination, 'manifest.json'),
344 context) 345 context)
345 346
346 # Make the zipfile. 347 # Make the zipfile.
347 createZip(zip_path, destination) 348 createZip(zip_path, destination)
348 349
349 return 0 350 return 0
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 files.append(arg) 400 files.append(arg)
400 401
401 return buildWebApp(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4], 402 return buildWebApp(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4],
402 sys.argv[5], sys.argv[6], app_id, app_name, 403 sys.argv[5], sys.argv[6], app_id, app_name,
403 app_description, files, locales, jinja_paths, 404 app_description, files, locales, jinja_paths,
404 service_environment) 405 service_environment)
405 406
406 407
407 if __name__ == '__main__': 408 if __name__ == '__main__':
408 sys.exit(main()) 409 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698