def download_builds(build_numbers, product="houdini"): """Download and a list of builds. Build numbers can be explicit numbers or major.minor versions. :param build_numbers: A list of build numbers to process. :type build_numbers: list(str) :return: """ # Download to the first available installation location. download_dir = os.path.expandvars( _SETTINGS_MANAGER.system.locations[0]) archive_paths = [] for build_number in build_numbers: # Get the build file name for the current day version, build = _get_build_to_download(build_number) downloaded_path = sidefx_web_api.download_build(download_dir, version, build, product=product) if downloaded_path is not None: archive_paths.append(downloaded_path) return archive_paths
def download_and_install(build_numbers, create_symlink=False): """Download and install a list of build numbers. Build numbers can be explicit numbers or major.minor versions. :param build_numbers: A list of build numbers to process. :type build_numbers: list(str) :param create_symlink: Whether or not to create a major.minor symlink. :type create_symlink: bool :return: """ # Download to the first available installation location. download_dir = os.path.expandvars( _SETTINGS_MANAGER.system.locations[0]) for build_number in build_numbers: # Get the build file name for the current day version, build = _get_build_to_download(build_number) downloaded_path = sidefx_web_api.download_build( download_dir, version, build) if downloaded_path is not None: package = HoudiniInstallFile(downloaded_path) package.install(create_symlink)