@@ -17,28 +17,36 @@ environment:
1717
1818 matrix :
1919 # 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.
2022 - TARGET_ARCH : " x86"
2123 CONDA_PY : " 27"
2224 CONDA_NPY : " 18"
2325 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"
2430 CONDA_INSTALL_LOCN : " C:\\ Miniconda"
2531 - TARGET_ARCH : " x64"
2632 CONDA_PY : " 27"
2733 CONDA_NPY : " 18"
2834 PYTHON_VERSION : " 2.7"
35+ TEST_ALL_IMAGES : " no"
2936 CONDA_INSTALL_LOCN : " C:\\ Miniconda-x64"
3037 - TARGET_ARCH : " x64"
3138 CONDA_PY : " 34"
3239 CONDA_NPY : " 110"
3340 PYTHON_VERSION : " 3.4"
41+ TEST_ALL_IMAGES : " no"
3442 CONDA_INSTALL_LOCN : " C:\\ Miniconda3-x64"
3543 - TARGET_ARCH : " x64"
3644 CONDA_PY : " 35"
3745 CONDA_NPY : " 110"
3846 PYTHON_VERSION : " 3.5"
47+ TEST_ALL_IMAGES : " no"
3948 CONDA_INSTALL_LOCN : " C:\\ Miniconda35-x64"
4049
41-
4250# We always use a 64-bit machine, but can build x86 distributions
4351# with the PYTHON_ARCH variable (which is used by CMD_IN_ENV).
4452platform :
@@ -53,11 +61,14 @@ init:
5361install :
5462 - cmd : set PATH=%CONDA_INSTALL_LOCN%;%CONDA_INSTALL_LOCN%\scripts;%PATH%;
5563 - 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
6067 - 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
6172 # this is now the downloaded conda...
6273 - conda info -a
6374
@@ -68,17 +79,25 @@ install:
6879 # VS tools instead of the also installed Py27 VS compiler (which wouldn't need this workarounds...)
6980 - 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"
7081
82+ # For building, use a new environment which only includes the requirements for mpl
7183 # 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
7387 - activate test-environment
7488 - 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
7690
7791 # Let the install prefer the static builds of the libs
7892 - set LIBRARY_LIB=%CONDA_PREFIX%\Library\lib
7993 - 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
82101 - set MPLBASEDIRLIST=%CONDA_PREFIX%\Library\;.
83102 # enables the local freetype build
84103 - copy ci\travis\setup.cfg .
@@ -88,17 +107,42 @@ install:
88107test_script :
89108 # Now build the thing..
90109 - ' %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"
91135 # Test import of tkagg backend
92136 - python -c "import matplotlib as m; m.use('tkagg'); import matplotlib.pyplot as plt; print(plt.get_backend())"
93137 # tests
94138 - python tests.py
95- # remove to get around libpng issue?
139+ # Generate a html for visual tests
96140 - python visual_tests.py
97141
98142after_test :
99143 # After the tests were a success, build packages (wheels and conda)
100144
101- # Build the wheel
145+ # Build the wheel with the static libs
102146 # Hide the output, the copied files really clutter the build log...
103147 - cmd : ' %CMD_IN_ENV% python setup.py bdist_wheel > NUL:'
104148
@@ -112,7 +156,8 @@ after_test:
112156 - cmd : path
113157 - cmd : where python
114158 - 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'
116161
117162 # Move the conda package into the dist directory, to register it
118163 # as an "artifact" for Appveyor.
0 commit comments