@@ -17,28 +17,36 @@ environment:
17
17
18
18
matrix :
19
19
# for testing purpose: numpy 1.8 on py2.7, for the rest use 1.10/latest
20
+ # theoretically the CONDA_INSTALL_LOCN could be only two: one for 32bit, one for 64bit
21
+ # but using one for the right python version is hopefully making it fast due to package caching.
20
22
- TARGET_ARCH : " x86"
21
23
CONDA_PY : " 27"
22
24
CONDA_NPY : " 18"
23
25
PYTHON_VERSION : " 2.7"
26
+ # this variable only influence pdf/svg tests, png tests are run on any platform
27
+ # only once, because it basically triples the testing times
28
+ # pick the one which seems to make the most problems
29
+ TEST_ALL_IMAGES : " yes"
24
30
CONDA_INSTALL_LOCN : " C:\\ Miniconda"
25
31
- TARGET_ARCH : " x64"
26
32
CONDA_PY : " 27"
27
33
CONDA_NPY : " 18"
28
34
PYTHON_VERSION : " 2.7"
35
+ TEST_ALL_IMAGES : " no"
29
36
CONDA_INSTALL_LOCN : " C:\\ Miniconda-x64"
30
37
- TARGET_ARCH : " x64"
31
38
CONDA_PY : " 34"
32
39
CONDA_NPY : " 110"
33
40
PYTHON_VERSION : " 3.4"
41
+ TEST_ALL_IMAGES : " no"
34
42
CONDA_INSTALL_LOCN : " C:\\ Miniconda3-x64"
35
43
- TARGET_ARCH : " x64"
36
44
CONDA_PY : " 35"
37
45
CONDA_NPY : " 110"
38
46
PYTHON_VERSION : " 3.5"
47
+ TEST_ALL_IMAGES : " no"
39
48
CONDA_INSTALL_LOCN : " C:\\ Miniconda35-x64"
40
49
41
-
42
50
# We always use a 64-bit machine, but can build x86 distributions
43
51
# with the PYTHON_ARCH variable (which is used by CMD_IN_ENV).
44
52
platform :
@@ -53,11 +61,14 @@ init:
53
61
install :
54
62
- cmd : set PATH=%CONDA_INSTALL_LOCN%;%CONDA_INSTALL_LOCN%\scripts;%PATH%;
55
63
- cmd : set PYTHONUNBUFFERED=1
56
- - cmd : conda install -c http://conda.anaconda.org/pelson/channel/development --yes --quiet obvious-ci
57
- - cmd : obvci_install_conda_build_tools.py
58
- - cmd : conda config --set show_channel_urls yes
59
- # for msinttypes
64
+ # for obvci_appveyor_python_build_env.cmd
65
+ - cmd : conda install -c pelson/channel/development --yes --quiet obvious-ci
66
+ # for msinttypes and newer stuff
60
67
- cmd : conda config --add channels conda-forge
68
+ - cmd : conda config --set show_channel_urls yes
69
+ - cmd : conda config --set always_yes true
70
+ # For building conda packages
71
+ - cmd : conda install --yes conda-build jinja2 anaconda-client
61
72
# this is now the downloaded conda...
62
73
- conda info -a
63
74
@@ -68,17 +79,25 @@ install:
68
79
# VS tools instead of the also installed Py27 VS compiler (which wouldn't need this workarounds...)
69
80
- cmd : copy "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars64.bat" "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\amd64\vcvarsamd64.bat"
70
81
82
+ # For building, use a new environment which only includes the requirements for mpl
71
83
# same things as the requirements in ci/conda_recipe/meta.yaml
72
- - cmd : conda create -y -q -n test-environment python=%PYTHON_VERSION% pip setuptools numpy python-dateutil freetype msinttypes tk pyparsing pytz tornado libpng zlib pyqt cycler nose mock msvc_runtime
84
+ # if conda-forge gets a new pyqt, it might be nice to install it as well to have more backends
85
+ # https://github.com/conda-forge/conda-forge.github.io/issues/157#issuecomment-223536381
86
+ - cmd : conda create -q -n test-environment python=%PYTHON_VERSION% pip setuptools numpy python-dateutil freetype=2.6 msinttypes "tk=8.5" pyparsing pytz tornado "libpng>=1.6.21,<1.7" "zlib=1.2" "cycler>=0.10" nose mock
73
87
- activate test-environment
74
88
- cmd : echo %PYTHON_VERSION% %TARGET_ARCH%
75
- - cmd : IF %PYTHON_VERSION% == 2.7 conda install -y functools32
89
+ - cmd : IF %PYTHON_VERSION% == 2.7 conda install -q functools32
76
90
77
91
# Let the install prefer the static builds of the libs
78
92
- set LIBRARY_LIB=%CONDA_PREFIX%\Library\lib
79
93
- cmd : ' mkdir lib || cmd /c "exit /b 0"'
80
- - copy %LIBRARY_LIB%\zlibstatic.lib lib\z.lib
81
- - copy %LIBRARY_LIB%\libpng_static.lib lib\png.lib
94
+ - copy /Y %LIBRARY_LIB%\zlibstatic.lib lib\z.lib
95
+ - copy /Y %LIBRARY_LIB%\libpng_static.lib lib\png.lib
96
+ # These z.lib / png.lib are not static versions but files which end up as
97
+ # dependencies to the dll file. This is fine for the conda build, but not here
98
+ # and for the wheels
99
+ - del %LIBRARY_LIB%\png.lib
100
+ - del %LIBRARY_LIB%\z.lib
82
101
- set MPLBASEDIRLIST=%CONDA_PREFIX%\Library\;.
83
102
# enables the local freetype build
84
103
- copy ci\travis\setup.cfg .
@@ -88,17 +107,42 @@ install:
88
107
test_script :
89
108
# Now build the thing..
90
109
- ' %CMD_IN_ENV% python setup.py develop'
110
+ # these should show no z, png, or freetype dll...
111
+ - set "DUMPBIN=%VS140COMNTOOLS%\..\..\VC\bin\dumpbin.exe"
112
+ # - cmd: '"%DUMPBIN%" /DEPENDENTS lib\matplotlib\_png*.pyd'
113
+ # - cmd: '"%DUMPBIN%" /DEPENDENTS lib\matplotlib\ft2font*.pyd'
114
+ - cmd : ' "%DUMPBIN%" /DEPENDENTS lib\matplotlib\ft2font*.pyd | findstr freetype.*.dll && exit /b 1 || exit /b 0'
115
+ - cmd : ' "%DUMPBIN%" /DEPENDENTS lib\\matplotlib\\_png*.pyd | findstr z.*.dll && exit /b 1 || exit /b 0'
116
+ - cmd : ' "%DUMPBIN%" /DEPENDENTS lib\\matplotlib\\_png*.pyd | findstr png.*.dll && exit /b 1 || exit /b 0'
117
+
118
+ # this are optional dependencies so that we don't skip so many tests...
119
+ - cmd : conda install -q pillow miktex
120
+ # autoinstall latex packages (0=no, 1=autoinstall, 2=ask)
121
+ # this adds this to the registry!
122
+ - cmd : initexmf --set-config-value "[MPM]AutoInstall=1"
123
+ # we need to put the real exe files into PATH as subprocess can't call bat files
124
+ # this works for the "old" version of the miktex package, then next version should
125
+ # not need it
126
+ - set "PATH=%PATH%;%CONDA_PREFIX%\Library\miktex\miktex\bin"
127
+ # missing packages on conda-forge for ffmpeg avconv mencoder imagemagick inkscape
128
+ - cmd : conda install -q -c menpo ffmpeg # a repackaged version
129
+ # This install sometimes failed randomly :-(
130
+ # - cmd: choco install imagemagick
131
+ # only install inkscape during one test run as it increases the runtime of one
132
+ # test run from 13 min -> 30 min
133
+ - cmd : if x%TEST_ALL_IMAGES% == xyes; choco install inkscape
134
+ - cmd : if x%TEST_ALL_IMAGES% == xyes; set "PATH=%PATH%;C:\Program Files\Inkscape\inkscape.com"
91
135
# Test import of tkagg backend
92
136
- python -c "import matplotlib as m; m.use('tkagg'); import matplotlib.pyplot as plt; print(plt.get_backend())"
93
137
# tests
94
138
- python tests.py
95
- # remove to get around libpng issue?
139
+ # Generate a html for visual tests
96
140
- python visual_tests.py
97
141
98
142
after_test :
99
143
# After the tests were a success, build packages (wheels and conda)
100
144
101
- # Build the wheel
145
+ # Build the wheel with the static libs
102
146
# Hide the output, the copied files really clutter the build log...
103
147
- cmd : ' %CMD_IN_ENV% python setup.py bdist_wheel > NUL:'
104
148
@@ -112,7 +156,8 @@ after_test:
112
156
- cmd : path
113
157
- cmd : where python
114
158
- cmd : ' %CMD_IN_ENV% conda config --get channels'
115
- # - cmd: '%CMD_IN_ENV% conda build .\ci\conda_recipe'
159
+ # currently disabled as conda-build errors :-(
160
+ # - cmd: '%CMD_IN_ENV% conda build -q .\ci\conda_recipe'
116
161
117
162
# Move the conda package into the dist directory, to register it
118
163
# as an "artifact" for Appveyor.
0 commit comments