diff --git a/appveyor.yml b/appveyor.yml index 35fc96b2..bdf8e8c0 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -9,27 +9,33 @@ environment: CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\tools\\appveyor\\run_with_env.cmd" matrix: - - PYTHON: "C:\\Python27_32" + - PYTHON: "C:\\Python27-conda32" PYTHON_VERSION: "2.7" PYTHON_ARCH: "32" # disable other builds until they can be run in parallel - #- PYTHON: "C:\\Python27_64" + #- PYTHON: "C:\\Python27-conda64" # PYTHON_VERSION: "2.7" # PYTHON_ARCH: "64" - #- PYTHON: "C:\\Python34_32" - # PYTHON_VERSION: "3.4.2" + #- PYTHON: "C:\\Python35-conda32" + # PYTHON_VERSION: "3.5" # PYTHON_ARCH: "32" - #- PYTHON: "C:\\Python34_64" - # PYTHON_VERSION: "3.4.2" + #- PYTHON: "C:\\Python35-conda64" + # PYTHON_VERSION: "3.5" # PYTHON_ARCH: "64" install: - # Install Python (from the official .msi of http://python.org) and pip when - # not already installed. + - ECHO "Filesystem root:" + - ps: "ls \"C:/\"" + + # Install Python and all the required packages. - "powershell ./tools/appveyor/install.ps1" + + # Prepend newly installed Python to the PATH of this build + # (this cannot be done from inside the powershell script as it would require + # to restart the parent CMD process). - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%" # Check that we have the expected version and architecture for Python @@ -37,7 +43,6 @@ install: - "python -c \"import struct; print(struct.calcsize('P') * 8)\"" # Install the build and runtime dependencies of the project. - - "%CMD_IN_ENV% pip install -v --trusted-host 28daf2247a33ed269873-7b1aad3fab3cc330e1fd9d109892382a.r6.cf2.rackcdn.com %WHEELHOUSE% -r tools/appveyor/requirements.txt" - "%CMD_IN_ENV% pip install -v -r requirements.txt" - "%CMD_IN_ENV% python setup.py bdist_wheel bdist_wininst" - ps: "ls dist" @@ -45,7 +50,6 @@ install: # Install the generated wheel package to test it - "pip install --pre --no-index --find-links dist/ scikit-image" - # Not a .NET project, we build scikit-image in the install step instead build: false diff --git a/tools/appveyor/install.ps1 b/tools/appveyor/install.ps1 index 0f165d8b..cb7ca679 100644 --- a/tools/appveyor/install.ps1 +++ b/tools/appveyor/install.ps1 @@ -73,6 +73,7 @@ function InstallPython ($python_version, $architecture, $python_home) { } } + function RunCommand ($command, $command_args) { Write-Host $command $command_args Start-Process -FilePath $command -ArgumentList $command_args -Wait -Passthru @@ -172,9 +173,31 @@ function InstallMinicondaPip ($python_home) { } } + +function UpdateConda ($python_home) { + $conda_path = $python_home + "\Scripts\conda.exe" + Write-Host "Updating conda..." + $args = "update --yes conda" + Write-Host $conda_path $args + Start-Process -FilePath "$conda_path" -ArgumentList $args -Wait -Passthru +} + + +function InstallCondaPackages ($python_home, $spec) { + $conda_path = $python_home + "\Scripts\conda.exe" + $args = "install --yes " + $spec + Write-Host ("conda " + $args) + Start-Process -FilePath "$conda_path" -ArgumentList $args -Wait -Passthru +} + + function main () { - InstallPython $env:PYTHON_VERSION $env:PYTHON_ARCH $env:PYTHON - InstallPip $env:PYTHON + #InstallPython $env:PYTHON_VERSION $env:PYTHON_ARCH $env:PYTHON + #InstallPip $env:PYTHON + InstallMiniconda $env:PYTHON_VERSION $env:PYTHON_ARCH $env:PYTHON + InstallMinicondaPip $env:PYTHON + UpdateConda $env:PYTHON + InstallCondaPackages $env:PYTHON "numpy scipy cython wheel nose msvc_runtime" } main diff --git a/tools/appveyor/requirements.txt b/tools/appveyor/requirements.txt deleted file mode 100644 index ec9a6f02..00000000 --- a/tools/appveyor/requirements.txt +++ /dev/null @@ -1,17 +0,0 @@ -# Fetch numpy and scipy wheels from the sklearn rackspace wheelhouse. -# Those wheels were generated by @ogrisel by calling `wheel convert` on -# the binaries from http://www.lfd.uci.edu/~gohlke/pythonlibs/ -# This is a temporary solution. As soon as numpy, scipy and cython provide -# official wheels for windows we can delete this --find-links line. ---find-links http://28daf2247a33ed269873-7b1aad3fab3cc330e1fd9d109892382a.r6.cf2.rackcdn.com/appveyor_pip_index.html - -# fix the versions of binary packages to force the use of the whl -# of the rackspace folder instead of trying to install from PyPI -# wheels are preferred for a given version -numpy>=1.11 -scipy==0.14.0 -cython>=0.21 -matplotlib==1.4.2 -pillow==2.6.1 -wheel -nose