Index: recipe_engine/recipe_api.py |
diff --git a/recipe_engine/recipe_api.py b/recipe_engine/recipe_api.py |
index 8827e4c4cf81994edf679d5d216406a3d7829fd6..7f5bbc003677176a965b7d07d77d889651251848 100644 |
--- a/recipe_engine/recipe_api.py |
+++ b/recipe_engine/recipe_api.py |
@@ -88,11 +88,11 @@ class PropertiesClient(object): |
IDENT = 'properties' |
- def __init__(self, engine): |
- self._engine = engine |
+ def __init__(self, properties): |
+ self._properties = properties |
def get_properties(self): |
- return copy.deepcopy(self._engine.properties) |
+ return copy.deepcopy(self._properties) |
class StepClient(object): |
@@ -127,6 +127,31 @@ class StepClient(object): |
return self._engine.run_step(StepConfig.create(**step_dict)) |
+class PlatformClient(object): |
+ """A recipe engine client to expose a common view of the running platform.""" |
+ |
+ IDENT = 'platform' |
+ |
+ def __init__(self, plat): |
+ self._plat = plat |
+ |
+ # Export normalization methods. |
+ self.norm_plat = plat.norm_plat |
+ self.norm_bits = plat.norm_bits |
+ |
+ @property |
+ def name(self): |
+ return self._plat.name |
+ |
+ @property |
+ def bits(self): |
+ return self._plat.bits |
+ |
+ @property |
+ def arch(self): |
+ return self._plat.arch |
+ |
+ |
class DependencyManagerClient(object): |
"""A recipe engine client representing the dependency manager.""" |