コード例 #1
0
ファイル: yaml.py プロジェクト: lool/snapcraft
def _runtime_env(root):
    """Set the environment variables required for running binaries."""
    env = []

    env.append('PATH="' + ':'.join([
        '{0}/bin',
        '{0}/usr/bin',
        '$PATH'
    ]).format(root) + '"')

    # Add the default LD_LIBRARY_PATH
    env.append('LD_LIBRARY_PATH="' + ':'.join([
        '{0}/lib',
        '{0}/usr/lib',
        '{0}/lib/{1}',
        '{0}/usr/lib/{1}',
        '$LD_LIBRARY_PATH'
    ]).format(root, common.get_arch_triplet()) + '"')

    # Add more specific LD_LIBRARY_PATH if necessary
    ld_library_paths = libraries.determine_ld_library_path(root)
    if ld_library_paths:
        env.append('LD_LIBRARY_PATH="' + ':'.join(ld_library_paths) +
                   ':$LD_LIBRARY_PATH"')

    return env
コード例 #2
0
def _runtime_env(root):
    """Set the environment variables required for running binaries."""
    env = []

    env.append('PATH="' + ':'.join([
        '{0}/bin',
        '{0}/usr/bin',
        '$PATH'
    ]).format(root) + '"')

    # Add the default LD_LIBRARY_PATH
    env.append('LD_LIBRARY_PATH="' + ':'.join([
        '{0}/lib',
        '{0}/usr/lib',
        '{0}/lib/{1}',
        '{0}/usr/lib/{1}',
        '$LD_LIBRARY_PATH'
    ]).format(root, common.get_arch_triplet()) + '"')

    # Add more specific LD_LIBRARY_PATH if necessary
    ld_library_paths = libraries.determine_ld_library_path(root)
    if ld_library_paths:
        env.append('LD_LIBRARY_PATH="' + ':'.join(ld_library_paths) +
                   ':$LD_LIBRARY_PATH"')

    return env
コード例 #3
0
ファイル: yaml.py プロジェクト: earnubs/snapcraft
    def runtime_env(self, root):
        env = []
        env.append('PATH="' + ":".join(["{0}/bin", "{0}/usr/bin", "$PATH"]).format(root) + '"')

        # Add the default LD_LIBRARY_PATH
        env.append(
            'LD_LIBRARY_PATH="'
            + ":".join(["{0}/lib", "{0}/usr/lib", "{0}/lib/{1}", "{0}/usr/lib/{1}", "$LD_LIBRARY_PATH"]).format(
                root, common.get_arch_triplet()
            )
            + '"'
        )

        # Add more specific LD_LIBRARY_PATH if necessary
        ld_library_paths = libraries.determine_ld_library_path(root)
        if ld_library_paths:
            env.append('LD_LIBRARY_PATH="' + ":".join(ld_library_paths) + ':$LD_LIBRARY_PATH"')

        return env
コード例 #4
0
ファイル: yaml.py プロジェクト: dplanella/snapcraft
def _runtime_env(root):
    """Set the environment variables required for running binaries."""
    env = []

    env.append('PATH="' + ':'.join([
        '{0}/bin',
        '{0}/usr/bin',
        '$PATH'
    ]).format(root) + '"')

    # Add the default LD_LIBRARY_PATH
    library_path = _get_library_paths(
        'LD_LIBRARY_PATH', root, prepend='', sep=':')
    if library_path:
        env.append(library_path)

    # Add more specific LD_LIBRARY_PATH if necessary
    ld_library_paths = libraries.determine_ld_library_path(root)
    if ld_library_paths:
        env.append('LD_LIBRARY_PATH="' + ':'.join(ld_library_paths) +
                   ':$LD_LIBRARY_PATH"')

    return env