azure: Install x86 python in vs2015 image when building for x86

Use the x86 python when building for x86, to allow tests building python
extension modules to work
This commit is contained in:
Jon Turney 2018-11-15 12:25:45 +00:00 committed by Nirbheek Chauhan
parent 48a10af2cf
commit 1a3b3857c9
1 changed files with 5 additions and 1 deletions

View File

@ -44,10 +44,14 @@ steps:
}
if ($env:compiler -eq 'msvc2015') {
if ($env:arch -eq 'x86') {
$forcex86 = "--forcex86"
}
# download and install python3 and add to path (since it's not installed in vs2015 image!)
Set-ExecutionPolicy Bypass -Scope Process -Force
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
choco install python3 -y --no-progress --params "/InstallDir:C:\Python3"
choco install python3 -y --no-progress $forcex86 --params "/InstallDir:C:\Python3"
$env:Path = "C:\Python3;$env:Path"
# add JDK installed in vs2015 image to PATH