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

Side by Side Diff: pylib/gyp/__init__.py

Issue 739303003: Cleanup pylint errors (Closed) Base URL: http://gyp.googlecode.com/svn/trunk
Patch Set: it's clean now 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 | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 2
3 # Copyright (c) 2012 Google Inc. All rights reserved. 3 # Copyright (c) 2012 Google Inc. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 import copy 7 import copy
8 import gyp.input 8 import gyp.input
9 import optparse 9 import optparse
10 import os.path 10 import os.path
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 364
365 if home_dot_gyp and not os.path.exists(home_dot_gyp): 365 if home_dot_gyp and not os.path.exists(home_dot_gyp):
366 home_dot_gyp = None 366 home_dot_gyp = None
367 367
368 if not options.formats: 368 if not options.formats:
369 # If no format was given on the command line, then check the env variable. 369 # If no format was given on the command line, then check the env variable.
370 generate_formats = [] 370 generate_formats = []
371 if options.use_environment: 371 if options.use_environment:
372 generate_formats = os.environ.get('GYP_GENERATORS', []) 372 generate_formats = os.environ.get('GYP_GENERATORS', [])
373 if generate_formats: 373 if generate_formats:
374 generate_formats = re.split('[\s,]', generate_formats) 374 generate_formats = re.split(r'[\s,]', generate_formats)
375 if generate_formats: 375 if generate_formats:
376 options.formats = generate_formats 376 options.formats = generate_formats
377 else: 377 else:
378 # Nothing in the variable, default based on platform. 378 # Nothing in the variable, default based on platform.
379 if sys.platform == 'darwin': 379 if sys.platform == 'darwin':
380 options.formats = ['xcode'] 380 options.formats = ['xcode']
381 elif sys.platform in ('win32', 'cygwin'): 381 elif sys.platform in ('win32', 'cygwin'):
382 options.formats = ['msvs'] 382 options.formats = ['msvs']
383 else: 383 else:
384 options.formats = ['make'] 384 options.formats = ['make']
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 'build_files': build_files, 489 'build_files': build_files,
490 'generator_flags': generator_flags, 490 'generator_flags': generator_flags,
491 'cwd': os.getcwd(), 491 'cwd': os.getcwd(),
492 'build_files_arg': build_files_arg, 492 'build_files_arg': build_files_arg,
493 'gyp_binary': sys.argv[0], 493 'gyp_binary': sys.argv[0],
494 'home_dot_gyp': home_dot_gyp, 494 'home_dot_gyp': home_dot_gyp,
495 'parallel': options.parallel, 495 'parallel': options.parallel,
496 'root_targets': options.root_targets} 496 'root_targets': options.root_targets}
497 497
498 # Start with the default variables from the command line. 498 # Start with the default variables from the command line.
499 # pylint: disable=unbalanced-tuple-unpacking
499 [generator, flat_list, targets, data] = Load( 500 [generator, flat_list, targets, data] = Load(
500 build_files, format, cmdline_default_variables, includes, options.depth, 501 build_files, format, cmdline_default_variables, includes, options.depth,
501 params, options.check, options.circular_check) 502 params, options.check, options.circular_check)
502 503
503 # TODO(mark): Pass |data| for now because the generator needs a list of 504 # TODO(mark): Pass |data| for now because the generator needs a list of
504 # build files that came in. In the future, maybe it should just accept 505 # build files that came in. In the future, maybe it should just accept
505 # a list, and not the whole data dict. 506 # a list, and not the whole data dict.
506 # NOTE: flat_list is the flattened dependency graph specifying the order 507 # NOTE: flat_list is the flattened dependency graph specifying the order
507 # that targets may be built. Build systems that operate serially or that 508 # that targets may be built. Build systems that operate serially or that
508 # need to have dependencies defined before dependents reference them should 509 # need to have dependencies defined before dependents reference them should
(...skipping 17 matching lines...) Expand all
526 except GypError, e: 527 except GypError, e:
527 sys.stderr.write("gyp: %s\n" % e) 528 sys.stderr.write("gyp: %s\n" % e)
528 return 1 529 return 1
529 530
530 # NOTE: setuptools generated console_scripts calls function with no arguments 531 # NOTE: setuptools generated console_scripts calls function with no arguments
531 def script_main(): 532 def script_main():
532 return main(sys.argv[1:]) 533 return main(sys.argv[1:])
533 534
534 if __name__ == '__main__': 535 if __name__ == '__main__':
535 sys.exit(script_main()) 536 sys.exit(script_main())
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698