def remove_directory(path): # Don't know why, but when deleting from python # on Windows it fails to delete '.git' direcotry, # so using shell command if TC.getPlatformSuffix() == 'windows': os.system("rmdir /Q /S %s" % path) # Well yes, on Windows one remove is not enough... if os.path.exists(path): os.system("rmdir /Q /S %s" % path) else: shutil.rmtree(path)
"Path perm_dir/houdini-dependencies == [%s] missing, trying to create." % perm_dir) os.makedirs(perm_dir) os.chdir(perm_dir) get_repo(args.libs_repo, target_name='vray_for_houdini_sdk') os.chdir(build_dir) source_path = os.path.dirname(os.path.dirname(sys.path[0])) source_hash = get_git_head_hash(source_path) os_name = { 'linux': 'linux', 'osx': 'mac', 'windows': 'win' }[TC.getPlatformSuffix()] if TC.getPlatformSuffix() == 'windows': ninja_path = os.path.join(os.environ['VRAY_CGREPO_PATH'], 'build_scripts', 'cmake', 'tools', 'bin') else: ninja_path = os.path.join(os.environ['CI_ROOT'], 'ninja', 'ninja') log_msg('Ninja path [%s]\n' % ninja_path) os.environ['PATH'] = ninja_path + os.pathsep + os.environ['PATH'] class ArgsReplacement(): args = { 'jenkins': True, 'src_hash': source_hash, 'src_dir': source_path, 'upload': False,