@@ -28,6 +28,7 @@ environment:
2828 - PYTHON_VERSION : " 3.6"
2929 CONDA_INSTALL_LOCN : " C:\\ Miniconda36-x64"
3030 TEST_ALL : " no"
31+ MPLSTATICBUILD : True
3132
3233# We always use a 64-bit machine, but can build x86 distributions
3334# with the PYTHON_ARCH variable
@@ -74,17 +75,6 @@ install:
7475 curl -sL https://github.com/python/cpython/pull/1224.patch |
7576 patch -fsup 1 -d %CONDA_PREFIX% ) || cmd /c "exit /b 0"
7677
77- # Let the install prefer the static builds of the libs
78- - set LIBRARY_LIB=%CONDA_PREFIX%\Library\lib
79- - mkdir lib || cmd /c "exit /b 0"
80- - copy /y %LIBRARY_LIB%\zlibstatic.lib lib\z.lib
81- - copy /y %LIBRARY_LIB%\libpng_static.lib lib\png.lib
82- # These z.lib / png.lib are not static versions but files which end up as
83- # dependencies to the dll file. This is fine for the conda build, but not here
84- # and for the wheels
85- - del %LIBRARY_LIB%\png.lib
86- - del %LIBRARY_LIB%\z.lib
87- - set MPLBASEDIRLIST=%CONDA_PREFIX%\Library\;.
8878 # enables the local freetype build
8979 - copy ci\travis\setup.cfg .
9080 # Show the installed packages + versions
@@ -95,9 +85,9 @@ test_script:
9585 - pip install -ve .
9686 # these should show no z, png, or freetype dll...
9787 - set "DUMPBIN=%VS140COMNTOOLS%\..\..\VC\bin\dumpbin.exe"
98- - ' "%DUMPBIN%" /DEPENDENTS lib\matplotlib\ft2font*.pyd | findstr freetype.*.dll && exit /b 1 || exit /b 0'
99- - ' "%DUMPBIN%" /DEPENDENTS lib\matplotlib\_png*.pyd | findstr z.*.dll && exit /b 1 || exit /b 0'
100- - ' "%DUMPBIN%" /DEPENDENTS lib\matplotlib\_png*.pyd | findstr png.*.dll && exit /b 1 || exit /b 0'
88+ - ' if x%MPLSTATICBUILD% == xTrue "%DUMPBIN%" /DEPENDENTS lib\matplotlib\ft2font*.pyd | findstr freetype.*.dll && exit /b 1 || exit /b 0'
89+ - ' if x%MPLSTATICBUILD% == xTrue "%DUMPBIN%" /DEPENDENTS lib\matplotlib\_png*.pyd | findstr z.*.dll && exit /b 1 || exit /b 0'
90+ - ' if x%MPLSTATICBUILD% == xTrue "%DUMPBIN%" /DEPENDENTS lib\matplotlib\_png*.pyd | findstr png.*.dll && exit /b 1 || exit /b 0'
10191
10292 # this are optional dependencies so that we don't skip so many tests...
10393 - if x%TEST_ALL% == xyes conda install -q ffmpeg inkscape miktex pillow
@@ -114,6 +104,7 @@ test_script:
114104after_test :
115105 # After the tests were a success, build wheels with the static libs
116106 # Hide the output, the copied files really clutter the build log...
107+ - set MPLSTATICBUILD=True
117108 - ' python setup.py bdist_wheel > NUL:'
118109 - dir dist\
119110 - echo finished...
0 commit comments