diff options
author | Benjamin Schubert <contact@benschubert.me> | 2019-06-11 22:55:29 +0100 |
---|---|---|
committer | Benjamin Schubert <ben.c.schubert@gmail.com> | 2019-06-13 16:05:52 +0100 |
commit | 4ace73c0a9c7e15e544b40eb378d7c4712ab0872 (patch) | |
tree | 1e999672d53e738489be276314a9edd5e403b633 /src/buildstream/_project.py | |
parent | d792c7be809d3e37f440c4cf012f353f76ba69e9 (diff) | |
download | buildstream-bschubert/node-api.tar.gz |
replace node_set for MappingNodebschubert/node-api
Diffstat (limited to 'src/buildstream/_project.py')
-rw-r--r-- | src/buildstream/_project.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/buildstream/_project.py b/src/buildstream/_project.py index 43bdc73c9..70ebb6e63 100644 --- a/src/buildstream/_project.py +++ b/src/buildstream/_project.py @@ -797,7 +797,7 @@ class Project(): output.base_variables = config.get_mapping('variables') # Add the project name as a default variable - _yaml.node_set(output.base_variables, 'project-name', self.name) + output.base_variables['project-name'] = self.name # Extend variables with automatic variables and option exports # Initialize it as a string as all variables are processed as strings. @@ -805,7 +805,7 @@ class Project(): # max-jobs value seems to be around 8-10 if we have enough cores # users should set values based on workload and build infrastructure platform = Platform.get_platform() - _yaml.node_set(output.base_variables, 'max-jobs', str(platform.get_cpu_count(8))) + output.base_variables['max-jobs'] = platform.get_cpu_count(8) # Export options into variables, if that was requested output.options.export_variables(output.base_variables) @@ -947,7 +947,7 @@ class Project(): if plugin_group in node_keys: origin_node = origin.copy() plugins = origin.get_mapping(plugin_group, default={}) - _yaml.node_set(origin_node, 'plugins', [k for k in _yaml.node_keys(plugins)]) + origin_node['plugins'] = [k for k in _yaml.node_keys(plugins)] for group in expected_groups: if group in origin_node: _yaml.node_del(origin_node, group) @@ -956,7 +956,7 @@ class Project(): path = self.get_path_from_node(origin, 'path', check_is_dir=True) # paths are passed in relative to the project, but must be absolute - _yaml.node_set(origin_node, 'path', os.path.join(self.directory, path)) + origin_node['path'] = os.path.join(self.directory, path) destination.append(origin_node) # _warning_is_fatal(): |