diff options
Diffstat (limited to 'buildstream/_options/option.py')
-rw-r--r-- | buildstream/_options/option.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/buildstream/_options/option.py b/buildstream/_options/option.py index 3accddccb..357eb98d3 100644 --- a/buildstream/_options/option.py +++ b/buildstream/_options/option.py @@ -25,7 +25,8 @@ from .. import _yaml # OPTION_SYMBOLS = [ 'type', - 'description' + 'description', + 'variable' ] @@ -46,6 +47,7 @@ class Option(): def __init__(self, name, definition, pool): self.name = name self.description = None + self.variable = None self.value = None self.pool = pool self.load(definition) @@ -60,6 +62,7 @@ class Option(): # the option def load(self, node): self.description = _yaml.node_get(node, str, 'description') + self.variable = _yaml.node_get(node, str, 'variable', default_value='') or None # load_value() # @@ -83,6 +86,18 @@ class Option(): def set_value(self, value): pass # pragma: nocover + # get_value() + # + # Gets the value of an option in string form, this + # is for the purpose of exporting option values to + # variables which must be in string form. + # + # Returns: + # (str): The value in string form + # + def get_value(self): + pass # pragma: nocover + # resolve() # # Called on each option once, after all configuration |