Esempio n. 1
0
from utility import LocateError
from utility import getenv
from utility import which
from utility import sudo
from utility import exit
from os.path import normcase as normalize
from os.path import isdir
from os.path import join
from os import getcwd
from os import pathsep
from os import listdir

if __name__ == '__main__':
    print('Checking environment variables...')
    try:
        build_type = getenv('BUILD_TYPE')
        version = getenv('PACKAGE')
        cxx = getenv('CXX')
    except EnvironError as e: exit(e)

    clang = 'clang' in cxx

    print('Installing CMake...')
    sudo('./cmake-amd64.sh', '--skip-license', '--prefix=/usr')

    if clang:
        print('Installing Compiler Dependencies...')
        sudo('apt-get', 'install', '-qq', 'g++-4.9')

    print('Installing Compiler...')
    sudo('apt-get', 'install', '-qq', '{}-{}'.format(cxx, version))
Esempio n. 2
0
cmake_script_url = 'http://cmake.org/files/v3.1/cmake-3.1.3-Linux-x86_64.sh'
llvm_key_url = 'http://llvm.org/apt/llvm-snapshot.gpg.key'

repository = {
    '3.4': 'deb http://llvm.org/apt/precise llvm-toolchain-precise-3.4 main',
    '3.5': 'deb http://llvm.org/apt/precise llvm-toolchain-precise-3.5 main',
    '3.6': 'deb http://llvm.org/apt/precise llvm-toolchain-precise-3.6 main',
}

backport = 'ppa:ubuntu-toolchain-r/test'

if __name__ == '__main__':
    print('Checking environment variables...')
    try:
        version = getenv('PACKAGE')
        cxx = getenv('CXX')
    except EnvironError as e: exit(e)

    clang = 'clang' in cxx

    # download the cmake install script, mark executable
    print('Downloading CMake Installer...')
    try: download(cmake_script_url, 'cmake-amd64.sh')
    except DownloadError as e: exit(e)
    make_executable('cmake-amd64.sh')

    # add gcc to repos
    print('Adding GCC Repository...')
    sudo('add-apt-repository', '--yes', backport)
Esempio n. 3
0
cmake_script_url = 'http://cmake.org/files/v3.1/cmake-3.1.3-Linux-x86_64.sh'
llvm_key_url = 'http://llvm.org/apt/llvm-snapshot.gpg.key'

repository = {
    '3.4': 'deb http://llvm.org/apt/precise llvm-toolchain-precise-3.4 main',
    '3.5': 'deb http://llvm.org/apt/precise llvm-toolchain-precise-3.5 main',
    '3.6': 'deb http://llvm.org/apt/precise llvm-toolchain-precise-3.6 main',
}

backport = 'ppa:ubuntu-toolchain-r/test'

if __name__ == '__main__':
    print('Checking environment variables...')
    try:
        version = getenv('PACKAGE')
        cxx = getenv('CXX')
    except EnvironError as e:
        exit(e)

    clang = 'clang' in cxx

    # download the cmake install script, mark executable
    print('Downloading CMake Installer...')
    try:
        download(cmake_script_url, 'cmake-amd64.sh')
    except DownloadError as e:
        exit(e)
    make_executable('cmake-amd64.sh')

    # add gcc to repos