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

Side by Side Diff: recipes.py

Issue 2136303002: Fix bootstrap on windows (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/recipes-py@master
Patch Set: Created 4 years, 5 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 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2015 The LUCI Authors. All rights reserved. 2 # Copyright 2015 The LUCI Authors. All rights reserved.
3 # Use of this source code is governed under the Apache License, Version 2.0 3 # Use of this source code is governed under the Apache License, Version 2.0
4 # that can be found in the LICENSE file. 4 # that can be found in the LICENSE file.
5 5
6 """Tool to interact with recipe repositories. 6 """Tool to interact with recipe repositories.
7 7
8 This tool operates on the nearest ancestor directory containing an 8 This tool operates on the nearest ancestor directory containing an
9 infra/config/recipes.cfg. 9 infra/config/recipes.cfg.
10 """ 10 """
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 args = parser.parse_args() 383 args = parser.parse_args()
384 384
385 if args.use_bootstrap and not os.environ.pop('RECIPES_RUN_BOOTSTRAP', None): 385 if args.use_bootstrap and not os.environ.pop('RECIPES_RUN_BOOTSTRAP', None):
386 subprocess.check_call( 386 subprocess.check_call(
387 [sys.executable, 'bootstrap/bootstrap.py', '--deps-file', 387 [sys.executable, 'bootstrap/bootstrap.py', '--deps-file',
388 'bootstrap/deps.pyl', 'ENV'], 388 'bootstrap/deps.pyl', 'ENV'],
389 cwd=os.path.dirname(os.path.realpath(__file__))) 389 cwd=os.path.dirname(os.path.realpath(__file__)))
390 390
391 os.environ['RECIPES_RUN_BOOTSTRAP'] = '1' 391 os.environ['RECIPES_RUN_BOOTSTRAP'] = '1'
392 args = sys.argv 392 args = sys.argv
393 return subprocess.call( 393 return subprocess.call([os.path.join(
394 [os.path.join( 394 ROOT_DIR, 'ENV', 'bin', 'python'),
dnj 2016/07/11 21:35:52 Note that on Windows this is "python.exe".
martiniss 2016/07/11 23:45:15 Done.
395 os.path.dirname(os.path.realpath(__file__)), 'ENV/bin/python'), 395 os.path.join(ROOT_DIR, 'recipes.py')] + original_sys_argv[1:])
396 os.path.join(ROOT_DIR, 'recipes.py')] + original_sys_argv[1:])
397 396
398 if args.verbose: 397 if args.verbose:
399 logging.getLogger().setLevel(logging.INFO) 398 logging.getLogger().setLevel(logging.INFO)
400 399
401 # Commands which do not require config_file, package_deps, and other objects 400 # Commands which do not require config_file, package_deps, and other objects
402 # initialized later. 401 # initialized later.
403 if args.command == 'remote': 402 if args.command == 'remote':
404 return remote(args) 403 return remote(args)
405 404
406 repo_root, config_file = get_package_config(args) 405 repo_root, config_file = get_package_config(args)
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 ret = main() 461 ret = main()
463 if not isinstance(ret, int): 462 if not isinstance(ret, int):
464 if ret is None: 463 if ret is None:
465 ret = 0 464 ret = 0
466 else: 465 else:
467 print >> sys.stderr, ret 466 print >> sys.stderr, ret
468 ret = 1 467 ret = 1
469 sys.stdout.flush() 468 sys.stdout.flush()
470 sys.stderr.flush() 469 sys.stderr.flush()
471 os._exit(ret) 470 os._exit(ret)
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