summaryrefslogtreecommitdiff
path: root/src/buildstream/_project.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/buildstream/_project.py')
-rw-r--r--src/buildstream/_project.py8
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():