Skip to content

Commit d06c4b9

Browse files
WilliamRaynautmfeurer
authored andcommitted
Added appveyor files (#362)
1 parent babe8a6 commit d06c4b9

File tree

2 files changed

+140
-0
lines changed

2 files changed

+140
-0
lines changed

appveyor.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
2+
environment:
3+
global:
4+
CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\appveyor\\scikit-learn-contrib\\run_with_env.cmd"
5+
6+
matrix:
7+
- PYTHON: "C:\\Python35-x64"
8+
PYTHON_VERSION: "3.5"
9+
PYTHON_ARCH: "64"
10+
MINICONDA: "C:\\Miniconda35-x64"
11+
12+
- PYTHON: "C:\\Python35"
13+
PYTHON_VERSION: "3.5"
14+
PYTHON_ARCH: "32"
15+
MINICONDA: "C:\\Miniconda35"
16+
17+
matrix:
18+
fast_finish: true
19+
20+
21+
install:
22+
# Miniconda is pre-installed in the worker build
23+
- "SET PATH=%MINICONDA%;%MINICONDA%\\Scripts;%PATH%"
24+
- "python -m pip install -U pip"
25+
26+
# Check that we have the expected version and architecture for Python
27+
- "python --version"
28+
- "python -c \"import struct; print(struct.calcsize('P') * 8)\""
29+
- "pip --version"
30+
31+
# Remove cygwin because it clashes with conda
32+
# see http://help.appveyor.com/discussions/problems/3712-git-remote-https-seems-to-be-broken
33+
- rmdir C:\\cygwin /s /q
34+
35+
# Update previous packages and install the build and runtime dependencies of the project.
36+
# XXX: setuptools>23 is currently broken on Win+py3 with numpy
37+
# (https://github.com/pypa/setuptools/issues/728)
38+
- conda update --all --yes setuptools=23
39+
40+
# Install the build and runtime dependencies of the project.
41+
- "cd C:\\projects\\openml-python"
42+
- conda install --quiet --yes mock numpy scipy nose requests scikit-learn nbformat python-dateutil nbconvert
43+
- pip install liac-arff xmltodict oslo.concurrency
44+
- "%CMD_IN_ENV% python setup.py install"
45+
46+
47+
# Not a .NET project, we build scikit-learn in the install step instead
48+
build: false
49+
50+
test_script:
51+
- "cd C:\\projects\\openml-python"
52+
- "%CMD_IN_ENV% python setup.py test"

appveyor/run_with_env.cmd

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
:: To build extensions for 64 bit Python 3, we need to configure environment
2+
:: variables to use the MSVC 2010 C++ compilers from GRMSDKX_EN_DVD.iso of:
3+
:: MS Windows SDK for Windows 7 and .NET Framework 4 (SDK v7.1)
4+
::
5+
:: To build extensions for 64 bit Python 2, we need to configure environment
6+
:: variables to use the MSVC 2008 C++ compilers from GRMSDKX_EN_DVD.iso of:
7+
:: MS Windows SDK for Windows 7 and .NET Framework 3.5 (SDK v7.0)
8+
::
9+
:: 32 bit builds, and 64-bit builds for 3.5 and beyond, do not require specific
10+
:: environment configurations.
11+
::
12+
:: Note: this script needs to be run with the /E:ON and /V:ON flags for the
13+
:: cmd interpreter, at least for (SDK v7.0)
14+
::
15+
:: More details at:
16+
:: https://github.com/cython/cython/wiki/64BitCythonExtensionsOnWindows
17+
:: http://stackoverflow.com/a/13751649/163740
18+
::
19+
:: Author: Olivier Grisel
20+
:: License: CC0 1.0 Universal: http://creativecommons.org/publicdomain/zero/1.0/
21+
::
22+
:: Notes about batch files for Python people:
23+
::
24+
:: Quotes in values are literally part of the values:
25+
:: SET FOO="bar"
26+
:: FOO is now five characters long: " b a r "
27+
:: If you don't want quotes, don't include them on the right-hand side.
28+
::
29+
:: The CALL lines at the end of this file look redundant, but if you move them
30+
:: outside of the IF clauses, they do not run properly in the SET_SDK_64==Y
31+
:: case, I don't know why.
32+
@ECHO OFF
33+
34+
SET COMMAND_TO_RUN=%*
35+
SET WIN_SDK_ROOT=C:\Program Files\Microsoft SDKs\Windows
36+
SET WIN_WDK=c:\Program Files (x86)\Windows Kits\10\Include\wdf
37+
38+
:: Extract the major and minor versions, and allow for the minor version to be
39+
:: more than 9. This requires the version number to have two dots in it.
40+
SET MAJOR_PYTHON_VERSION=%PYTHON_VERSION:~0,1%
41+
IF "%PYTHON_VERSION:~3,1%" == "." (
42+
SET MINOR_PYTHON_VERSION=%PYTHON_VERSION:~2,1%
43+
) ELSE (
44+
SET MINOR_PYTHON_VERSION=%PYTHON_VERSION:~2,2%
45+
)
46+
47+
:: Based on the Python version, determine what SDK version to use, and whether
48+
:: to set the SDK for 64-bit.
49+
IF %MAJOR_PYTHON_VERSION% == 2 (
50+
SET WINDOWS_SDK_VERSION="v7.0"
51+
SET SET_SDK_64=Y
52+
) ELSE (
53+
IF %MAJOR_PYTHON_VERSION% == 3 (
54+
SET WINDOWS_SDK_VERSION="v7.1"
55+
IF %MINOR_PYTHON_VERSION% LEQ 4 (
56+
SET SET_SDK_64=Y
57+
) ELSE (
58+
SET SET_SDK_64=N
59+
IF EXIST "%WIN_WDK%" (
60+
:: See: https://connect.microsoft.com/VisualStudio/feedback/details/1610302/
61+
REN "%WIN_WDK%" 0wdf
62+
)
63+
)
64+
) ELSE (
65+
ECHO Unsupported Python version: "%MAJOR_PYTHON_VERSION%"
66+
EXIT 1
67+
)
68+
)
69+
70+
IF %PYTHON_ARCH% == 64 (
71+
IF %SET_SDK_64% == Y (
72+
ECHO Configuring Windows SDK %WINDOWS_SDK_VERSION% for Python %MAJOR_PYTHON_VERSION% on a 64 bit architecture
73+
SET DISTUTILS_USE_SDK=1
74+
SET MSSdk=1
75+
"%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Setup\WindowsSdkVer.exe" -q -version:%WINDOWS_SDK_VERSION%
76+
"%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Bin\SetEnv.cmd" /x64 /release
77+
ECHO Executing: %COMMAND_TO_RUN%
78+
call %COMMAND_TO_RUN% || EXIT 1
79+
) ELSE (
80+
ECHO Using default MSVC build environment for 64 bit architecture
81+
ECHO Executing: %COMMAND_TO_RUN%
82+
call %COMMAND_TO_RUN% || EXIT 1
83+
)
84+
) ELSE (
85+
ECHO Using default MSVC build environment for 32 bit architecture
86+
ECHO Executing: %COMMAND_TO_RUN%
87+
call %COMMAND_TO_RUN% || EXIT 1
88+
)

0 commit comments

Comments
 (0)