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

Side by Side Diff: pylib/gyp/generator/dump_dependency_json.py

Issue 1154703002: Avoid lint presubmit error in dump_dependency_json (Closed) Base URL: https://chromium.googlesource.com/external/gyp.git@master
Patch Set: Created 5 years, 7 months 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 # Copyright (c) 2012 Google Inc. All rights reserved. 1 # Copyright (c) 2012 Google Inc. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import collections 5 import collections
6 import os 6 import os
7 import gyp 7 import gyp
8 import gyp.common 8 import gyp.common
9 import gyp.msvs_emulation 9 import gyp.msvs_emulation
10 import json 10 import json
11 import sys 11 import sys
12 12
13 generator_supports_multiple_toolsets = True 13 generator_supports_multiple_toolsets = True
14 14
15 generator_wants_static_library_dependencies_adjusted = False 15 generator_wants_static_library_dependencies_adjusted = False
16 16
17 generator_filelist_paths = {
18 }
19
17 generator_default_variables = { 20 generator_default_variables = {
18 } 21 }
19 for dirname in ['INTERMEDIATE_DIR', 'SHARED_INTERMEDIATE_DIR', 'PRODUCT_DIR', 22 for dirname in ['INTERMEDIATE_DIR', 'SHARED_INTERMEDIATE_DIR', 'PRODUCT_DIR',
20 'LIB_DIR', 'SHARED_LIB_DIR']: 23 'LIB_DIR', 'SHARED_LIB_DIR']:
21 # Some gyp steps fail if these are empty(!). 24 # Some gyp steps fail if these are empty(!).
22 generator_default_variables[dirname] = 'dir' 25 generator_default_variables[dirname] = 'dir'
23 for unused in ['RULE_INPUT_PATH', 'RULE_INPUT_ROOT', 'RULE_INPUT_NAME', 26 for unused in ['RULE_INPUT_PATH', 'RULE_INPUT_ROOT', 'RULE_INPUT_NAME',
24 'RULE_INPUT_DIRNAME', 'RULE_INPUT_EXT', 27 'RULE_INPUT_DIRNAME', 'RULE_INPUT_EXT',
25 'EXECUTABLE_PREFIX', 'EXECUTABLE_SUFFIX', 28 'EXECUTABLE_PREFIX', 'EXECUTABLE_SUFFIX',
26 'STATIC_LIB_PREFIX', 'STATIC_LIB_SUFFIX', 29 'STATIC_LIB_PREFIX', 'STATIC_LIB_SUFFIX',
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 90
88 try: 91 try:
89 filepath = params['generator_flags']['output_dir'] 92 filepath = params['generator_flags']['output_dir']
90 except KeyError: 93 except KeyError:
91 filepath = '.' 94 filepath = '.'
92 filename = os.path.join(filepath, 'dump.json') 95 filename = os.path.join(filepath, 'dump.json')
93 f = open(filename, 'w') 96 f = open(filename, 'w')
94 json.dump(edges, f) 97 json.dump(edges, f)
95 f.close() 98 f.close()
96 print 'Wrote json to %s.' % filename 99 print 'Wrote json to %s.' % filename
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