File tree Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -11,11 +11,31 @@ environment:
11
11
- python : 38
12
12
- python : 38-x64
13
13
- python : 39
14
- image : Visual Studio 2019
14
+ python_version : 3.9.0
15
15
- python : 39-x64
16
- image : Visual Studio 2019
16
+ python_version : 3.9.0
17
17
18
18
install :
19
+ - ps : |
20
+ # from https://github.com/appveyor/build-images/blob/27bde614bc60d7ef7a8bc46182f4d7582fa11b56/scripts/Windows/install_python.ps1#L88-L108
21
+ function InstallPythonEXE($targetPath, $version) {
22
+ $urlPlatform = ""
23
+ if ($targetPath -match '-x64$') {
24
+ $urlPlatform = "-amd64"
25
+ }
26
+ Write-Host "Installing Python $version$urlPlatform to $($targetPath)..." -ForegroundColor Cyan
27
+ $downloadUrl = "https://www.python.org/ftp/python/$version/python-$version$urlPlatform.exe"
28
+ Write-Host "Downloading $($downloadUrl)..."
29
+ $exePath = "$env:TEMP\python-$version.exe"
30
+ (New-Object Net.WebClient).DownloadFile($downloadUrl, $exePath)
31
+ Write-Host "Installing..."
32
+ cmd /c start /wait $exePath /quiet TargetDir="$targetPath" Shortcuts=0 Include_launcher=1 InstallLauncherAllUsers=1 Include_debug=1
33
+ Remove-Item $exePath
34
+ Write-Host "Installed Python $version" -ForegroundColor Green
35
+ }
36
+ if ( -not ( Test-Path -Path C:\\Python$env:PYTHON -PathType Container ) ) {
37
+ InstallPythonEXE C:\\Python$env:PYTHON $env:PYTHON_VERSION
38
+ }
19
39
- SET PATH=C:\\Python%PYTHON%;c:\\Python%PYTHON%\\scripts;%PATH%
20
40
- python -m pip install -U pip wheel setuptools
21
41
You can’t perform that action at this time.
0 commit comments