File: site.py

package info (click to toggle)
bst-external 0.30.0-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 656 kB
  • sloc: python: 3,943; makefile: 53
file content (45 lines) | stat: -rw-r--r-- 931 bytes parent folder | download | duplicates (3)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Some things resolved about the execution site,
# so we don't have to repeat this everywhere
#
import os
import sys

from buildstream import utils, ProgramNotFoundError

try:
    utils.get_host_tool('bzr')
    HAVE_BZR = True
except ProgramNotFoundError:
    HAVE_BZR = False

try:
    utils.get_host_tool('git')
    HAVE_GIT = True
except ProgramNotFoundError:
    HAVE_GIT = False

try:
    utils.get_host_tool('ostree')
    HAVE_OSTREE_CLI = True
except ProgramNotFoundError:
    HAVE_OSTREE_CLI = False

try:
    from buildstream import _ostree
    HAVE_OSTREE = True
except (ImportError, ValueError):
    HAVE_OSTREE = False

try:
    utils.get_host_tool('bwrap')
    HAVE_BWRAP = True
except ProgramNotFoundError:
    HAVE_BWRAP = False

try:
    utils.get_host_tool('lzip')
    HAVE_LZIP = True
except ProgramNotFoundError:
    HAVE_LZIP = False

IS_LINUX = os.getenv('BST_FORCE_BACKEND', sys.platform).startswith('linux')