Bug 1256573 - Add missing primitives to the ConfigureSandbox documentation. r?nalexander draft
authorMike Hommey <mh+mozilla@glandium.org>
Sun, 27 Mar 2016 09:40:50 +0900
changeset 345020 0af17e39d6d2b34d11097487bc2c08b83b0a03b6
parent 345019 9404497df70e3a12d5206990e89e8c2778f216ab
child 345021 343da66dd75ec84fdc7c7158419b2304b100a729
push id13997
push userbmo:mh+mozilla@glandium.org
push dateSun, 27 Mar 2016 22:55:22 +0000
reviewersnalexander
bugs1256573
milestone48.0a1
Bug 1256573 - Add missing primitives to the ConfigureSandbox documentation. r?nalexander Not directly related, but since this bug is about to add another primitive...
python/mozbuild/mozbuild/configure/__init__.py
--- 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.