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

Unified Diff: gclient.py

Issue 10127004: Add the ability to specify a target_os for gclient solutions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: Created 8 years, 8 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
« no previous file with comments | « no previous file | tests/gclient_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gclient.py
===================================================================
--- gclient.py (revision 134268)
+++ gclient.py (working copy)
@@ -47,6 +47,14 @@
{ "pattern": "\\.(gif|jpe?g|pr0n|png)$",
"action": ["python", "image_indexer.py", "--all"]},
]
+
+Specifying a target OS
+ An optional key named "target_os" may be added to a gclient file to specify
+ one or more additional operating systems that should be considered when
+ processing the deps_os dict of a DEPS file.
+
+ Example:
+ target_os = [ "android" ]
"""
__version__ = "0.6.4"
@@ -843,6 +851,10 @@
except SyntaxError, e:
gclient_utils.SyntaxErrorToError('.gclient', e)
+ # Append any target OS that is not already being enforced to the tuple.
+ target_os = config_dict.get('target_os', [])
+ self._enforced_os = tuple(set(self._enforced_os).union(target_os))
+
deps_to_add = []
for s in config_dict.get('solutions', []):
try:
« no previous file with comments | « no previous file | tests/gclient_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698