From a84aba17dc1318b92cfddcb48fb2eaea4d08aff0 Mon Sep 17 00:00:00 2001 From: johnnynunez Date: Thu, 8 May 2025 11:12:48 +0200 Subject: [PATCH] [fix] Update setup function to use Miniforge and correct download URLs --- .github/workflows/scripts/ti_build/python.py | 23 +++++++++++--------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/.github/workflows/scripts/ti_build/python.py b/.github/workflows/scripts/ti_build/python.py index 205fe1021d20e..3bc181591d186 100644 --- a/.github/workflows/scripts/ti_build/python.py +++ b/.github/workflows/scripts/ti_build/python.py @@ -17,20 +17,23 @@ # -- code -- -def setup_mambaforge(prefix): +def setup_miniforge(prefix): u = platform.uname() - if u.system == "Linux": - url = "https://github.com/conda-forge/miniforge/releases/download/23.1.0-1/Mambaforge-23.1.0-1-Linux-x86_64.sh" + if (u.system, u.machine) == ("Linux", "x86_64"): + url = "https://github.com/conda-forge/miniforge/releases/download/25.3.0-1/Miniforge3-25.3.0-1-Linux-x86_64.sh" + download_dep(url, prefix, args=["-bfp", str(prefix)]) + elif (u.system, u.machine) in (("Linux", "arm64"), ("Linux", "aarch64")): + url = "https://github.com/conda-forge/miniforge/releases/download/25.3.0-1/Miniforge3-25.3.0-1-Linux-aarch64.sh" download_dep(url, prefix, args=["-bfp", str(prefix)]) elif (u.system, u.machine) == ("Darwin", "arm64"): - url = "https://github.com/conda-forge/miniforge/releases/download/23.1.0-1/Mambaforge-23.1.0-1-MacOSX-arm64.sh" + url = "https://github.com/conda-forge/miniforge/releases/download/25.3.0-1/Miniforge3-25.3.0-1-MacOSX-arm64.sh" download_dep(url, prefix, args=["-bfp", str(prefix)]) elif (u.system, u.machine) == ("Darwin", "x86_64"): - url = "https://github.com/conda-forge/miniforge/releases/download/23.1.0-1/Mambaforge-23.1.0-1-MacOSX-x86_64.sh" + url = "https://github.com/conda-forge/miniforge/releases/download/25.3.0-1/Miniforge3-25.3.0-1-MacOSX-x86_64.sh" download_dep(url, prefix, args=["-bfp", str(prefix)]) elif u.system == "Windows": url = ( - "https://github.com/conda-forge/miniforge/releases/download/23.1.0-1/Mambaforge-23.1.0-1-Windows-x86_64.exe" + "https://github.com/conda-forge/miniforge/releases/download/25.3.0-1/Miniforge3-25.3.0-1-Windows-x86_64.exe" ) download_dep( url, @@ -82,8 +85,8 @@ def setup_python(version: str) -> Tuple[Command, Command]: windows = platform.system() == "Windows" - prefix = get_cache_home() / "mambaforge" - setup_mambaforge(prefix) + prefix = get_cache_home() / "miniforge" + setup_miniforge(prefix) if windows: conda_path = prefix / "Scripts" / "conda.exe" @@ -92,9 +95,9 @@ def setup_python(version: str) -> Tuple[Command, Command]: if not conda_path.exists(): shutil.rmtree(prefix, ignore_errors=True) - setup_mambaforge(prefix) + setup_miniforge(prefix) if not conda_path.exists(): - raise RuntimeError(f"Failed to setup mambaforge at {prefix}") + raise RuntimeError(f"Failed to setup miniforge at {prefix}") conda = sh.bake(str(conda_path))