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))
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) if clang: # download the llvm package key for the repositories print('Downloading LLVM Key...') try: download(llvm_key_url, 'llvm.key') except DownloadError as e: exit(e) # add llvm key to apt print('Adding LLVM Key to APT...') sudo('apt-key', 'add', 'llvm.key') # add the appropriate 'PPA' print('Adding Clang APT Repository...') sudo('add-apt-repository', '--yes', repository[version])
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) if clang: # download the llvm package key for the repositories print('Downloading LLVM Key...') try: download(llvm_key_url, 'llvm.key') except DownloadError as e: exit(e) # add llvm key to apt print('Adding LLVM Key to APT...') sudo('apt-key', 'add', 'llvm.key') # add the appropriate 'PPA' print('Adding Clang APT Repository...')