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

Side by Side Diff: recipe_engine/package.py

Issue 1421843006: Add simple depends_on API. (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/recipes-py@master
Patch Set: Remove old expectation, move tests to their own folder. Created 5 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 | « recipe_engine/loader.py ('k') | recipe_engine/recipe_api.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 import ast 1 import ast
2 import collections 2 import collections
3 import contextlib 3 import contextlib
4 import copy 4 import copy
5 import functools 5 import functools
6 import itertools 6 import itertools
7 import logging 7 import logging
8 import os 8 import os
9 import subprocess 9 import subprocess
10 import sys 10 import sys
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 for repo in self._repos.values(): 610 for repo in self._repos.values():
611 for subdir in repo.recipe_dirs: 611 for subdir in repo.recipe_dirs:
612 yield str(subdir) 612 yield str(subdir)
613 613
614 @property 614 @property
615 def all_module_dirs(self): 615 def all_module_dirs(self):
616 for repo in self._repos.values(): 616 for repo in self._repos.values():
617 for subdir in repo.module_dirs: 617 for subdir in repo.module_dirs:
618 yield str(subdir) 618 yield str(subdir)
619 619
620 @property
621 def engine_recipes_py(self):
622 return os.path.join(self._context.repo_root, 'recipes.py')
623
620 624
621 def _run_cmd(cmd, cwd=None): 625 def _run_cmd(cmd, cwd=None):
622 cwd_str = ' (in %s)' % cwd if cwd else '' 626 cwd_str = ' (in %s)' % cwd if cwd else ''
623 logging.info('%s%s', cmd, cwd_str) 627 logging.info('%s%s', cmd, cwd_str)
624 subprocess.check_call(cmd, cwd=cwd) 628 subprocess.check_call(cmd, cwd=cwd)
625 629
626 630
627 def _merge2(xs, ys, compare=lambda x, y: x <= y): 631 def _merge2(xs, ys, compare=lambda x, y: x <= y):
628 """Merges two sorted iterables, preserving sort order. 632 """Merges two sorted iterables, preserving sort order.
629 633
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 >>> d = { 'x': 1, 'y': 2 } 696 >>> d = { 'x': 1, 'y': 2 }
693 >>> sorted(_updated(d, { 'y': 3, 'z': 4 }).items()) 697 >>> sorted(_updated(d, { 'y': 3, 'z': 4 }).items())
694 [('x', 1), ('y', 3), ('z', 4)] 698 [('x', 1), ('y', 3), ('z', 4)]
695 >>> sorted(d.items()) 699 >>> sorted(d.items())
696 [('x', 1), ('y', 2)] 700 [('x', 1), ('y', 2)]
697 """ 701 """
698 702
699 d = copy.copy(d) 703 d = copy.copy(d)
700 d.update(updates) 704 d.update(updates)
701 return d 705 return d
OLDNEW
« no previous file with comments | « recipe_engine/loader.py ('k') | recipe_engine/recipe_api.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698