| Index: recipe_engine/loader.py
|
| diff --git a/recipe_engine/loader.py b/recipe_engine/loader.py
|
| index e9a2e7b5129683475935b880a7ae4179b1878b54..f3d87f2941fa82a46a031a4b3eb81327f4fb107d 100644
|
| --- a/recipe_engine/loader.py
|
| +++ b/recipe_engine/loader.py
|
| @@ -573,6 +573,11 @@ def create_recipe_api(toplevel_package, toplevel_deps, recipe_script_path,
|
| setattr(mod_api.m, k, v)
|
| setattr(mod_api.test_api.m, k, v.test_api)
|
|
|
| + # It is useful to have module's self-reference under .m . This allows
|
| + # passing module's API to other objects within that module, still having
|
| + # access to the module itself, along with all its dependencies.
|
| + setattr(mod_api.m, mod.NAME, mod_api)
|
| +
|
| # Replace class-level Requirements placeholders in the recipe API with
|
| # their instance-level real values.
|
| map(lambda (k, v): setattr(mod_api, k, _resolve_requirement(v, engine)),
|
|
|