Commit 6344f0b0 authored by Lisandro Dalcin's avatar Lisandro Dalcin

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.
parent 10a74bb2
......@@ -7,6 +7,10 @@ environment:
WITH_COMPILER: "cmd /E:ON /V:ON /C .\\appveyor\\run_with_compiler.cmd"
matrix:
- PYTHON: "C:\\Python26"
PYTHON_VERSION: "2.6.6"
PYTHON_ARCH: "32"
- PYTHON: "C:\\Python27"
PYTHON_VERSION: "2.7.9"
PYTHON_ARCH: "32"
......@@ -19,6 +23,10 @@ environment:
PYTHON_VERSION: "3.4.3"
PYTHON_ARCH: "32"
- PYTHON: "C:\\Python26-x64"
PYTHON_VERSION: "2.6.6"
PYTHON_ARCH: "64"
- PYTHON: "C:\\Python27-x64"
PYTHON_VERSION: "2.7.9"
PYTHON_ARCH: "64"
......@@ -34,20 +42,32 @@ environment:
PYTHON_ARCH: "64"
WINDOWS_SDK_VERSION: "v7.1"
clone_depth: 5
branches:
only:
- master
- 0.22.x
init:
- "ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH%"
install:
- "powershell appveyor\\install.ps1"
- "%PYTHON%\\python --version"
- "%PYTHON%\\python.exe --version"
- "%PYTHON%\\Scripts\\pip.exe --version"
- "%PYTHON%\\Scripts\\wheel.exe version"
build: off
build_script:
- "%WITH_COMPILER% %PYTHON%\\python.exe setupegg.py build"
- "%WITH_COMPILER% %PYTHON%\\python.exe setupegg.py --quiet bdist_wheel"
- "%WITH_COMPILER% %PYTHON%\\python.exe setupegg.py --quiet bdist_msi"
- "%WITH_COMPILER% %PYTHON%\\python.exe setupegg.py --quiet bdist_wininst"
test: off
test_script:
- "%WITH_COMPILER% %PYTHON%\\python setup.py test"
after_test:
- "%WITH_COMPILER% %PYTHON%\\python setup.py bdist_wheel"
- "%WITH_COMPILER% %PYTHON%\\python.exe setupegg.py test"
artifacts:
- path: dist\*
......
......@@ -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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment