@@ -45,12 +45,12 @@ platform:
4545build : false
4646
4747init :
48- - " ECHO %PYTHON_VERSION% %CONDA_INSTALL_LOCN%"
48+ - cmd : " ECHO %PYTHON_VERSION% %CONDA_INSTALL_LOCN%"
4949
5050install :
5151 - appveyor DownloadFile "https://raw.githubusercontent.com/pelson/Obvious-CI/master/bootstrap-obvious-ci-and-miniconda.py"
5252 - cmd : python bootstrap-obvious-ci-and-miniconda.py %CONDA_INSTALL_LOCN% %TARGET_ARCH% %CONDA_PY:~0,1% --without-obvci
53- - cmd : set PATH=%PATH%;% CONDA_INSTALL_LOCN%;%CONDA_INSTALL_LOCN%\scripts
53+ - cmd : set PATH=%CONDA_INSTALL_LOCN%;%CONDA_INSTALL_LOCN%\scripts;%PATH%;
5454 - cmd : set PYTHONUNBUFFERED=1
5555 - cmd : conda install -c http://conda.anaconda.org/pelson/channel/development --yes --quiet obvious-ci
5656 - cmd : obvci_install_conda_build_tools.py
@@ -59,12 +59,21 @@ install:
5959 - cmd : conda config --add channels conda-forge
6060 # this is now the downloaded conda...
6161 - conda info -a
62+
63+ # Fix the appveyor build environment to work with conda build
64+ # workaround for missing vcvars64.bat in py34 64bit
65+ - cmd : copy ci\appveyor\vcvars64.bat "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64"
66+ # workaround for conda build on py27 prefering the normal installed
67+ # VS tools instead of the also installed Py27 VS compiler (which wouldn't need this workarounds...)
68+ - 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"
69+
6270 # same things as the requirements in ci/conda_recipe/meta.yaml
6371 - 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
6472 - activate test-environment
6573 - cmd : echo %PYTHON_VERSION% %TARGET_ARCH%
6674 - cmd : IF %PYTHON_VERSION% == 2.7 conda install -y functools32
67- # This is needed for the installer to find the dlls...
75+
76+ # Let the install prefer the static builds of the libs
6877 - set LIBRARY_LIB=%CONDA_DEFAULT_ENV%\Library\lib
6978 - cmd : ' mkdir lib || cmd /c "exit /b 0"'
7079 - copy %LIBRARY_LIB%\zlibstatic.lib lib\z.lib
@@ -87,21 +96,28 @@ test_script:
8796after_test :
8897 # After the tests were a success, build packages (wheels and conda)
8998
90- # There is a bug in wheels which prevents building wheels when the package uses namespaces
91- - cmd : ' %CMD_IN_ENV% python setup.py bdist_wheel'
92- # Note also that our setup.py script, which is called by conda-build, writes
93- # a __conda_version__.txt file, so the version number on the binary package
94- # is set dynamically. This unfortunately means that conda build --output
95- # doesn't really work.
96- - cmd : ' %CMD_IN_ENV% conda config --get channels'
99+ # Build the wheel
100+ # Hide the output, the copied files really clutter the build log...
101+ - cmd : ' %CMD_IN_ENV% python setup.py bdist_wheel > NUL:'
102+
103+ # And now the conda build after a cleanup...
97104 # cleanup build files so that they don't pollute the conda build but keep the wheel in dist...
98105 - cmd : git clean -d -x -f -e dist/
106+ # cleanup the environment so that the test-environment does not leak into the conda build...
107+ - cmd : set MPLBASEDIRLIST=
108+ - cmd : set LIBRARY_LIB=
109+ - cmd : deactivate
110+ - cmd : path
111+ - cmd : where python
112+ - cmd : ' %CMD_IN_ENV% conda config --get channels'
99113 - cmd : ' %CMD_IN_ENV% conda build .\ci\conda_recipe'
114+
100115 # Move the conda package into the dist directory, to register it
101116 # as an "artifact" for Appveyor.
102117 - cmd : ' copy /Y %CONDA_INSTALL_LOCN%\conda-bld\win-32\*.bz2 dist || cmd /c "exit /b 0"'
103118 - cmd : ' copy /Y %CONDA_INSTALL_LOCN%\conda-bld\win-64\*.bz2 dist || cmd /c "exit /b 0"'
104- - cmd : dir .\dist\
119+ - cmd : dir dist\
120+ - cmd : echo finished...
105121
106122artifacts :
107123 - path : dist\*
@@ -112,5 +128,6 @@ artifacts:
112128 type : zip
113129
114130on_failure :
131+ - echo zipping images after a failure...
115132 - 7z a result_images.zip result_images\ >NUL :
116133 - appveyor PushArtifact result_images.zip
0 commit comments