blob: 3058e6d6f6d1d4dfc5222e740bd77d0b5fccd038 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# Some things resolved about the execution site,
# so we dont have to repeat this everywhere
#
import os
import sys
import platform
from buildstream import utils, ProgramNotFoundError
try:
OSTREE_CLI = utils.get_host_tool('ostree')
HAVE_OSTREE_CLI = True
except ProgramNotFoundError:
HAVE_OSTREE_CLI = False
try:
from bst_plugins_experimental.sources import _ostree # pylint: disable=unused-import
HAVE_OSTREE = True
except (ImportError, ValueError):
HAVE_OSTREE = False
IS_LINUX = os.getenv('BST_FORCE_BACKEND', sys.platform).startswith('linux')
IS_WSL = (IS_LINUX and 'Microsoft' in platform.uname().release)
IS_WINDOWS = (os.name == 'nt')
|