コード例 #1
0
ファイル: meta.py プロジェクト: torusJKL/snapcraft
    def _ensure_snapcraft_yaml(self):
        source = project_loader.get_snapcraft_yaml()
        destination = os.path.join(self._snap_dir, 'snap', 'snapcraft.yaml')

        with contextlib.suppress(FileNotFoundError):
            os.remove(destination)

        os.makedirs(os.path.dirname(destination), exist_ok=True)
        file_utils.link_or_copy(source, destination)
コード例 #2
0
ファイル: meta.py プロジェクト: battlemidget/snapcraft
    def _ensure_snapcraft_yaml(self):
        source = project_loader.get_snapcraft_yaml()
        destination = os.path.join(self._snap_dir, 'snap', 'snapcraft.yaml')

        with contextlib.suppress(FileNotFoundError):
            os.remove(destination)

        os.makedirs(os.path.dirname(destination), exist_ok=True)
        file_utils.link_or_copy(source, destination)
コード例 #3
0
ファイル: parser.py プロジェクト: tismith/snapcraft
def _get_origin_data(origin_dir):
    origin_data = {}

    yaml_file = project_loader.get_snapcraft_yaml(base_dir=origin_dir)
    try:
        with open(yaml_file) as fp:
            origin_data = yaml.safe_load(fp)
    except ScannerError as e:
        raise errors.InvalidWikiEntryError(e) from e

    return origin_data
コード例 #4
0
ファイル: parser.py プロジェクト: cholcombe973/snapcraft
def _get_origin_data(origin_dir):
    origin_data = {}

    yaml_file = project_loader.get_snapcraft_yaml(base_dir=origin_dir)
    try:
        with open(yaml_file) as fp:
            origin_data = yaml.load(fp)
    except ScannerError as e:
        raise errors.InvalidWikiEntryError(e) from e

    return origin_data