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

Unified Diff: scripts/slave/recipe_universe.py

Issue 1151423002: Move recipe engine to third_party/recipe_engine. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Copyright notices 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 side-by-side diff with in-line comments
Download patch
Index: scripts/slave/recipe_universe.py
diff --git a/scripts/slave/recipe_universe.py b/scripts/slave/recipe_universe.py
new file mode 100644
index 0000000000000000000000000000000000000000..ae5501312cb70f40184d57af82ef2e7a7b71b24b
--- /dev/null
+++ b/scripts/slave/recipe_universe.py
@@ -0,0 +1,27 @@
+# Copyright (c) 2013 The Chromium Authors. All rights reserved.
iannucci 2015/05/27 02:03:27 time happened
luqui 2015/05/28 21:47:38 Acknowledged.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import os
+import sys
+
+BUILD_ROOT = os.path.dirname(os.path.dirname(os.path.dirname(
+ os.path.abspath(__file__))))
+BUILD_INTERNAL_ROOT = os.path.join(
+ os.path.dirname(BUILD_ROOT), 'build_internal')
+
+sys.path.append(os.path.join(BUILD_ROOT, 'third_party'))
+
+_UNIVERSE = None
+def get_universe():
+ from recipe_engine import recipe_loader
+ global _UNIVERSE
+ if _UNIVERSE is None:
+ roots = [BUILD_ROOT, BUILD_INTERNAL_ROOT]
+ _UNIVERSE = recipe_loader.RecipeUniverse(
+ module_dirs=[ os.path.join(root, 'scripts', 'slave', 'recipe_modules')
+ for root in roots ],
+ recipe_dirs=[ os.path.join(root, 'scripts', 'slave', 'recipes')
+ for root in roots ])
+ return _UNIVERSE
+

Powered by Google App Engine
This is Rietveld 408576698