From 6344f0b05b4c96f7b4803890cdf8fd9744a1d69d Mon Sep 17 00:00:00 2001 From: Lisandro Dalcin Date: Mon, 25 May 2015 16:05:22 +0300 Subject: AppVeyor: Various fixes and enhancements * Add Python 2.6 x86/x64 to the build matrix. * Use clone_depth option, no need to clone the full repo. * Build master branch and last release branch. * Use up-to-date pip and setuptools. * Build wheels, msi, and wininst installers. --- appveyor/install.ps1 | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) (limited to 'appveyor') diff --git a/appveyor/install.ps1 b/appveyor/install.ps1 index 2f96d26b3..57ff08062 100644 --- a/appveyor/install.ps1 +++ b/appveyor/install.ps1 @@ -51,7 +51,7 @@ function InstallPython ($python_version, $architecture, $python_home) { Write-Host "Installing" $filepath "to" $python_home $args = "/qn /i $filepath TARGETDIR=$python_home" Write-Host "msiexec.exe" $args - Start-Process -FilePath "msiexec.exe" -ArgumentList $args -Wait -Passthru + Start-Process -FilePath "msiexec.exe" -ArgumentList $args -Wait Write-Host "Python $python_version ($architecture) installation complete" return $true } @@ -60,18 +60,28 @@ function InstallPython ($python_version, $architecture, $python_home) { function InstallPip ($python_home) { $pip_path = $python_home + "\Scripts\pip.exe" $python_path = $python_home + "\python.exe" - if (-not(Test-Path $pip_path)) { - Write-Host "Installing pip..." + if (Test-Path $pip_path) { + Write-Host "Upgrading pip" + $args = "-m pip.__main__ install --upgrade pip" + Write-Host "Executing:" $python_path $args + Start-Process -FilePath $python_path -ArgumentList $args -Wait + Write-Host "pip upgrade complete" + } else { + Write-Host "Installing pip" $webclient = New-Object System.Net.WebClient $webclient.DownloadFile($GET_PIP_URL, $GET_PIP_PATH) Write-Host "Executing:" $python_path $GET_PIP_PATH - Start-Process -FilePath "$python_path" -ArgumentList "$GET_PIP_PATH" -Wait -Passthru - } else { - Write-Host "pip already installed." - } + Start-Process -FilePath "$python_path" -ArgumentList "$GET_PIP_PATH" + Write-Host "pip installation complete" + } + Write-Host "Upgrading setuptools" + $args = "install --upgrade setuptools" + Write-Host "Executing:" $pip_path $args + Start-Process -FilePath $pip_path -ArgumentList $args -Wait + Write-Host "setuptools upgrade complete" } -function InstallPackage ($python_home, $pkg) { +function InstallPipPackage ($python_home, $pkg) { $pip_path = $python_home + "\Scripts\pip.exe" & $pip_path install $pkg } @@ -79,7 +89,7 @@ function InstallPackage ($python_home, $pkg) { function main () { InstallPython $env:PYTHON_VERSION $env:PYTHON_ARCH $env:PYTHON InstallPip $env:PYTHON - InstallPackage $env:PYTHON wheel + InstallPipPackage $env:PYTHON wheel } main -- cgit v1.2.1