summaryrefslogtreecommitdiff
path: root/buildstream/_platform/platform.py
diff options
context:
space:
mode:
Diffstat (limited to 'buildstream/_platform/platform.py')
-rw-r--r--buildstream/_platform/platform.py28
1 files changed, 10 insertions, 18 deletions
diff --git a/buildstream/_platform/platform.py b/buildstream/_platform/platform.py
index 8a074eb62..b37964986 100644
--- a/buildstream/_platform/platform.py
+++ b/buildstream/_platform/platform.py
@@ -29,17 +29,13 @@ class Platform():
# Platform()
#
# A class to manage platform-specific details. Currently holds the
- # sandbox factory, the artifact cache and staging operations, as
- # well as platform helpers.
+ # sandbox factory as well as platform helpers.
#
- # Args:
- # context (context): The project context
- #
- def __init__(self, context):
- self.context = context
+ def __init__(self):
+ pass
@classmethod
- def create_instance(cls, *args, **kwargs):
+ def _create_instance(cls):
if sys.platform.startswith('linux'):
backend = 'linux'
else:
@@ -58,23 +54,15 @@ class Platform():
else:
raise PlatformError("No such platform: '{}'".format(backend))
- cls._instance = PlatformImpl(*args, **kwargs)
+ cls._instance = PlatformImpl()
@classmethod
def get_platform(cls):
if not cls._instance:
- raise PlatformError("Platform needs to be initialized first")
+ cls._create_instance()
return cls._instance
##################################################################
- # Platform properties #
- ##################################################################
- @property
- def artifactcache(self):
- raise ImplError("Platform {platform} does not implement an artifactcache"
- .format(platform=type(self).__name__))
-
- ##################################################################
# Sandbox functions #
##################################################################
@@ -92,3 +80,7 @@ class Platform():
def create_sandbox(self, *args, **kwargs):
raise ImplError("Platform {platform} does not implement create_sandbox()"
.format(platform=type(self).__name__))
+
+ def check_sandbox_config(self, config):
+ raise ImplError("Platform {platform} does not implement check_sandbox_config()"
+ .format(platform=type(self).__name__))