summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbst-marge-bot <marge-bot@buildstream.build>2020-06-10 17:26:04 +0000
committerbst-marge-bot <marge-bot@buildstream.build>2020-06-10 17:26:04 +0000
commitf1c4825abdc71ec7deeb80555fa8392cd33652bc (patch)
tree4bdc78bc0caf14baedf978e5ec9405ca41397422
parente1ee661c69d6749354d84746e4b4df3ec3d48bbb (diff)
parent2c9d87ef292ffb0b566db49db8f54f73dc37daa3 (diff)
downloadbuildstream-f1c4825abdc71ec7deeb80555fa8392cd33652bc.tar.gz
Merge branch 'tristan/reorganize-project-context-init' into 'master'
Reorginize some __init__() functions See merge request BuildStream/buildstream!1961
-rw-r--r--src/buildstream/_context.py6
-rw-r--r--src/buildstream/_project.py13
2 files changed, 8 insertions, 11 deletions
diff --git a/src/buildstream/_context.py b/src/buildstream/_context.py
index 19e0781c1..c0e92b98e 100644
--- a/src/buildstream/_context.py
+++ b/src/buildstream/_context.py
@@ -63,9 +63,6 @@ class Context:
# The directory where various sources are stored
self.sourcedir = None
- # specs for source cache remotes
- self.source_cache_specs = None
-
# The directory where build sandboxes will be created
self.builddir = None
@@ -85,6 +82,9 @@ class Context:
# Default root location for workspaces
self.workspacedir = None
+ # specs for source cache remotes
+ self.source_cache_specs = None
+
# The locations from which to push and pull prebuilt artifacts
self.artifact_cache_specs = None
diff --git a/src/buildstream/_project.py b/src/buildstream/_project.py
index 508afa68b..96a2ead86 100644
--- a/src/buildstream/_project.py
+++ b/src/buildstream/_project.py
@@ -119,9 +119,6 @@ class Project:
# Absolute path to where elements are loaded from within the project
self.element_path = None
- # Default target elements
- self._default_targets = None
-
# ProjectRefs for the main refs and also for junctions
self.refs = ProjectRefs(self.directory, "project.refs")
self.junction_refs = ProjectRefs(self.directory, "junction.refs")
@@ -135,10 +132,14 @@ class Project:
self.base_environment = {} # The base set of environment variables
self.base_env_nocache = None # The base nocache mask (list) for the environment
+ self.artifact_cache_specs = None
+ self.source_cache_specs = None
+ self.remote_execution_specs = None
+
#
# Private Members
#
-
+ self._default_targets = None # Default target elements
self._default_mirror = default_mirror # The name of the preferred mirror.
self._cli_options = cli_options
@@ -148,10 +149,6 @@ class Project:
self._shell_command = [] # The default interactive shell command
self._shell_environment = {} # Statically set environment vars
self._shell_host_files = [] # A list of HostMount objects
-
- self.artifact_cache_specs = None
- self.source_cache_specs = None
- self.remote_execution_specs = None
self._sandbox = None
self._splits = None