From 71976d676301ab70f7f593ecf48ca07072a06265 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sat, 5 Sep 2015 17:46:58 -0400 Subject: Python 3.5 is different in other annoying ways... --- ci/install.ps1 | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'ci') 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) -- cgit v1.2.1