@@ -276,9 +276,21 @@ jobs:
276276 python -m pip install setuptools
277277 python scripts/extract_dependencies_from_pyproject_toml.py -f "pyproject.toml" -s "\n" > requires.txt
278278
279- # Install the Python requirements
279+ # Install the Python requirements outside a python venv
280280 Get-Content .\requires.txt `
281281 | ForEach-Object {python -m pip install $_.toString()}
282+
283+ # Create and activate a python venv
284+ python -m venv khiops-windows-venv
285+ khiops-windows-venv\Scripts\Activate.ps1
286+
287+ # Install the Python requirements inside a venv
288+ # The venv python executable is used here
289+ Get-Content .\requires.txt `
290+ | ForEach-Object {khiops-windows-venv\Scripts\python -m pip install $_.toString()}
291+
292+ # Deactivate the python venv
293+ deactivate
282294 Remove-Item -force requires.txt
283295 - name : Setup and Install Test Requirements
284296 run : python -m pip install -r test-requirements.txt
@@ -323,6 +335,22 @@ jobs:
323335
324336 # Execute Khiops Coclustering sample (train and deploy model)
325337 Invoke-Expression -Command "$Python -m khiops.samples.samples -i deploy_coclustering -e"
338+
339+ # Install khiops-python in the python venv using the sources
340+ # The venv python executable is used here
341+ Invoke-Expression -Command "khiops-windows-venv\Scripts\python -m pip install ."
342+ # Change directory to avoid using the cloned khiops-python
343+ Invoke-Expression -Command "cd khiops-windows-venv\"
344+
345+ # Print status
346+ # The venv python executable is used here
347+ Invoke-Expression -Command "Scripts\python -c 'import sys; import khiops.core as kh; return_code = kh.get_runner().print_status(); sys.exit(return_code)'"
348+
349+ # The installation status MUST not fail
350+ if ($LASTEXITCODE -ne 0) {
351+ Write-Host "::error::Status error: khiops-python installation status check MUST NOT fail"
352+ exit 1
353+ }
326354 check-khiops-integration-on-linux :
327355 strategy :
328356 fail-fast : false
0 commit comments