summaryrefslogtreecommitdiff
path: root/morphlib/__init__.py
blob: 7c462aade38597ed0f7be45dc58d65734ac6cd35 (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# Copyright (C) 2011-2015  Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program.  If not, see <http://www.gnu.org/licenses/>.


'''Baserock library.'''


# Import yaml if available. This can go away once Baserock has made a
# release that includes yaml (also in its staging filler).
try:
    import yaml
except ImportError:
    got_yaml = False
    class YAMLError(Exception):
        pass
else:
    got_yaml = True
    YAMLError = yaml.YAMLError


import cliapp

import gitversion

__version__ = gitversion.version


# List of architectures that Morph supports
valid_archs = ['armv7l', 'armv7lhf', 'armv7b', 'testarch',
               'x86_32', 'x86_64', 'ppc64', 'armv8l64', 'armv8b64']

class Error(cliapp.AppException):

    '''Base for all morph exceptions that cause user-visible messages.'''


import artifact
import artifactcachereference
import artifactresolver
import artifactsplitrule
import branchmanager
import bins
import buildbranch
import buildcommand
import buildenvironment
import buildsystem
import builder
import cachedrepo
import cachekeycomputer
import extensions
import extractedtarball
import fsutils
import git
import gitdir
import gitindex
import localartifactcache
import localrepocache
import mountableimage
import morphologyfinder
import morphology
import morphloader
import morphset
import remoteartifactcache
import remoterepocache
import repoaliasresolver
import savefile
import source
import sourcepool
import sourceresolver
import stagingarea
import stopwatch
import sysbranchdir
import systemmetadatadir
import util
import workspace

import yamlparse

import writeexts

import app  # this needs to be last