Ubuntu Pastebin

Paste from z at Thu, 27 Oct 2016 09:36:33 +0000

Download as text
 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
class TarringStagePlugin(snapcraft.BasePlugin):

    @classmethod
    def schema(cls):
        schema = super().schema()
        schema['properties']['exclude'] = {
            'type': 'array',
            'minitems': 0,
            'uniqueItems': True,
            'items': {
                'type': 'string',
            },
            'default': [],
        }
        schema['properties']['name'] = {
            'type': 'string',
            'default': ''
        }
        # The name must be specified
        schema['required'].append('name')
        return schema

    def __init__(self, name, options, project):
        super().__init__(name, options, project)

        logger.warning("EXPERIMENTAL: The 'tarring_stagge' plugin's "
                       "functionality is under development and all features"
                       "are experimental.")

    def enable_cross_compilation(self):
        pass

    def build(self):
        super().build()
        archive_name = self.options.name

        self.run()
        self.run(['tar czvf'] + archive_name +  TBF_SOURCE, env=env)
Download as text