Coverage for snapcraft/yaml : 76%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2015 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # 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/>.
'ant-project', 'autotools-project', 'cmake-project', 'go-project', 'make-project', 'maven-project', 'python2-project', 'python3-project', ]
def _validate_file_exists(instance):
def file(self):
def message(self):
def message(self):
def part(self): return self._part
self._part = part
# TODO search the wiki 'Searching the wiki to compose part "{}"'.format( part_name))
raise PluginNotDefinedError(part_name)
plugin_name = plugin_name.rsplit('-project')[0] logger.warning( 'DEPRECATED: plugin names ending in -project are ' 'deprecated. Using {0} instead of {0}-project'.format( plugin_name))
'''Gather the lists of dependencies and adds to all_parts.'''
dep, plugin_name, wiki_part)) raise SnapcraftLogicError( 'part name missing {}'.format(dep))
'''Performs an inneficient but easy to follow sorting of parts.'''
'circular dependency chain found in parts definition')
part_name, plugin_name, properties)
env = [] env.append('PATH="' + ':'.join([ '{0}/bin', '{0}/usr/bin', '$PATH' ]).format(root) + '"') env.append('LD_LIBRARY_PATH="' + ':'.join([ '{0}/lib', '{0}/usr/lib', '{0}/lib/{1}', '{0}/usr/lib/{1}', '$LD_LIBRARY_PATH' ]).format(root, snapcraft.common.get_arch_triplet()) + '"') return env
env = [] env.append('CFLAGS="' + ' '.join([ '-I{0}/include', '-I{0}/usr/include', '-I{0}/include/{1}', '-I{0}/usr/include/{1}', '$CFLAGS' ]).format(root, snapcraft.common.get_arch_triplet()) + '"') env.append('CPPFLAGS="' + ' '.join([ '-I{0}/include', '-I{0}/usr/include', '-I{0}/include/{1}', '-I{0}/usr/include/{1}', '$CPPFLAGS' ]).format(root, snapcraft.common.get_arch_triplet()) + '"') env.append('LDFLAGS="' + ' '.join([ '-L{0}/lib', '-L{0}/usr/lib', '-L{0}/lib/{1}', '-L{0}/usr/lib/{1}', '$LDFLAGS' ]).format(root, snapcraft.common.get_arch_triplet()) + '"') env.append('PKG_CONFIG_SYSROOT_DIR={0}'.format(root)) env.append('PKG_CONFIG_PATH=' + ':'.join([ '{0}/usr/lib/pkgconfig', '{0}/usr/lib/{1}/pkgconfig', '{0}/usr/share/pkgconfig', '{0}/usr/local/lib/pkgconfig', '{0}/usr/local/lib/{1}/pkgconfig', '{0}/usr/local/share/pkgconfig', '$PKG_CONFIG_PATH' ]).format(root, snapcraft.common.get_arch_triplet())) env.append('PERL5LIB={0}/usr/share/perl5/'.format(root)) return env
"""Return a build env of all the part's dependencies."""
env = [] stagedir = snapcraft.common.get_stagedir() for dep_part in part.deps: env += dep_part.env(stagedir) env += self.build_env_for_part(dep_part, root_part=False)
if root_part: env += part.env(part.installdir) env += self.runtime_env(part.installdir) env += self.build_env(part.installdir) else: env += part.env(stagedir) env += self.runtime_env(stagedir) env += self.build_env(stagedir)
return env
root = common.get_stagedir() env = []
env += self.runtime_env(root) env += self.build_env(root) for part in self.all_parts: env += part.env(root)
return env
root = common.get_snapdir() env = []
env += self.runtime_env(root) for part in self.all_parts: env += part.env(root)
return env
'snapcraft.yaml'))
format_checker=format_check) 'snapcraft validation file is missing from installation path')
'{} on line {} of {}'.format( e.problem, e.problem_mark.line, yaml_file))
'\'{}\' referred to in the \'{}\' fileset but it is not ' 'in filesets'.format(item, stage)) else:
|