diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2015-09-05 17:46:58 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2015-09-05 17:46:58 -0400 |
commit | 71976d676301ab70f7f593ecf48ca07072a06265 (patch) | |
tree | 3f6ce8b1fdf47ebf1d8a50875530ad05204a0229 | |
parent | e1c461d642a5c7d2539c34689525d4cd3f349407 (diff) | |
download | python-coveragepy-git-71976d676301ab70f7f593ecf48ca07072a06265.tar.gz |
Python 3.5 is different in other annoying ways...
-rw-r--r-- | ci/install.ps1 | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/ci/install.ps1 b/ci/install.ps1 index 3ac96e1e..255bb157 100644 --- a/ci/install.ps1 +++ b/ci/install.ps1 @@ -34,7 +34,7 @@ function Download ($filename, $url) { # Download and retry up to 3 times in case of network transient errors. Write-Host "Downloading" $filename "from" $url $retry_attempts = 2 - for($i=0; $i -lt $retry_attempts; $i++){ + for ($i = 0; $i -lt $retry_attempts; $i++) { try { $webclient.DownloadFile($url, $filepath) break @@ -87,12 +87,18 @@ function DownloadPython ($python_version, $platform_suffix) { if (($major -le 2) -or ($major -le 3 -and $minor -le 4)) { $ext = "msi" + if ($platform_suffix) { + $platform_suffix = ".$platform_suffix" + } } else { $ext = "exe" + if ($platform_suffix) { + $platform_suffix = "-$platform_suffix" + } } $filename = "python-$python_version$platform_suffix.$ext" - $url = "$BASE_URL/$dir/$filename" + $url = "$BASE_URL$dir/$filename" $filepath = Download $filename $url return $filepath } @@ -107,7 +113,7 @@ function InstallPython ($python_version, $architecture, $python_home) { if ($architecture -eq "32") { $platform_suffix = "" } else { - $platform_suffix = ".amd64" + $platform_suffix = "amd64" } $installer_path = DownloadPython $python_version $platform_suffix $installer_ext = [System.IO.Path]::GetExtension($installer_path) |