From: Matthew Fernandez Date: Fri, 23 Jul 2021 01:35:09 +0000 (-0700) Subject: install Python3 to a known path in Windows CI X-Git-Tag: 2.49.0~38^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b958b60642ab38dfeb69d559779ed81bfebe0384;p=graphviz install Python3 to a known path in Windows CI This avoids a latent problem wherein Python is installed to a directory containing its version number and the follow on `Path` manipulation was hard coded to Python 3.9. This would have broken as soon as Python 3.10 became available through Chocolatey. Closes #2085. Note, I still do not understand why the documented technique Chocolatey recommends of `refreshenv` does not work. --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b1cf1c1d4..429287f60 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -126,8 +126,8 @@ portable-source: script: - $ErrorActionPreference = "Stop" - $PSDefaultParameterValues['Out-File:Encoding'] = 'utf8' - - choco install --yes --no-progress python3 - - $env:Path = "C:\Python39;" + $env:Path + - choco install --yes --no-progress --params "/InstallDir:C:\Python3" python3 + - $env:Path = "C:\Python3;" + $env:Path - python --version - python -m pip install --requirement requirements.txt # Toolchain definitions