From a2e529a05bea2efdd2a099eeaf0df6102f7da196 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gr=C3=A9goire=20KUBLER?= <gregoire.kubler@proton.me>
Date: Fri, 28 Jun 2024 13:25:18 +0200
Subject: [PATCH] fix : cibuildwheel aidge_dependencies env var considered as
 string and properly handled

---
 .../ci/cibuildwheel_build_deps_before_build_wheel.ps1 | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/.gitlab/ci/cibuildwheel_build_deps_before_build_wheel.ps1 b/.gitlab/ci/cibuildwheel_build_deps_before_build_wheel.ps1
index 256aaf6a..4a956ba1 100755
--- a/.gitlab/ci/cibuildwheel_build_deps_before_build_wheel.ps1
+++ b/.gitlab/ci/cibuildwheel_build_deps_before_build_wheel.ps1
@@ -1,16 +1,17 @@
 $ErrorActionPreference = "Stop"
 
-if ($($env:AIDGE_DEPENDENCIES -split " ").Length -eq 0) {
+$AIDGE_DEPENDENCIES = Invoke-Expression $env:AIDGE_DEPENDENCIES
+Write-Host "Aidge dependencies : $AIDGE_DEPENDENCIES"
+if ( $($AIDGE_DEPENDENCIES.Length) -eq 0) {
         Write-Host "- No dependencies provided for current repsitory"
         New-Item -ItemType Directory -Force -Path ".\build" | Out-Null
         Remove-Item -Path ".\build\*" -Recurse -Force
     } else {
-        Write-Host "Retrieving given dependencies to build current package : $env:AIDGE_DEPENDENCIES"
-    foreach ($dep in $($env:AIDGE_DEPENDENCIES -split " ")) {
+        Write-Host "Retrieving given dependencies to build current package : $AIDGE_DEPENDENCIES"
+    foreach ($dep in $($AIDGE_DEPENDENCIES -split " ")) {
         Write-Host "Retrieving : $dep"
         $curr_loc=$(Get-Location)
         Set-Location ../$dep
-        Write-Host "YYEETEEEEEEEEEEEEt"
         Get-Location 
         Get-ChildItem .
         New-Item -Path ".\build" -ItemType Directory -Force | Out-Null
@@ -18,4 +19,4 @@ if ($($env:AIDGE_DEPENDENCIES -split " ").Length -eq 0) {
         python -m pip install . -v
         Set-Location $curr_loc
     }
-}
\ No newline at end of file
+}
-- 
GitLab