diff --git a/appveyor.yml b/appveyor.yml index 6abd93417900..16e9b70b8a57 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -59,12 +59,21 @@ install: - cmd: conda config --add channels conda-forge # this is now the downloaded conda... - conda info -a + + # Fix the appveyor build environment to work with conda build + # workaround for missing vcvars64.bat in py34 64bit + - cmd: copy ci\appveyor\vcvars64.bat "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64" + # workaround for conda build on py27 prefering the normal installed + # VS tools instead of the also installed Py27 VS compiler (which wouldn't need this workarounds...) + - 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" + # same things as the requirements in ci/conda_recipe/meta.yaml - 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 - activate test-environment - cmd: echo %PYTHON_VERSION% %TARGET_ARCH% - cmd: IF %PYTHON_VERSION% == 2.7 conda install -y functools32 - # This is needed for the installer to find the dlls... + + # Let the install prefer the static builds of the libs - set LIBRARY_LIB=%CONDA_DEFAULT_ENV%\Library\lib - cmd: 'mkdir lib || cmd /c "exit /b 0"' - copy %LIBRARY_LIB%\zlibstatic.lib lib\z.lib @@ -82,21 +91,25 @@ test_script: - '%CMD_IN_ENV% python setup.py develop' # tests # for now, just let them pass to get the after_test parts... - - python tests.py || cmd /c "exit /b 0" + #- python tests.py || cmd /c "exit /b 0" after_test: # After the tests were a success, build packages (wheels and conda) - # There is a bug in wheels which prevents building wheels when the package uses namespaces - - cmd: '%CMD_IN_ENV% python setup.py bdist_wheel' - # Note also that our setup.py script, which is called by conda-build, writes - # a __conda_version__.txt file, so the version number on the binary package - # is set dynamically. This unfortunately means that conda build --output - # doesn't really work. - - cmd: '%CMD_IN_ENV% conda config --get channels' + # Build the wheel + # Hide the output, the copied files really clutter the build log... + - cmd: '%CMD_IN_ENV% python setup.py bdist_wheel > NUL:' + + # And now the conda build after a cleanup... # cleanup build files so that they don't pollute the conda build but keep the wheel in dist... - cmd: git clean -d -x -f -e dist/ + # cleanup the environment so that the test-environment does not leak into the conda build... + - cmd: set MPLBASEDIRLIST= + - cmd: set LIBRARY_LIB= + - cmd: deactivate + - cmd: '%CMD_IN_ENV% conda config --get channels' - cmd: '%CMD_IN_ENV% conda build .\ci\conda_recipe' + # Move the conda package into the dist directory, to register it # as an "artifact" for Appveyor. - cmd: 'copy /Y %CONDA_INSTALL_LOCN%\conda-bld\win-32\*.bz2 dist || cmd /c "exit /b 0"' diff --git a/ci/appveyor/vcvars64.bat b/ci/appveyor/vcvars64.bat new file mode 100644 index 000000000000..c4659becc3ae --- /dev/null +++ b/ci/appveyor/vcvars64.bat @@ -0,0 +1 @@ +CALL "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 \ No newline at end of file diff --git a/ci/conda_recipe/bld.bat b/ci/conda_recipe/bld.bat index b8317d730c8b..0638012e574b 100644 --- a/ci/conda_recipe/bld.bat +++ b/ci/conda_recipe/bld.bat @@ -1,6 +1,5 @@ -set LIB=%LIBRARY_LIB% set LIBPATH=%LIBRARY_LIB%; -set INCLUDE=%LIBRARY_INC%;%PREFIX%\Library\include\freetype2 +set INCLUDE=%INCLUDE%;%PREFIX%\Library\include\freetype2 ECHO [directories] > setup.cfg ECHO basedirlist = %LIBRARY_PREFIX% >> setup.cfg