summaryrefslogtreecommitdiff
path: root/buildstream/element.py
diff options
context:
space:
mode:
authorJim MacArthur <jim.macarthur@codethink.co.uk>2018-07-29 20:51:44 +0100
committerJim MacArthur <jim.macarthur@codethink.co.uk>2018-08-15 15:33:05 +0100
commit3341948a60f493163605b1e311c412b7d5df09e5 (patch)
treeafc4eb67304528f824d784da104e177d3599a44e /buildstream/element.py
parentb84218a42109bdf7a5b390b2db96926e28c592d1 (diff)
downloadbuildstream-3341948a60f493163605b1e311c412b7d5df09e5.tar.gz
Move KeyStrength enum out to element_enums.py
Diffstat (limited to 'buildstream/element.py')
-rw-r--r--buildstream/element.py39
1 files changed, 3 insertions, 36 deletions
diff --git a/buildstream/element.py b/buildstream/element.py
index bb205c777..40cac47cd 100644
--- a/buildstream/element.py
+++ b/buildstream/element.py
@@ -78,7 +78,6 @@ import stat
import copy
from collections import Mapping, OrderedDict
from contextlib import contextmanager
-from enum import Enum
import tempfile
import shutil
@@ -98,41 +97,9 @@ from .plugin import CoreWarnings
from .sandbox._config import SandboxConfig
from .storage.directory import Directory
-from .storage._filebaseddirectory import FileBasedDirectory, VirtualDirectoryError
-
-
-# _KeyStrength():
-#
-# Strength of cache key
-#
-class _KeyStrength(Enum):
-
- # Includes strong cache keys of all build dependencies and their
- # runtime dependencies.
- STRONG = 1
-
- # Includes names of direct build dependencies but does not include
- # cache keys of dependencies.
- WEAK = 2
-
-
-class Scope(Enum):
- """Types of scope for a given element"""
-
- ALL = 1
- """All elements which the given element depends on, following
- all elements required for building. Including the element itself.
- """
-
- BUILD = 2
- """All elements required for building the element, including their
- respective run dependencies. Not including the given element itself.
- """
-
- RUN = 3
- """All elements required for running the element. Including the element
- itself.
- """
+from .storage._filebaseddirectory import FileBasedDirectory
+from .storage.directory import VirtualDirectoryError
+from .element_enums import _KeyStrength, Scope
class ElementError(BstError):