Skip to content

Commit b4137a4

Browse files
author
Clement Champetier
committed
Appveyor: fixed python version used if the build target is x64
1 parent 46edcf8 commit b4137a4

File tree

1 file changed

+28
-11
lines changed

1 file changed

+28
-11
lines changed

appveyor.yml

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,48 @@ os:
22
- Windows Server 2012 R2
33

44
platform:
5-
- x86
5+
#- x86
66
- x64
77

88
environment:
9-
FFMPEG_VERSION: 2.4.5
10-
DEPENDENCY_INSTALL_PATH: C:\ProgramData\ffmpeg-2.4.5
11-
AVTRANSCODER_INSTALL_PATH: C:\projects\avtranscoder\build\install
9+
global:
10+
FFMPEG_VERSION: 2.4.5
11+
DEPENDENCY_INSTALL_PATH: C:\ProgramData\ffmpeg-2.4.5
12+
AVTRANSCODER_INSTALL_PATH: C:\projects\avtranscoder\build\install
1213

13-
matrix:
14-
fast_finish: true
14+
matrix:
15+
- fast_finish: true
1516

1617
init:
1718
- call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" %platform%
1819

19-
before_build:
20+
install:
21+
# Install build dependencies
2022
- choco install -y swig
2123
- tools/appveyor/win.install.deps.bat
2224

23-
build_script:
24-
- tools/appveyor/build.bat
25+
# Get the correct python version
26+
- ps: if($env:build_platform -eq 'x86') {
27+
$env:PYTHON = "C:\Python27";
28+
}
29+
else {
30+
$env:PYTHON = "C:\Python27-x64";
31+
}
32+
# Prepend newly installed Python to the PATH of this build
33+
- cmd: set PATH=%PYTHON%;%PYTHON%\Scripts;%PATH%
34+
- cmd: echo %PATH%
35+
# Check that we have the expected version and architecture for Python
36+
- "python --version"
37+
- "python -c \"import struct; print(struct.calcsize('P') * 8)\""
38+
# Upgrade to the latest version of pip to avoid it displaying warnings about it being out of date.
39+
- pip install --disable-pip-version-check --user --upgrade pip
2540

26-
before_test:
27-
- set PATH=C:\Python27\scripts;%PATH%
41+
# Install tests dependencies
2842
- pip install nose
2943

44+
build_script:
45+
- tools/appveyor/build.bat
46+
3047
test_script:
3148
- cd ..
3249
- tools/appveyor/python.nosetests.bat

0 commit comments

Comments
 (0)