summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan van Berkom <tristan.vanberkom@codethink.co.uk>2020-06-10 19:25:19 +0900
committerJürg Billeter <j@bitron.ch>2020-06-10 15:19:13 +0000
commit1f67e362f2de1a576aa07460430121d43f0befe1 (patch)
treee9f1dbccdf6a86be8af2150cacc8345fdbd5c0a1
parent2e3f498ea91ced268431dd12fd39f59e3f78e6d9 (diff)
downloadbuildstream-tristan/reorganize-project-context-init.tar.gz
_project.py: reorganize __init__()tristan/reorganize-project-context-init
Put the private members in the private section and the public members in public section. The exception is `_context` which is resolved early, and this is required by other code which runs in __init__().
-rw-r--r--src/buildstream/_project.py13
1 files changed, 5 insertions, 8 deletions
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