Bug 1256573 - Add missing primitives to the ConfigureSandbox documentation. r?nalexander
Not directly related, but since this bug is about to add another primitive...
--- a/python/mozbuild/mozbuild/configure/__init__.py
+++ b/python/mozbuild/mozbuild/configure/__init__.py
@@ -52,25 +52,28 @@ def forbidden_import(*args, **kwargs):
raise ImportError('Importing modules is forbidden')
class ConfigureSandbox(dict):
"""Represents a sandbox for executing Python code for build configuration.
This is a different kind of sandboxing than the one used for moz.build
processing.
- The sandbox has 5 primitives:
+ The sandbox has 8 primitives:
- option
- depends
- template
- advanced
- include
+ - set_config
+ - set_define
+ - imply_option
- `option` and `include` are functions. `depends`, `template` and `advanced`
- are decorators.
+ `option`, `include`, `set_config`, `set_define` and `imply_option` are
+ functions. `depends`, `template` and `advanced` are decorators.
These primitives are declared as name_impl methods to this class and
the mapping name -> name_impl is done automatically in __getitem__.
Additional primitives should be frowned upon to keep the sandbox itself as
simple as possible. Instead, helpers should be created within the sandbox
with the existing primitives.